?? jh_find_unit.pas
字號:
adoq1.Parameters.ParamByName('yhbh').Value := edit3.Text;
end;
end;
1:
if checkbox3.Checked then
begin
adoq1.SQL.Add('select * from jhthd where 單據編碼 like :yhbh2 and 錄單日期 between #' + edit8.text + '# and #' + edit9.text + '# order by 編號');
adoq1.Parameters.ParamByName('yhbh2').Value := edit3.Text + '%';
end
else
begin
adoq1.SQL.Add('select * from jhthd where 單據編碼 like :yhbh2 order by 編號');
adoq1.Parameters.ParamByName('yhbh2').Value := edit3.Text + '%';
end;
end;
end;
1:
begin
case combobox6.ItemIndex of
0:
begin
if checkbox3.Checked then
begin
adoq1.SQL.Add('select * from jhthd where 供貨商名稱=:bh and 錄單日期 between #' + edit8.text + '# and #' + edit9.text + '# order by 編號');
adoq1.Parameters.ParamByName('bh').Value := edit3.Text;
end
else
begin
adoq1.SQL.Add('select * from jhthd where 供貨商名稱=:bh order by 編號');
adoq1.Parameters.ParamByName('bh').Value := edit3.Text;
end;
end;
1:
if checkbox3.Checked then
begin
adoq1.SQL.Add('select * from jhthd where 供貨商名稱 like :bh2 and 錄單日期 between #' + edit8.text + '# and #' + edit9.text + '# order by 編號');
adoq1.Parameters.ParamByName('bh2').Value := edit3.Text + '%';
end
else
begin
adoq1.SQL.Add('select * from jhthd where 供貨商名稱 like :bh2 order by 編號');
adoq1.Parameters.ParamByName('bh2').Value := edit3.Text + '%';
end;
end;
end;
2:
begin
case combobox6.itemIndex of
0:
begin
if checkbox3.Checked then
begin
adoq1.SQL.Add('select * from jhthd where 經手人=:mc and 錄單日期 between #' + edit8.text + '# and #' + edit9.text + '# order by 編號');
adoq1.Parameters.ParamByName('mc').Value := edit3.Text;
end
else
begin
adoq1.SQL.Add('select * from jhd where 經手人=:mc order by 編號');
adoq1.Parameters.ParamByName('mc').Value := edit3.Text;
end;
end;
1:
if checkbox3.Checked then
begin
adoq1.SQL.Add('select * from jhthd where 經手人 like :mc and 錄單日期 between #' + edit8.text + '# and #' + edit9.text + '# order by 編號');
adoq1.Parameters.ParamByName('mc').Value := edit3.Text + '%';
end
else
begin
adoq1.SQL.Add('select * from jhthd where 經手人 like :mc order by 編號');
adoq1.Parameters.ParamByName('mc').Value := edit3.Text + '%';
end;
end;
end;
//end
else
begin
adoq1.SQL.Clear;
adoq1.SQL.Add('select * from jhthd order by 編號 ');
end;
end;
adoq1.Active := true;
datas2.DataSet := nil;
datas2.DataSet := adoq1;
dbgrid2.DataSource := datas2;
end;
end;
procedure Tjh_find_form.FormCreate(Sender: TObject);
begin
self.Top := 74;
self.Left := 11;
self.Height := 491;
self.Width := 767;
self.PageControl1.ActivePageIndex := 0;
end;
procedure Tjh_find_form.SpeedButton6Click(Sender: TObject);
begin
close;
end;
procedure Tjh_find_form.SpeedButton8Click(Sender: TObject);
begin
close;
end;
procedure Tjh_find_form.SpeedButton21Click(Sender: TObject);
begin
with database do
begin
adoq1.Connection := adoc;
adoq1.SQL.Clear;
edit4.Text := formatdatetime('MM-dd-yy', datetimepicker3.date);
edit5.Text := formatdatetime('MM-dd-yy', datetimepicker4.date);
case combobox4.ItemIndex of
0:
begin
case combobox5.ItemIndex of
0:
begin
if checkbox2.Checked then
begin
//edit2.Text :=formatdatetime('MM-dd-yy',datetimepicker1.date);
//edit3.Text :=formatdatetime('MM-dd-yy',datetimepicker2.date);
adoq1.SQL.Add('select * from jhd where 單據編碼=:yhbh and 錄單日期 between #' + edit4.text + '# and #' + edit5.text + '# order by 編號');
adoq1.Parameters.ParamByName('yhbh').Value := edit1.Text;
end
else
begin
adoq1.SQL.Add('select * from jhd where 單據編碼=:yhbh order by 編號');
adoq1.Parameters.ParamByName('yhbh').Value := edit1.Text;
end;
end;
1:
if checkbox2.Checked then
begin
//edit2.Text :=formatdatetime('MM-dd-yy',datetimepicker1.date);
//edit3.Text :=formatdatetime('MM-dd-yy',datetimepicker2.date);
adoq1.SQL.Add('select * from jhd where 單據編碼 like :yhbh2 and 錄單日期 between #' + edit4.text + '# and #' + edit5.text + '# order by 編號');
adoq1.Parameters.ParamByName('yhbh2').Value := edit1.Text + '%';
end
else
begin
adoq1.SQL.Add('select * from jhd where 單據編碼 like :yhbh2 order by 編號');
adoq1.Parameters.ParamByName('yhbh2').Value := edit1.Text + '%';
end;
end;
end;
1:
begin
case combobox5.ItemIndex of
0:
begin
if checkbox2.Checked then
begin
//edit2.Text :=formatdatetime('MM-dd-yy',datetimepicker1.date);
//edit3.Text :=formatdatetime('MM-dd-yy',datetimepicker2.date);
adoq1.SQL.Add('select * from jhd where 供貨商名稱=:bh and 錄單日期 between #' + edit4.text + '# and #' + edit5.text + '# order by 編號');
adoq1.Parameters.ParamByName('bh').Value := edit1.Text;
end
else
begin
adoq1.SQL.Add('select * from jhd where 供貨商名稱=:bh order by 編號');
adoq1.Parameters.ParamByName('bh').Value := edit1.Text;
end;
end;
1:
if checkbox2.Checked then
begin
// edit2.Text :=formatdatetime('MM-dd-yy',datetimepicker1.date);
// edit3.Text :=formatdatetime('MM-dd-yy',datetimepicker2.date);
adoq1.SQL.Add('select * from jhd where 供貨商名稱 like :bh2 and 錄單日期 between #' + edit4.text + '# and #' + edit5.text + '# order by 編號');
adoq1.Parameters.ParamByName('bh2').Value := edit1.Text + '%';
end
else
begin
adoq1.SQL.Add('select * from jhd where 供貨商名稱 like :bh2 order by 編號');
adoq1.Parameters.ParamByName('bh2').Value := edit1.Text + '%';
end;
end;
end;
2:
begin
case combobox5.ItemIndex of
0:
begin
if checkbox2.Checked then
begin
//edit2.Text :=formatdatetime('MM-dd-yy',datetimepicker1.date);
//edit3.Text :=formatdatetime('MM-dd-yy',datetimepicker2.date);
adoq1.SQL.Add('select * from jhd where 經手人=:mc and 錄單日期 between #' + edit4.text + '# and #' + edit5.text + '# order by 編號');
adoq1.Parameters.ParamByName('mc').Value := edit1.Text;
end
else
begin
adoq1.SQL.Add('select * from jhd where 經手人=:mc order by 編號');
adoq1.Parameters.ParamByName('mc').Value := edit1.Text;
end;
end;
1:
if checkbox2.Checked then
begin
//edit2.Text :=formatdatetime('MM-dd-yy',datetimepicker1.date);
//edit3.Text :=formatdatetime('MM-dd-yy',datetimepicker2.date);
adoq1.SQL.Add('select * from jhd where 經手人 like :mc and 錄單日期 between #' + edit4.text + '# and #' + edit5.text + '# order by 編號');
adoq1.Parameters.ParamByName('mc').Value := edit1.Text + '%';
end
else
begin
adoq1.SQL.Add('select * from jhd where 經手人 like :mc order by 編號');
adoq1.Parameters.ParamByName('mc').Value := edit1.Text + '%';
end;
end;
end;
//end
else
begin
adoq1.SQL.Clear;
adoq1.SQL.Add('select * from jhd order by 編號 ');
end;
end;
adoq1.Active := true;
datas2.DataSet := nil;
datas2.DataSet := adoq1;
dbgrid3.DataSource := datas2;
end;
end;
end.
//此源碼由程序太平洋收集整理發布,任何人都可自由轉載,但需保留本站信息
//╭⌒╮┅~ ¤ 歡迎光臨程序太平洋╭⌒╮
//╭⌒╭⌒╮╭⌒╮~╭⌒╮ ︶ ,︶︶
//,︶︶︶︶,''︶~~ ,''~︶︶ ,''
//╔ ╱◥███◣═╬╬╬╬╬╬╬╬╬╗
//╬ ︱田︱田 田 ︱ ╬
//╬ http://www.5ivb.net ╬
//╬ ╭○╮● ╬
//╬ /■\/■\ ╬
//╬ <| || 有希望,就有成功! ╬
//╬ ╬
//╚╬╬╬╬╬╬╬╬╬╬╗ ╔╬╬╬╬╝
//
//說明:
//專業提供VB、.NET、Delphi、ASP、PB源碼下載
//包括:程序源碼,控件,商業源碼,系統方案,開發工具,書籍教程,技術文檔
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -