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.

213 lines
6.1 KiB
Plaintext

11 months ago
unit u_op_railwayctn_history;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BusinessSkinForm, bsSkinCtrls, dxExEdtr, dxCntner, dxTL,
dxDBCtrl, dxDBGrid, DB, ADODB, dxDBTLCl, dxGrClms, RxLookup, StdCtrls,
wwdbdatetimepicker, Mask, wwdbedit, Wwdotdot, Wwdbcomb;
type
Tfrm_op_railwayctn_history = class(TForm)
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinPanel1: TbsSkinPanel;
bsSkinButton5: TbsSkinButton;
bsSkinNotebook1: TbsSkinNotebook;
bsSkinButton10: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
t_bill1: TDataSource;
t_bill: TADOQuery;
bsSkinPanel2: TbsSkinPanel;
bsSkinPanel3: TbsSkinPanel;
Edit1: TEdit;
Edit2: TEdit;
Label6: TLabel;
Label1: TLabel;
Label9: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
Label3: TLabel;
Edit4: TEdit;
Edit3: TEdit;
Label2: TLabel;
Label10: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
dxDBGrid2: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridDateColumn;
dxDBGrid1Column17: TdxDBGridDateColumn;
dxDBGrid1Column18: TdxDBGridDateColumn;
dxDBGrid1Column19: TdxDBGridMaskColumn;
dxDBGrid1Column20: TdxDBGridMaskColumn;
dxDBGrid1Column22: TdxDBGridDateColumn;
dxDBGrid1Column63: TdxDBGridMaskColumn;
dxDBGrid1Column64: TdxDBGridMaskColumn;
dxDBGrid1Column65: TdxDBGridDateColumn;
dxDBGrid1Column66: TdxDBGridMaskColumn;
dxDBGrid1Column67: TdxDBGridMaskColumn;
op_type: TEdit;
fee_type: TEdit;
t_do_railwayctn: TDataSource;
Label4: TLabel;
wwDBDateTimePicker2: TwwDBDateTimePicker;
Label5: TLabel;
Edit5: TEdit;
wwDBComboBox5: TwwDBComboBox;
Label7: TLabel;
t_op_railway_detail: TADOQuery;
dxDBGrid2Column21: TdxDBGridColumn;
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
private
function fee_get_client(str:string):string;
function fee_get_num(Str: String): Double;
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_railwayctn_history: Tfrm_op_railwayctn_history;
implementation
uses u_main, my_sys_function, u_data_share;
{$R *.dfm}
procedure Tfrm_op_railwayctn_history.bsSkinButton5Click(Sender: TObject);
begin
CLOSE;
end;
procedure Tfrm_op_railwayctn_history.bsSkinButton10Click(Sender: TObject);
begin
Edit1.text:='';
Edit2.text:='';
Edit3.text:='';
Edit4.text:='';
Edit5.text:='';
RxDBLookupCombo2.ClearValue;
wwDBDateTimePicker1.Text:='';
wwDBDateTimePicker2.Text:='';
end;
function Tfrm_op_railwayctn_history.fee_get_client(str:string):string;
begin
end;
function Tfrm_op_railwayctn_history.fee_get_num(Str: String): Double;
begin
end;
procedure Tfrm_op_railwayctn_history.bsSkinButton2Click(Sender: TObject);
var
str:string;
begin
if Edit1.text<>''then
str:=' where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
if Edit4.text<>''then
begin
if str=''then
str:=' where ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit4.text+'%'+''''
else
str:=str+' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit4.text+'%'+'''';
end;
if Edit2.text<>''then
begin
if str=''then
str:=' where <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> like '+''''+'%'+Edit2.text+'%'+''''
else
str:=str+' and <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> like '+''''+'%'+Edit2.text+'%'+'''';
end;
if Edit3.text<>''then
begin
if str=''then
str:=' where <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit3.text+'%'+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit3.text+'%'+'''';
end;
if Edit5.text<>''then
begin
if str=''then
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit5.text+'%'+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit5.text+'%'+'''';
end;
if wwDBComboBox5.text<>''then
begin
if str=''then
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ='+''''+wwDBComboBox5.text+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ= '+''''+wwDBComboBox5.text+'''';
end;
if RxDBLookupCombo2.DisplayValue<>''then
begin
if str=''then
str:=' where ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+''''
else
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
end;
if wwDBDateTimePicker1.text<>''then
begin
if str=''then
str:=' where <20>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker1.text+''''
else
str:=str+' and <20>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker1.text+'''';
end;
if wwDBDateTimePicker2.text<>''then
begin
if str=''then
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker2.text+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBDateTimePicker2.text+'''';
end;
str:='select * from v_op_railway_detail '+str+' order by <20><><EFBFBD><EFBFBD>,RD_ID';
t_bill.close;
t_bill.sql.clear;
t_bill.sql.add(str);
t_bill.open;
end;
procedure Tfrm_op_railwayctn_history.bsSkinButton3Click(Sender: TObject);
var
i,k:integer;
str:String;
begin
t_op_railway_detail.Close;
t_op_railway_detail.open;
if t_op_railway_detail.IsEmpty then
exit;
t_do_railwayctn.DataSet.append;
for k:= 0 to (t_op_railway_detail.fieldcount-1) do
begin
if t_do_railwayctn.DataSet.Fields.FindField(t_op_railway_detail.fields[k].FieldName)<>nil then
if (t_op_railway_detail.fields[k].FieldName<>'RD_ID')AND(t_op_railway_detail.fields[k].FieldName<>'<27><><EFBFBD><EFBFBD>') then
t_do_railwayctn.DataSet[t_op_railway_detail.fields[k].FieldName]:=t_op_railway_detail[t_op_railway_detail.fields[k].FieldName];
end;
t_do_railwayctn.DataSet.post;
close;
end;
end.