|
|
unit u_op_add_seai;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, BusinessSkinForm, StdCtrls, Mask, DBCtrls, bsSkinCtrls, DB,
|
|
|
ADODB, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, dxDBTLCl, dxGrClms,
|
|
|
wwdbdatetimepicker, Grids, DBGrids, XPMenu, Menus, ExtCtrls,
|
|
|
wwdblook;
|
|
|
|
|
|
type
|
|
|
Tfrm_op_add_seai = class(TForm)
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
t_main: TADOQuery;
|
|
|
t_main1: TDataSource;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
Label2: TLabel;
|
|
|
Label3: TLabel;
|
|
|
Label4: TLabel;
|
|
|
Label7: TLabel;
|
|
|
DBEdit1: TDBEdit;
|
|
|
DBEdit8: TDBEdit;
|
|
|
DBEdit7: TDBEdit;
|
|
|
DBEdit4: TDBEdit;
|
|
|
bsSkinGroupBox2: TbsSkinGroupBox;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
Label1: TLabel;
|
|
|
Edit1: TEdit;
|
|
|
Label37: TLabel;
|
|
|
Edit2: TEdit;
|
|
|
Label38: TLabel;
|
|
|
Edit3: TEdit;
|
|
|
t_fen: TADOQuery;
|
|
|
t_fen1: TDataSource;
|
|
|
t_fen_no: TADOQuery;
|
|
|
t_fen_no1: TDataSource;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridColumn;
|
|
|
XPMenu1: TXPMenu;
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
N1: TMenuItem;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
|
|
|
dxDBGridDateColumn1: TdxDBGridDateColumn;
|
|
|
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column10: TdxDBGridColumn;
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
dxDBGridMaskColumn8: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn9: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn10: TdxDBGridMaskColumn;
|
|
|
dxDBGridColumn1: TdxDBGridColumn;
|
|
|
dxDBGridMaskColumn13: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn14: TdxDBGridMaskColumn;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N2: TMenuItem;
|
|
|
dxDBGrid1Column10: TdxDBGridColumn;
|
|
|
dxDBGrid2Column12: TdxDBGridColumn;
|
|
|
dxDBGrid3Column7: TdxDBGridColumn;
|
|
|
Panel1: TPanel;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
dxDBGrid3Column8: TdxDBGridColumn;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
Label11: TLabel;
|
|
|
Edit4: TEdit;
|
|
|
Label12: TLabel;
|
|
|
Edit5: TEdit;
|
|
|
Label13: TLabel;
|
|
|
Edit6: TEdit;
|
|
|
Label124: TLabel;
|
|
|
wwDBLookupCombo52: TwwDBLookupCombo;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
Label125: TLabel;
|
|
|
wwDBLookupCombo49: TwwDBLookupCombo;
|
|
|
Label14: TLabel;
|
|
|
Edit7: TEdit;
|
|
|
Label5: TLabel;
|
|
|
DBEdit2: TDBEdit;
|
|
|
Label6: TLabel;
|
|
|
DBEdit3: TDBEdit;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_add_seai: Tfrm_op_add_seai;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_op_add_seai.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_add_seai.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
t_fen.close;
|
|
|
t_main.close;
|
|
|
t_main.sql.clear;
|
|
|
t_main.sql.add('select * from t_op_seai where װ<>˷<EFBFBD>ʽ='+''''+'ƴ<><C6B4><EFBFBD><EFBFBD>Ʊ'+'''');
|
|
|
if Edit1.text<>''then
|
|
|
t_main.sql.add(' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''');
|
|
|
if Edit2.text<>''then
|
|
|
t_main.sql.add(' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit2.text+'%'+'''');
|
|
|
if Edit3.text<>''then
|
|
|
t_main.sql.add(' and <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit3.text+'%'+'''');
|
|
|
t_main.sql.add(default_sort(54,'t_op_seai','','desc'));
|
|
|
t_main.open;
|
|
|
t_fen.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_add_seai.bsSkinButton2Click(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
if t_main.IsEmpty then
|
|
|
exit;
|
|
|
if t_main.FieldByName('ҵ<><D2B5>״̬').asstring='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD><C7B0>Ʊҵ<C6B1><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ܼ<EFBFBD><DCBC>룡<EFBFBD><EBA3A1>');
|
|
|
exit;
|
|
|
end;
|
|
|
|
|
|
if dxDBGrid1.SelectedCount>=1 then
|
|
|
begin
|
|
|
for i:=0 to dxDBGrid1.SelectedCount-1 do
|
|
|
begin
|
|
|
t_fen_no.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
|
|
|
t_fen_no.Edit;
|
|
|
t_fen_no['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_main.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
t_fen_no.post;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_fen_no.Edit;
|
|
|
t_fen_no['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_main.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
t_fen_no.post;
|
|
|
end;
|
|
|
t_fen.Requery();
|
|
|
t_fen_no.requery;
|
|
|
frm_op_aire.t_op_aire.Requery();
|
|
|
//close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_add_seai.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
t_fen_no.close;
|
|
|
t_fen_no.sql.clear;
|
|
|
t_fen_no.sql.add('select * from t_op_seai where װ<>˷<EFBFBD>ʽ='
|
|
|
+''''+'ƴ<><C6B4><EFBFBD><EFBFBD>Ʊ'+''''+' and <20><><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' and '
|
|
|
+open_data('0002','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
|
|
|
+default_sort(55,'t_op_seai','','desc'));
|
|
|
t_fen_no.open;
|
|
|
t_main.open;
|
|
|
t_fen.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_add_seai.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
if t_main.IsEmpty then
|
|
|
exit;
|
|
|
if t_main.FieldByName('ҵ<><D2B5>״̬').asstring='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
|
|
|
begin
|
|
|
showmessage('<27><>ǰƴ<C7B0><C6B4><EFBFBD><EFBFBD>Ʊҵ<C6B1><D2B5><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD>룡<EFBFBD><EBA3A1>');
|
|
|
exit;
|
|
|
end;
|
|
|
if t_fen.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
if dxDBGrid3.SelectedCount>=1 then
|
|
|
begin
|
|
|
for i:=0 to dxDBGrid3.SelectedCount-1 do
|
|
|
begin
|
|
|
t_fen.GotoBookmark(pointer(dxDBGrid3.selectedrows[i]));
|
|
|
t_fen.edit;
|
|
|
t_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_fen['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_fen.post;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_fen.edit;
|
|
|
t_fen['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_fen['<27><><EFBFBD><EFBFBD>'];
|
|
|
t_fen.post;
|
|
|
end;
|
|
|
t_fen.Requery();
|
|
|
t_fen_no.Requery();
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_add_seai.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
Edit4.text:='';
|
|
|
Edit5.text:='';
|
|
|
Edit6.text:='';
|
|
|
Edit7.text:='';
|
|
|
wwDBLookupCombo52.text:='';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_add_seai.bsSkinButton3Click(Sender: TObject);
|
|
|
VAR
|
|
|
STR:WIDESTRING;
|
|
|
begin
|
|
|
STR:='select * from t_op_seai where װ<>˷<EFBFBD>ʽ='
|
|
|
+''''+'ƴ<><C6B4><EFBFBD><EFBFBD>Ʊ'+''''+' and <20><><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' and '
|
|
|
+open_data('0002','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
|
|
|
IF Edit4.TEXT<>''THEN
|
|
|
STR:=STR+' AND ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit4.TEXT+'%'+'''';
|
|
|
IF Edit5.TEXT<>''THEN
|
|
|
STR:=STR+' AND ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit5.TEXT+'%'+'''';
|
|
|
IF Edit6.TEXT<>''THEN
|
|
|
STR:=STR+' AND <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit6.TEXT+'%'+'''';
|
|
|
IF Edit7.TEXT<>''THEN
|
|
|
STR:=STR+' AND <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit7.TEXT+'%'+'''';
|
|
|
IF wwDBLookupCombo49.TEXT<>''THEN
|
|
|
STR:=STR+' AND <20><><EFBFBD><EFBFBD> like '+''''+'%'+wwDBLookupCombo49.TEXT+'%'+'''';
|
|
|
IF wwDBLookupCombo52.TEXT<>''THEN
|
|
|
STR:=STR+' AND ж<><D0B6><EFBFBD><EFBFBD> like '+''''+'%'+trim(wwDBLookupCombo52.TEXT)+'%'+'''';
|
|
|
STR:=STR+default_sort(54,'t_op_seai','','desc');
|
|
|
|
|
|
t_fen_no.close;
|
|
|
t_fen_no.sql.clear;
|
|
|
t_fen_no.sql.add(str);
|
|
|
t_fen_no.open;
|
|
|
end;
|
|
|
|
|
|
end.
|