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.

205 lines
5.7 KiB
Plaintext

11 months ago
unit u_info_price_person;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, ExtCtrls, dxExEdtr, dxCntner, dxTL, dxDBCtrl,
dxDBGrid, DB, ADODB, dxDBTLCl, dxGrClms, StdCtrls, Mask, wwdbedit,
Wwdotdot, Wwdbcomb, DBCtrls, wwdblook, RxLookup, ComCtrls,
wwdbdatetimepicker;
type
Tfrm_info_price_person = class(TForm)
Panel1: TPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
Panel2: TPanel;
dxDBGrid1: TdxDBGrid;
t_price_prerson: TADOQuery;
t_price_prerson1: TDataSource;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
bsSkinPanel1: TbsSkinPanel;
bsSkinButton3: TbsSkinButton;
bsSkinPanel2: TbsSkinPanel;
Label1: TLabel;
wwDBComboBox1: TwwDBComboBox;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
wwDBLookupCombo52: TwwDBLookupCombo;
bsSkinGroupBox1: TbsSkinGroupBox;
DBRichEdit1: TDBRichEdit;
dxDBGrid1Column4: TdxDBGridColumn;
wwDBDateTimePicker1: TwwDBDateTimePicker;
dxDBGrid1Column5: TdxDBGridColumn;
dxDBGrid1Column6: TdxDBGridColumn;
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure t_price_prersonAfterInsert(DataSet: TDataSet);
procedure t_price_prersonBeforePost(DataSet: TDataSet);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure Panel1Resize(Sender: TObject);
procedure bsSkinPanel2Resize(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure t_price_prersonBeforeEdit(DataSet: TDataSet);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_info_price_person: Tfrm_info_price_person;
implementation
uses u_main, u_data_share, my_sys_function, u_info_price_person_query;
{$R *.dfm}
procedure Tfrm_info_price_person.FormShow(Sender: TObject);
begin
t_price_prerson.Parameters.ParamByName('¼<><C2BC><EFBFBD><EFBFBD>').Value:=employee;
t_price_prerson.Open;
frm_data_share.t_crm_client_all.requery;
frm_data_share.t_code_disport.requery;
end;
procedure Tfrm_info_price_person.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_info_price_person.Hide;
frm_info_price_person.ManualFloat(frm_info_price_person.BoundsRect );
frm_main.freeTabs('frm_info_price_person');
action:=cafree;
frm_info_price_person:=nil;
end;
procedure Tfrm_info_price_person.t_price_prersonAfterInsert(
DataSet: TDataSet);
begin
t_price_prerson['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_price_prerson['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
end;
procedure Tfrm_info_price_person.t_price_prersonBeforePost(
DataSet: TDataSet);
begin
table_before_post(t_price_prerson,'<27>ո<EFBFBD><D5B8><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_price_prerson,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_price_prerson,'<27>˼<EFBFBD>˵<EFBFBD><CBB5>');
table_before_post(t_price_prerson,'<27><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>');
end;
procedure Tfrm_info_price_person.bsSkinButton9Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_info_price_person.bsSkinButton2Click(Sender: TObject);
begin
t_price_prerson.insert;
end;
procedure Tfrm_info_price_person.bsSkinButton11Click(Sender: TObject);
begin
table_post(t_price_prerson);
end;
procedure Tfrm_info_price_person.bsSkinButton4Click(Sender: TObject);
begin
table_delete(t_price_prerson);
end;
procedure Tfrm_info_price_person.bsSkinButton8Click(Sender: TObject);
begin
table_cancel(t_price_prerson);
end;
procedure Tfrm_info_price_person.Panel1Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel1.width/8);
bsSkinButton5.width:=i;
bsSkinButton1.width:=i;
bsSkinButton2.width:=i;
bsSkinButton3.width:=i;
bsSkinButton11.width:=i;
bsSkinButton4.width:=i;
bsSkinButton8.width:=i;
end;
procedure Tfrm_info_price_person.bsSkinPanel2Resize(Sender: TObject);
begin
RxDBLookupCombo2.Width:=bsSkinPanel2.Width-RxDBLookupCombo2.Left-6;
wwDBLookupCombo52.Width:=bsSkinPanel2.Width-wwDBLookupCombo52.Left-6;
end;
procedure Tfrm_info_price_person.bsSkinButton3Click(Sender: TObject);
var
afield : variant;
i: Integer;
begin
if t_price_prerson.IsEmpty then
begin
showmessage('û<>и<EFBFBD><D0B8><EFBFBD>ĸ<EFBFBD><EFBFBD><E5A3AC><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD><EFBFBD>½<EFBFBD><C2BD><EFBFBD>');
exit;
end;
afield := vararraycreate([0,t_price_prerson.fieldcount-1],varvariant);
for i := 1 to (t_price_prerson.fieldcount-1) do
begin
afield[i] :=t_price_prerson.fields[i].value ;
end;
t_price_prerson.append;
for i := 1 to (t_price_prerson.fieldcount-1) do
begin
t_price_prerson.fields[i].value := afield[i] ;
end;
showmessage('<27><><EFBFBD>Ƴɹ<C6B3><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_info_price_person.bsSkinButton5Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD><EFBFBD><EFBFBD>˼۴<CBBC>ӡ',2,t_price_prerson1,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_info_price_person.bsSkinButton1Click(Sender: TObject);
begin
try
frm_info_price_person_query:=tfrm_info_price_person_query.Create (self);
frm_info_price_person_query.ShowModal;
finally
frm_info_price_person_query.Free;
frm_info_price_person_query:=nil;
end;
end;
procedure Tfrm_info_price_person.t_price_prersonBeforeEdit(
DataSet: TDataSet);
begin
if not do_data('3008',t_price_prerson.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,'','','','','') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸<EFBFBD><DEB8><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
abort;
end;
end;
end.