|
|
unit u_op_seae_cangdan_templet;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, dxExEdtr, bsSkinCtrls, dxCntner, dxTL, dxDBCtrl, dxDBGrid,
|
|
|
dxDBTLCl, dxGrClms, DB, ADODB, StdCtrls;
|
|
|
|
|
|
type
|
|
|
Tfrm_op_seae_cangdan_templet = class(TForm)
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
ds_t_op_cangdan_templet: TDataSource;
|
|
|
t_op_cangdan_templet: TADOQuery;
|
|
|
t_op_cangdan_templettempletid: TAutoIncField;
|
|
|
t_op_cangdan_templetDSDesigner: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner2: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner3: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner4: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner5: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner6: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner7: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner8: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner9: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner10: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner11: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner12: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner13: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner14: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner15: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner16: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner17: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner18: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner19: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner20: TStringField;
|
|
|
t_op_cangdan_templetDSDesigner21: TDateTimeField;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridMaskColumn;
|
|
|
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: TdxDBGridDateColumn;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
Label1: TLabel;
|
|
|
Edit1: TEdit;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
procedure dxDBGrid1DblClick(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
AMSID:Integer;
|
|
|
AMSNO:string;
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_seae_cangdan_templet: Tfrm_op_seae_cangdan_templet;
|
|
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
uses u_main,u_data_share, my_sys_function,u_op_seae;
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_op_seae_cangdan_templet.dxDBGrid1DblClick(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
SQLStr:string;
|
|
|
begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
if AMSID=0 then
|
|
|
begin
|
|
|
SQLStr:= 'insert into t_op_ams '
|
|
|
+' (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>绰,<2C><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>,<2C>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>'
|
|
|
+',<2C>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>绰,<2C>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>,<2C>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>,<2C>յ<EFBFBD><D5B5>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>'
|
|
|
+',֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ϵ<EFBFBD>绰,֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>,֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>,<2C>յ<EFBFBD>֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>'
|
|
|
+',<2C><><EFBFBD><EFBFBD>) values ('
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('<27>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('<27>յ<EFBFBD><D5B5>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('֪ͨ<CDA8>˵绰').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString)+','
|
|
|
+ QuotedStr(t_op_cangdan_templet.fieldbyname('<27>յ<EFBFBD>֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString)+','
|
|
|
+ QuotedStr(amsno)+')';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
SQLStr:= 'update t_op_ams set '
|
|
|
+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>绰='+QuotedStr(t_op_cangdan_templet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString)
|
|
|
+',<2C><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>='+QuotedStr(t_op_cangdan_templet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString)
|
|
|
+',<2C><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+QuotedStr(t_op_cangdan_templet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)
|
|
|
+',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+QuotedStr(t_op_cangdan_templet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)
|
|
|
+',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>='+QuotedStr(t_op_cangdan_templet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString)
|
|
|
+',<2C>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>='+QuotedStr(t_op_cangdan_templet.fieldbyname('<27>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString)
|
|
|
+',<2C>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>绰='+QuotedStr(t_op_cangdan_templet.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString)
|
|
|
+',<2C>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>='+QuotedStr(t_op_cangdan_templet.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString)
|
|
|
+',<2C>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+QuotedStr(t_op_cangdan_templet.fieldbyname('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)
|
|
|
+',<2C>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+QuotedStr(t_op_cangdan_templet.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)
|
|
|
+',<2C>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>='+QuotedStr(t_op_cangdan_templet.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString)
|
|
|
+',<2C>յ<EFBFBD><D5B5>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>='+QuotedStr(t_op_cangdan_templet.fieldbyname('<27>յ<EFBFBD><D5B5>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString)
|
|
|
+',֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ϵ<EFBFBD>绰='+QuotedStr(t_op_cangdan_templet.fieldbyname('֪ͨ<CDA8>˵绰').AsString)
|
|
|
+',֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>='+QuotedStr(t_op_cangdan_templet.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString)
|
|
|
+',֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+QuotedStr(t_op_cangdan_templet.fieldbyname('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)
|
|
|
+',֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+QuotedStr(t_op_cangdan_templet.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)
|
|
|
+',֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>='+QuotedStr(t_op_cangdan_templet.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>').AsString)
|
|
|
+',<2C>յ<EFBFBD>֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>='+QuotedStr(t_op_cangdan_templet.fieldbyname('<27>յ<EFBFBD>֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString)
|
|
|
+' where id='+IntToStr(AMSID)
|
|
|
end;
|
|
|
|
|
|
with aQuery do
|
|
|
begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
SQL.Add(SQLStr);
|
|
|
ExecSQL;
|
|
|
end;
|
|
|
FreeAndNil(aQuery);
|
|
|
frm_op_seae.t_op_ams.Requery();
|
|
|
Self.Close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_cangdan_templet.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
with t_op_cangdan_templet do
|
|
|
begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
SQL.Add('select * from t_op_cangdan_templet where <20><><EFBFBD><EFBFBD>Ա='+QuotedStr(employee));
|
|
|
Open;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_cangdan_templet.bsSkinButton3Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_cangdan_templet.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
if trim(Edit1.Text)<>'' then
|
|
|
begin
|
|
|
with t_op_cangdan_templet do
|
|
|
begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
SQL.Add('select * from t_op_cangdan_templet where ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like ''%'+trim(Edit1.Text)+'%''');
|
|
|
Open;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
with t_op_cangdan_templet do
|
|
|
begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
SQL.Add('select * from t_op_cangdan_templet');
|
|
|
Open;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_cangdan_templet.bsSkinButton2Click(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
if MessageDlg('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE> ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ:'+t_op_cangdan_templet.fieldbyname('ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'<27><>ɾ<EFBFBD><C9BE><EFBFBD>ɻָ<C9BB><D6B8><EFBFBD>',mtWarning,[mbYes,mbNo],0)=mrYes then
|
|
|
begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
with aQuery do
|
|
|
begin
|
|
|
Close;
|
|
|
SQL.Clear;
|
|
|
SQL.Add('delete t_op_cangdan_templet where templetid='+QuotedStr(t_op_cangdan_templet.fieldbyname('templetid').AsString));
|
|
|
ExecSQL;
|
|
|
end;
|
|
|
FreeAndNil(aQuery);
|
|
|
t_op_cangdan_templet.Requery();
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end.
|