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.

254 lines
6.8 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

unit u_op_add_airi;
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_airi = class(TForm)
bsBusinessSkinForm1: TbsBusinessSkinForm;
t_main: TADOQuery;
t_main1: TDataSource;
bsSkinPanel1: TbsSkinPanel;
bsSkinGroupBox1: TbsSkinGroupBox;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label7: TLabel;
DBEdit1: TDBEdit;
DBEdit8: TDBEdit;
DBEdit7: TDBEdit;
DBEdit2: 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;
dxDBGrid1Column12: 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;
Edit7: TEdit;
Label14: TLabel;
Label124: TLabel;
wwDBLookupCombo52: TwwDBLookupCombo;
bsSkinButton3: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
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_airi: Tfrm_op_add_airi;
implementation
uses u_main, my_sys_function, u_op_aire;
{$R *.dfm}
procedure Tfrm_op_add_airi.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_add_airi.bsSkinButton10Click(Sender: TObject);
begin
t_fen.close;
t_main.close;
t_main.sql.clear;
t_main.sql.add('select * from t_op_airi where װ<>˷<EFBFBD>ʽ='+''''+'<27><><EFBFBD><EFBFBD><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><CBB5><EFBFBD> like '+''''+'%'+Edit3.text+'%'+'''');
t_main.sql.add(default_sort(56,'t_op_airi','','desc'));
t_main.open;
t_fen.open;
end;
procedure Tfrm_op_add_airi.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_airi.FormShow(Sender: TObject);
begin
t_fen_no.close;
t_fen_no.sql.clear;
t_fen_no.sql.add('select * from t_op_airi where װ<>˷<EFBFBD>ʽ<>'
+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ'+''''+' and <20><><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
+' and '
+open_data('0004','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no')
+default_sort(56,'t_op_airi','','desc'));
t_fen_no.open;
t_main.open;
t_fen.open;
end;
procedure Tfrm_op_add_airi.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_airi.bsSkinButton4Click(Sender: TObject);
begin
Edit4.text:='';
Edit5.text:='';
Edit6.text:='';
Edit7.text:='';
wwDBLookupCombo52.text:='';
end;
procedure Tfrm_op_add_airi.bsSkinButton3Click(Sender: TObject);
VAR
STR:WIDESTRING;
begin
STR:='select * from t_op_airi where װ<>˷<EFBFBD>ʽ<>'
+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ'+''''+' and <20><><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
+' and '
+open_data('0004','¼<><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><CBB5><EFBFBD> like '+''''+'%'+Edit6.TEXT+'%'+'''';
IF Edit7.TEXT<>''THEN
STR:=STR+' AND <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit7.TEXT+'%'+'''';
IF wwDBLookupCombo52.TEXT<>''THEN
STR:=STR+' AND Ŀ<>ĸ<EFBFBD> like '+''''+'%'+trim(wwDBLookupCombo52.TEXT)+'%'+'''';
STR:=STR+default_sort(56,'t_op_airi','','desc');
t_fen_no.close;
t_fen_no.sql.clear;
t_fen_no.sql.add(str);
t_fen_no.open;
end;
end.