You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

584 lines
20 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

unit u_info_bunk;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, ExtCtrls, dxExEdtr, dxCntner, dxTL, dxDBCtrl,
dxDBGrid, Grids, Wwdbigrd, Wwdbgrid, StdCtrls, DB,
ADODB, dxDBTLCl, dxGrClms, ComCtrls, bsSkinTabs, DBCtrls, wwdblook,
wwdbdatetimepicker, RxLookup, Menus, XPMenu, Mask, wwdbedit, Wwdotdot,
Wwdbcomb,inifiles;
type
Tfrm_info_bunk = class(TForm)
Panel2: TPanel;
dxDBGrid1: TdxDBGrid;
t_op_seae: TADOQuery;
t_op_seae1: TDataSource;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
N73: TMenuItem;
N48: TMenuItem;
XPMenu1: TXPMenu;
bsSkinPanel1: TbsSkinPanel;
bsSkinPanel2: TbsSkinPanel;
bsSkinButton9: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
Label10: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
Label5: TLabel;
wwDBDateTimePicker2: TwwDBDateTimePicker;
Label9: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
Label125: TLabel;
wwDBLookupCombo49: TwwDBLookupCombo;
Label30: TLabel;
Edit7: TEdit;
Label6: TLabel;
Edit1: TEdit;
Label3: TLabel;
Edit4: TEdit;
Label1: TLabel;
Edit2: TEdit;
Label4: TLabel;
RxDBLookupCombo1: TRxDBLookupCombo;
Label7: TLabel;
bsSkinButton6: TbsSkinButton;
ComboBox1: TComboBox;
Label2: TLabel;
Edit3: TEdit;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridDateColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridMaskColumn;
dxDBGrid1Column17: TdxDBGridMaskColumn;
dxDBGrid1Column18: TdxDBGridMaskColumn;
dxDBGrid1Column19: TdxDBGridMaskColumn;
dxDBGrid1Column20: TdxDBGridMaskColumn;
dxDBGrid1Column21: TdxDBGridMaskColumn;
dxDBGrid1Column22: TdxDBGridMaskColumn;
dxDBGrid1Column23: TdxDBGridMaskColumn;
dxDBGrid1Column24: TdxDBGridMaskColumn;
dxDBGrid1Column25: TdxDBGridDateColumn;
dxDBGrid1Column26: TdxDBGridDateColumn;
dxDBGrid1Column27: TdxDBGridDateColumn;
dxDBGrid1Column28: TdxDBGridMaskColumn;
dxDBGrid1Column29: TdxDBGridMaskColumn;
dxDBGrid1Column30: TdxDBGridMaskColumn;
dxDBGrid1Column31: TdxDBGridMaskColumn;
dxDBGrid1Column32: TdxDBGridMaskColumn;
dxDBGrid1Column33: TdxDBGridDateColumn;
dxDBGrid1Column34: TdxDBGridMaskColumn;
dxDBGrid1Column35: TdxDBGridMaskColumn;
dxDBGrid1Column36: TdxDBGridMaskColumn;
dxDBGrid1Column37: TdxDBGridMaskColumn;
dxDBGrid1Column38: TdxDBGridMaskColumn;
dxDBGrid1Column39: TdxDBGridMaskColumn;
dxDBGrid1Column40: TdxDBGridMaskColumn;
dxDBGrid1Column41: TdxDBGridMaskColumn;
dxDBGrid1Column42: TdxDBGridMaskColumn;
dxDBGrid1Column43: TdxDBGridDateColumn;
dxDBGrid1Column44: TdxDBGridMaskColumn;
dxDBGrid1Column45: TdxDBGridMaskColumn;
dxDBGrid1Column46: TdxDBGridMaskColumn;
dxDBGrid1Column47: TdxDBGridMaskColumn;
dxDBGrid1Column48: TdxDBGridMaskColumn;
dxDBGrid1Column49: TdxDBGridMaskColumn;
dxDBGrid1Column50: TdxDBGridMaskColumn;
dxDBGrid1Column51: TdxDBGridMaskColumn;
dxDBGrid1Column52: TdxDBGridMaskColumn;
dxDBGrid1Column53: TdxDBGridMaskColumn;
dxDBGrid1Column54: TdxDBGridMaskColumn;
dxDBGrid1Column55: TdxDBGridMaskColumn;
dxDBGrid1Column56: TdxDBGridMaskColumn;
dxDBGrid1Column57: TdxDBGridColumn;
dxDBGrid1Column58: TdxDBGridColumn;
dxDBGrid1Column59: TdxDBGridMaskColumn;
dxDBGrid1Column60: TdxDBGridMaskColumn;
dxDBGrid11: TdxDBGridMaskColumn;
dxDBGrid12: TdxDBGridMaskColumn;
dxDBGrid13: TdxDBGridMaskColumn;
dxDBGrid14: TdxDBGridMaskColumn;
dxDBGrid15: TdxDBGridMaskColumn;
dxDBGrid16: TdxDBGridMaskColumn;
dxDBGrid17: TdxDBGridMaskColumn;
dxDBGrid18: TdxDBGridMaskColumn;
dxDBGrid19: TdxDBGridMaskColumn;
dxDBGrid110: TdxDBGridMaskColumn;
dxDBGrid1Column71: TdxDBGridMaskColumn;
dxDBGrid1TEU: TdxDBGridMaskColumn;
dxDBGrid1Column73: TdxDBGridMaskColumn;
dxDBGrid1Column74: TdxDBGridMaskColumn;
dxDBGrid1Column75: TdxDBGridDateColumn;
dxDBGrid1Column76: TdxDBGridMaskColumn;
dxDBGrid1Column77: TdxDBGridMaskColumn;
dxDBGrid1Column78: TdxDBGridMaskColumn;
dxDBGrid1Column79: TdxDBGridMaskColumn;
dxDBGrid1Column80: TdxDBGridMaskColumn;
dxDBGrid1Column81: TdxDBGridMaskColumn;
dxDBGrid1Column82: TdxDBGridMaskColumn;
dxDBGrid1Column83: TdxDBGridMaskColumn;
dxDBGrid1Column84: TdxDBGridMaskColumn;
dxDBGrid1Column85: TdxDBGridMaskColumn;
dxDBGrid1Column86: TdxDBGridMaskColumn;
dxDBGrid1Column87: TdxDBGridCheckColumn;
dxDBGrid1Column88: TdxDBGridCheckColumn;
dxDBGrid1Column89: TdxDBGridCheckColumn;
dxDBGrid1Column90: TdxDBGridCheckColumn;
dxDBGrid1Column91: TdxDBGridCheckColumn;
dxDBGrid1Column92: TdxDBGridDateColumn;
dxDBGrid1Column93: TdxDBGridMaskColumn;
dxDBGrid1Column94: TdxDBGridMaskColumn;
dxDBGrid1Column95: TdxDBGridMaskColumn;
dxDBGrid1Column96: TdxDBGridMaskColumn;
dxDBGrid1Column97: TdxDBGridMaskColumn;
dxDBGrid1Column98: TdxDBGridMaskColumn;
dxDBGrid1Column99: TdxDBGridMaskColumn;
dxDBGrid1Column100: TdxDBGridMaskColumn;
dxDBGrid1Column101: TdxDBGridCheckColumn;
dxDBGrid1Column102: TdxDBGridDateColumn;
dxDBGrid1Column103: TdxDBGridCheckColumn;
dxDBGrid1Column104: TdxDBGridDateColumn;
dxDBGrid1Column105: TdxDBGridMaskColumn;
dxDBGrid1Column106: TdxDBGridMaskColumn;
dxDBGrid1Column107: TdxDBGridMaskColumn;
dxDBGrid1Column108: TdxDBGridMaskColumn;
dxDBGrid1Column109: TdxDBGridMaskColumn;
dxDBGrid1Column110: TdxDBGridMaskColumn;
dxDBGrid1Column111: TdxDBGridMaskColumn;
dxDBGrid1Column112: TdxDBGridMaskColumn;
dxDBGrid1Column113: TdxDBGridMaskColumn;
dxDBGrid1Column114: TdxDBGridMaskColumn;
dxDBGrid1Column115: TdxDBGridMaskColumn;
dxDBGrid1Column116: TdxDBGridMaskColumn;
dxDBGrid1Column117: TdxDBGridMaskColumn;
dxDBGrid1Column118: TdxDBGridMaskColumn;
dxDBGrid1Column119: TdxDBGridCheckColumn;
dxDBGrid1Column120: TdxDBGridCheckColumn;
dxDBGrid1Column121: TdxDBGridCheckColumn;
dxDBGrid1Column122: TdxDBGridCheckColumn;
dxDBGrid1Column123: TdxDBGridMaskColumn;
dxDBGrid1Column124: TdxDBGridCheckColumn;
dxDBGrid1Column125: TdxDBGridDateColumn;
dxDBGrid1Column126: TdxDBGridCheckColumn;
dxDBGrid1Column127: TdxDBGridCheckColumn;
dxDBGrid1Column128: TdxDBGridDateColumn;
dxDBGrid1Column129: TdxDBGridDateColumn;
dxDBGrid1Column130: TdxDBGridMaskColumn;
dxDBGrid1Column131: TdxDBGridMaskColumn;
dxDBGrid1Column132: TdxDBGridMaskColumn;
dxDBGrid1Column133: TdxDBGridMaskColumn;
dxDBGrid1Column134: TdxDBGridMaskColumn;
dxDBGrid1Column135: TdxDBGridMaskColumn;
dxDBGrid1Column136: TdxDBGridMaskColumn;
dxDBGrid1Column137: TdxDBGridCheckColumn;
dxDBGrid1Column138: TdxDBGridMaskColumn;
dxDBGrid1Column139: TdxDBGridDateColumn;
dxDBGrid1Column140: TdxDBGridColumn;
dxDBGrid1Column141: TdxDBGridColumn;
dxDBGrid1Column142: TdxDBGridColumn;
dxDBGrid1Column143: TdxDBGridDateColumn;
dxDBGrid1Column144: TdxDBGridDateColumn;
dxDBGrid1Column145: TdxDBGridDateColumn;
dxDBGrid1Column146: TdxDBGridDateColumn;
dxDBGrid1Column147: TdxDBGridMaskColumn;
dxDBGrid1Column148: TdxDBGridMaskColumn;
dxDBGrid1Column149: TdxDBGridMaskColumn;
dxDBGrid1Column150: TdxDBGridCheckColumn;
dxDBGrid1Column151: TdxDBGridMaskColumn;
dxDBGrid1Column152: TdxDBGridMaskColumn;
dxDBGrid1Column153: TdxDBGridMaskColumn;
dxDBGrid1Column154: TdxDBGridMaskColumn;
dxDBGrid1Column155: TdxDBGridMaskColumn;
dxDBGrid1Column156: TdxDBGridMaskColumn;
dxDBGrid1Column157: TdxDBGridMaskColumn;
dxDBGrid1Column158: TdxDBGridColumn;
dxDBGrid1Column159: TdxDBGridMaskColumn;
dxDBGrid1Column160: TdxDBGridMaskColumn;
dxDBGrid1Column161: TdxDBGridMaskColumn;
dxDBGrid1Column162: TdxDBGridMaskColumn;
dxDBGrid1Column163: TdxDBGridDateColumn;
dxDBGrid1Column164: TdxDBGridDateColumn;
dxDBGrid1Column165: TdxDBGridMaskColumn;
dxDBGrid1Column166: TdxDBGridDateColumn;
dxDBGrid1Column167: TdxDBGridDateColumn;
dxDBGrid1Column168: TdxDBGridDateColumn;
dxDBGrid1Column169: TdxDBGridDateColumn;
dxDBGrid1Column170: TdxDBGridMaskColumn;
dxDBGrid1Column171: TdxDBGridMaskColumn;
dxDBGrid1Column172: TdxDBGridMaskColumn;
dxDBGrid1Column173: TdxDBGridMaskColumn;
dxDBGrid1Column174: TdxDBGridMaskColumn;
dxDBGrid1Column175: TdxDBGridMaskColumn;
dxDBGrid1Column176: TdxDBGridMaskColumn;
dxDBGrid1Column177: TdxDBGridMaskColumn;
dxDBGrid1Column178: TdxDBGridCheckColumn;
dxDBGrid1Column179: TdxDBGridDateColumn;
dxDBGrid1Column180: TdxDBGridMaskColumn;
dxDBGrid1Column181: TdxDBGridMaskColumn;
dxDBGrid1Column182: TdxDBGridMaskColumn;
dxDBGrid1Column183: TdxDBGridMaskColumn;
dxDBGrid1Column184: TdxDBGridCheckColumn;
dxDBGrid1Column185: TdxDBGridMaskColumn;
dxDBGrid1Column186: TdxDBGridMaskColumn;
dxDBGrid1Column187: TdxDBGridMaskColumn;
dxDBGrid1Column189: TdxDBGridMaskColumn;
dxDBGrid1Column190: TdxDBGridMaskColumn;
dxDBGrid1Column191: TdxDBGridColumn;
dxDBGrid1Column192: TdxDBGridMaskColumn;
dxDBGrid1Column193: TdxDBGridDateColumn;
dxDBGrid1Column206: TdxDBGridMaskColumn;
bsSkinPanel3: TbsSkinPanel;
lblcount: TLabel;
lblOrder: TLabel;
lblBack: TLabel;
qryseae_delbunk: TADOQuery;
Label8: TLabel;
RxDBLookupCombo6: TRxDBLookupCombo;
bsSkinButton2: TbsSkinButton;
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton9Click(Sender: TObject);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure dxDBGrid2Column3CustomDrawCell(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused,
ANewItemRow: Boolean; var AText: String; var AColor: TColor;
AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure dxDBGrid1Column4CustomDrawCell(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused,
ANewItemRow: Boolean; var AText: String; var AColor: TColor;
AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure dxDBGrid1CustomDrawCell(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn;
ASelected, AFocused, ANewItemRow: Boolean; var AText: String;
var AColor: TColor; AFont: TFont; var AAlignment: TAlignment;
var ADone: Boolean);
private
{ Private declarations }
seaestr,seaedelstr:string ;
function findstr:string ;
procedure setFootermsg;
procedure loadFindIni ;
procedure writeFindIni ;
public
{ Public declarations }
end;
var
frm_info_bunk: Tfrm_info_bunk;
implementation
{$R *.dfm}
uses u_main,my_sys_function,u_data_share ;
procedure Tfrm_info_bunk.bsSkinButton5Click(Sender: TObject);
begin
close ;
end;
procedure Tfrm_info_bunk.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
writeFindIni;
savereggrid(dxdbgrid1,caption+'1');
frm_info_bunk.Hide;
frm_info_bunk.ManualFloat(frm_info_bunk.BoundsRect );
frm_main.freeTabs('frm_info_bunk');
action:=cafree;
frm_info_bunk:=nil;
end;
procedure Tfrm_info_bunk.bsSkinButton9Click(Sender: TObject);
begin
sys_print('<27><>λ<EFBFBD><CEBB>',2,nil,nil,nil,nil,t_op_seae1,Nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_info_bunk.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_info_bunk.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_info_bunk.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,115);
end;
procedure Tfrm_info_bunk.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_info_bunk.FormShow(Sender: TObject);
var i:integer ;
begin
loadFindIni;
loadreggrid(dxdbgrid1,true,caption+'1');
seaestr:='select (case <20>Ƿ<EFBFBD><C7B7>˲<EFBFBD> when 1 then ''<27>˲<EFBFBD>'' ELSE ''<27><><EFBFBD><EFBFBD>'' END) as <20><><EFBFBD><EFBFBD>״̬' ;
seaedelstr:='select '+''''+'<27>˲<EFBFBD>'+''''+'as <20><><EFBFBD><EFBFBD>״̬' ;
qryseae_delbunk.open ;
for i:=0 to qryseae_delbunk.fieldcount-1 do
begin
seaestr:=seaestr+','+qryseae_delbunk.Fields[i].FieldName ;
seaedelstr:=seaedelstr+','+qryseae_delbunk.Fields[i].FieldName ;
end ;
seaestr:=seaestr+' from t_op_seae ' ;
seaedelstr:=seaedelstr+' from t_op_seae_delbunk ' ;
lblorder.Caption:='';
lblback.Caption:='';
lblcount.Caption:='' ;
end;
procedure Tfrm_info_bunk.dxDBGrid2Column3CustomDrawCell(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean;
var AText: String; var AColor: TColor; AFont: TFont;
var AAlignment: TAlignment; var ADone: Boolean);
begin
if frm_data_share.t_code_state.Locate('ҵ<><D2B5>״̬',backstate,[])then
AColor:=stringtocolor(frm_data_share.t_code_state.fieldbyname('<27><>ɫ').asstring)
else AColor:=clwhite ;
end;
procedure Tfrm_info_bunk.bsSkinButton6Click(Sender: TObject);
begin
edit1.Text:='' ;
edit2.text:='' ;
edit4.text:='' ;
edit7.Text:='' ;
wwDBDateTimePicker1.Clear ;
wwDBDateTimePicker2.Clear ;
RxDBLookupCombo1.ClearValue ;
RxDBLookupCombo6.ClearValue ;
RxDBLookupCombo2.ClearValue ;
ComboBox1.ItemIndex:=-1 ;
wwDBLookupCombo49.clear ;
end;
function Tfrm_info_bunk.findstr: string;
var str:string ;
begin
str:='where (1=1) ' ;
if edit1.Text<>'' then str:=str+' and <20><><EFBFBD>յ<EFBFBD><D5B5><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
if edit4.text<>'' then str:=str+' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit4.text+'%'+'''';
if edit2.text<>'' then str:=str+' and <20><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit2.text+'%'+'''';
if edit7.text<>'' then str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit7.text+'%'+'''';
if edit3.text<>'' then str:=str+' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit3.text+'%'+'''';
if wwDBLookupCombo49.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+wwDBLookupCombo49.text+'%'+'''';
if RxDBLookupCombo1.DisplayValues[0]<>'' then str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo1.DisplayValues[0]+'''';
if wwDBDateTimePicker1.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
if wwDBDateTimePicker2.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
if RxDBLookupCombo2.DisplayValues[1]<>'' then str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
if RxDBLookupCombo6.DisplayValues[1]<>'' then str:=str+' and <20><><EFBFBD><EFBFBD>˾='+''''+RxDBLookupCombo6.DisplayValues[1]+'''';
result:=str ;
end;
procedure Tfrm_info_bunk.bsSkinButton1Click(Sender: TObject);
var str:string ;
begin
screen.Cursor:=crSQLwait ;
try
str:=findstr ;
if ComboBox1.ItemIndex=0 then
begin
with t_op_seae,SQL do
begin
close ; Clear ;
add(seaestr);
add(str);
// add(' and <20><><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><>'+''''+'''');
open ;
end ;
end
else if ComboBox1.ItemIndex=1 then
begin
with t_op_seae,SQL do
begin
close ; Clear ;
add(seaedelstr);
add(str);
open ;
end ;
end
else
begin
with t_op_seae,SQL do
begin
close ; Clear ;
add(seaestr);
add(str);
// add(' and <20><><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><>'+''''+'''');
add(' union ');
add(seaedelstr);
add(str);
open ;
end ;
end ;
setfootermsg ;
finally
screen.Cursor:=crDefault ;
end ;
end;
procedure Tfrm_info_bunk.setFootermsg;
var orderteu,backteu:integer ;
begin
lblcount.Caption:='<27><>: '+inttostr(t_op_seae.recordcount) ;
orderteu:=0 ; backteu:=0 ;
with t_op_seae do
begin
disablecontrols ;
first ;
while not eof do
begin
if fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD>' then orderteu:=orderteu+fieldbyname('<27><>TEU').asinteger
else if fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring='<27>˲<EFBFBD>' then backteu:=backteu+fieldbyname('<27><>TEU').asinteger ;
next ;
end ;
enablecontrols ;
lblorder.Caption:='<27><><EFBFBD><EFBFBD>TEU: '+inttostr(orderteu);
lblback.Caption:='<27>˲<EFBFBD>TEU: '+inttostr(backteu);
end ;
end;
procedure Tfrm_info_bunk.dxDBGrid1Column4CustomDrawCell(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean;
var AText: String; var AColor: TColor; AFont: TFont;
var AAlignment: TAlignment; var ADone: Boolean);
begin
AColor:=dxgrid_color('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>',ANode.Strings[dxDBGrid1Column3.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_info_bunk.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_op_seae,'<27><><EFBFBD><EFBFBD>');
end;
procedure Tfrm_info_bunk.dxDBGrid1CustomDrawCell(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean;
var AText: String; var AColor: TColor; AFont: TFont;
var AAlignment: TAlignment; var ADone: Boolean);
begin
if ANode.Strings[dxDBGrid1Column1.Index]='<27>˲<EFBFBD>' then
AColor:=clBtnFace;
end;
procedure Tfrm_info_bunk.loadFindIni;
var
findini:tinifile ;
mysec,tmpname:string;
canload:boolean ; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
i:integer ;
begin
mysec:='1';
findini:=Tinifile.Create(ExtractFilePath(application.ExeName)+'bunkquery.ini');
try
canload:=findini.ReadBool(mysec,mysec,false);
bsSkinCheckRadioBox1.Checked:=canload ;
if canload then
begin
with bsSkinPanel1 do
for i:=0 to ControlCount-1 do
begin
tmpname:=Controls[i].Name ;
if Controls[i] is TComboBox then
(Controls[i] as TComboBox).Text:=findini.ReadString(mysec,TmpName,'') else
if Controls[i] is TwwDBLookupCombo then
(Controls[i] as TwwDBLookupCombo).Text:=findini.ReadString(mysec,TmpName,'') else
if Controls[i] is TEdit then
(Controls[i] as TEdit).Text:=findini.ReadString(mysec,TmpName,'') else
if Controls[i] is TwwDBDateTimePicker then
(Controls[i] as TwwDBDateTimePicker).Date:=strtodate(findini.ReadString(mysec,TmpName,'')) else
if Controls[i] is TRxDBLookupCombo then
(Controls[i] as TRxDBLookupCombo).Value:=findini.ReadString(mysec,TmpName,'') ;
end ;
end else
begin
end ;
finally
findini.free;
end ;
end;
procedure Tfrm_info_bunk.writeFindIni;
var
findini:tinifile ;
mysec,tmpname:string;
canload:boolean ; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
i:integer ;
begin
canload:=bsSkinCheckRadioBox1.Checked ;
mysec:='1';
findini:=Tinifile.Create(ExtractFilePath(application.ExeName)+'bunkquery.ini');
try
findini.WriteBool(mysec,mysec,canload);
if canload then
begin
with bsSkinPanel1 do
for i:=0 to ControlCount-1 do
begin
tmpname:=Controls[i].Name ;
if Controls[i] is TComboBox then
findini.WriteString(mysec,TmpName,(Controls[i] as TComboBox).Text) else
if Controls[i] is TwwDBLookupCombo then
findini.WriteString(mysec,TmpName,(Controls[i] as TwwDBLookupCombo).Text) else
if Controls[i] is TEdit then
findini.WriteString(mysec,TmpName,(Controls[i] as TEdit).Text) else
if Controls[i] is TwwDBDateTimePicker then
findini.WriteString(mysec,TmpName,datetostr((Controls[i] as TwwDBDateTimePicker).Date)) else
if Controls[i] is TRxDBLookupCombo then
findini.writeString(mysec,TmpName,(Controls[i] as TRxDBLookupCombo).Value) ;
end ;
end ;
finally
findini.free;
end ;
end;
end.