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.

152 lines
4.3 KiB
Plaintext

unit u_code_letter;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BusinessSkinForm, bsSkinCtrls, ExtCtrls, dxExEdtr, dxCntner,
dxTL, dxDBCtrl, dxDBGrid, dxDBTLCl, dxGrClms;
type
Tfrm_code_letter = class(TForm)
Panel1: TPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsBusinessSkinForm1: TbsBusinessSkinForm;
RadioGroup1: TbsSkinRadioGroup;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
Panel2: TPanel;
Panel3: TPanel;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
dxDBGrid2: TdxDBGrid;
dxDBGrid2Column1: TdxDBGridMaskColumn;
dxDBGrid2Column2: TdxDBGridPickColumn;
procedure FormShow(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure RadioGroup1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_code_letter: Tfrm_code_letter;
implementation
uses u_main, u_data_share, my_sys_function;
{$R *.dfm}
procedure Tfrm_code_letter.FormShow(Sender: TObject);
begin
frm_data_share.t_op_letter_free.Filtered:=false;
frm_data_share.t_op_letter_free.requery;
frm_data_share.t_op_letter_free.Filter:='ÒµÎñÀà±ð='+''''+'º£Ô˳ö¿Ú'+'''';
frm_data_share.t_op_letter_free.Filtered:=true;
end;
procedure Tfrm_code_letter.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
CanClose:=frm_close_query(frm_data_share.t_op_letter_free);
end;
procedure Tfrm_code_letter.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_code_letter.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(frm_data_share.t_op_letter_free);
end;
procedure Tfrm_code_letter.bsSkinButton2Click(Sender: TObject);
begin
table_post(frm_data_share.t_op_letter_free);
end;
procedure Tfrm_code_letter.bsSkinButton4Click(Sender: TObject);
begin
table_delete(frm_data_share.t_op_letter_free);
end;
procedure Tfrm_code_letter.bsSkinButton1Click(Sender: TObject);
begin
frm_data_share.t_op_letter_free.Insert;
end;
procedure Tfrm_code_letter.bsSkinButton6Click(Sender: TObject);
begin
frm_data_share.t_op_letter_free_detail.Insert;
end;
procedure Tfrm_code_letter.bsSkinButton7Click(Sender: TObject);
begin
table_post(frm_data_share.t_op_letter_free_detail);
end;
procedure Tfrm_code_letter.bsSkinButton8Click(Sender: TObject);
begin
table_delete(frm_data_share.t_op_letter_free_detail);
end;
procedure Tfrm_code_letter.bsSkinButton9Click(Sender: TObject);
begin
table_cancel(frm_data_share.t_op_letter_free_detail);
end;
procedure Tfrm_code_letter.RadioGroup1Click(Sender: TObject);
begin
case RadioGroup1.ItemIndex of
0:
begin
frm_data_share.t_op_letter_free.Filtered:=false;
frm_data_share.t_op_letter_free.requery;
frm_data_share.t_op_letter_free.Filter:='ÒµÎñÀà±ð='+''''+'º£Ô˳ö¿Ú'+'''';
frm_data_share.t_op_letter_free.Filtered:=true;
end;
1:
begin
frm_data_share.t_op_letter_free.Filtered:=false;
frm_data_share.t_op_letter_free.requery;
frm_data_share.t_op_letter_free.Filter:='ÒµÎñÀà±ð='+''''+'º£Ô˽ø¿Ú'+'''';
frm_data_share.t_op_letter_free.Filtered:=true;
end;
2:
begin
frm_data_share.t_op_letter_free.Filtered:=false;
frm_data_share.t_op_letter_free.requery;
frm_data_share.t_op_letter_free.Filter:='ÒµÎñÀà±ð='+''''+'¿ÕÔ˳ö¿Ú'+'''';
frm_data_share.t_op_letter_free.Filtered:=true;
end;
3:
begin
frm_data_share.t_op_letter_free.Filtered:=false;
frm_data_share.t_op_letter_free.requery;
frm_data_share.t_op_letter_free.Filter:='ÒµÎñÀà±ð='+''''+'¿ÕÔ˽ø¿Ú'+'''';
frm_data_share.t_op_letter_free.Filtered:=true;
end;
end;
end;
end.