📄 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 + -