|
|
|
|
unit u_info_law;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, bsSkinCtrls, StdCtrls, ComCtrls, DBCtrls, dxExEdtr, dxCntner,
|
|
|
|
|
dxTL, dxDBCtrl, dxDBGrid, DB, ADODB, Mask;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_info_law = class(TForm)
|
|
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
|
|
bsSkinPanel4: TbsSkinPanel;
|
|
|
|
|
DBRichEdit1: TDBRichEdit;
|
|
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
|
|
t_info_law: TADOQuery;
|
|
|
|
|
t_info_law1: TDataSource;
|
|
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
DBEdit1: TDBEdit;
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
DBEdit2: TDBEdit;
|
|
|
|
|
bsSkinButton12: TbsSkinButton;
|
|
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure DBEdit2KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
procedure t_info_lawBeforeInsert(DataSet: TDataSet);
|
|
|
|
|
procedure t_info_lawAfterInsert(DataSet: TDataSet);
|
|
|
|
|
procedure bsSkinPanel3Resize(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton12Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
procedure t_info_lawAfterPost(DataSet: TDataSet);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_info_law: Tfrm_info_law;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_main, my_sys_function;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_law.bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
t_info_law.insert;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_law.bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_post(t_info_law);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_law.bsSkinButton4Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_delete(t_info_law);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_law.bsSkinButton3Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_cancel(t_info_law);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_law.bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_law.FormShow(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
t_info_law.open;
|
|
|
|
|
dxdbgrid1.FullExpand;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_law.DBEdit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit2);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_law.DBEdit2KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if key=#13 then
|
|
|
|
|
begin
|
|
|
|
|
key:=#0;
|
|
|
|
|
DBRichEdit1.SetFocus;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_law.FormClose(Sender: TObject;
|
|
|
|
|
var Action: TCloseAction);
|
|
|
|
|
begin
|
|
|
|
|
frm_info_law.Hide;
|
|
|
|
|
frm_info_law.ManualFloat(frm_info_law.BoundsRect );
|
|
|
|
|
frm_main.freeTabs('frm_info_law');
|
|
|
|
|
action:=cafree;
|
|
|
|
|
frm_info_law:=nil;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_law.t_info_lawBeforeInsert(DataSet: TDataSet);
|
|
|
|
|
begin
|
|
|
|
|
if not t_info_law.IsEmpty then
|
|
|
|
|
DBEdit1.Hint:=t_info_law.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_law.t_info_lawAfterInsert(DataSet: TDataSet);
|
|
|
|
|
begin
|
|
|
|
|
t_info_law['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=DBEdit1.Hint;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_law.bsSkinPanel3Resize(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
i:integer;
|
|
|
|
|
begin
|
|
|
|
|
i:=round(bsSkinPanel3.Width/6);
|
|
|
|
|
bsSkinButton6.Width:=i;
|
|
|
|
|
bsSkinButton1.Width:=i;
|
|
|
|
|
bsSkinButton2.Width:=i;
|
|
|
|
|
bsSkinButton4.Width:=i;
|
|
|
|
|
bsSkinButton3.Width:=i;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_law.bsSkinButton12Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinButton12.Caption='չ <20><>' then
|
|
|
|
|
begin
|
|
|
|
|
dxdbgrid1.FullExpand;
|
|
|
|
|
bsSkinButton12.Caption:='<27><> <20><>';
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
dxdbgrid1.FullCollapse;
|
|
|
|
|
bsSkinButton12.Caption:='չ <20><>';
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_law.bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if not if_open('172') then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
bsSkinButton6.Enabled:=FALSE;
|
|
|
|
|
bsSkinButton1.Enabled:=true;
|
|
|
|
|
bsSkinButton2.Enabled:=true;
|
|
|
|
|
bsSkinButton4.Enabled:=true;
|
|
|
|
|
bsSkinButton3.Enabled:=true;
|
|
|
|
|
DBEdit1.ReadOnly:=false;
|
|
|
|
|
DBEdit2.ReadOnly:=false;
|
|
|
|
|
DBRichEdit1.ReadOnly:=false;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_law.t_info_lawAfterPost(DataSet: TDataSet);
|
|
|
|
|
begin
|
|
|
|
|
bsSkinButton6.Enabled:=true;
|
|
|
|
|
bsSkinButton1.Enabled:=FALSE;
|
|
|
|
|
bsSkinButton2.Enabled:=FALSE;
|
|
|
|
|
bsSkinButton4.Enabled:=FALSE;
|
|
|
|
|
bsSkinButton3.Enabled:=FALSE;
|
|
|
|
|
DBEdit1.ReadOnly:=true;
|
|
|
|
|
DBEdit2.ReadOnly:=true;
|
|
|
|
|
DBRichEdit1.ReadOnly:=true;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|