|
|
|
|
unit u_info_plan_brother;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, dxExEdtr, DB, ADODB, wwdbdatetimepicker, StdCtrls, DBCtrls,
|
|
|
|
|
RxLookup, wwdblook, Mask, bsSkinCtrls, dxDBGrid, dxDBTLCl, dxGrClms,
|
|
|
|
|
dxTL, dxDBCtrl, dxCntner, ExtCtrls;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_info_price_brother = class(TForm)
|
|
|
|
|
Panel1: TPanel;
|
|
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
|
|
bsSkinButton11: TbsSkinButton;
|
|
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
|
|
Notebook1: TNotebook;
|
|
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid120GP: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid140GP: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid140HQ: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid140RF: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid140RH: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid145HQ: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column36: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column37: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column38: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column39: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column41: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column42: TdxDBGridDateColumn;
|
|
|
|
|
dxDBGrid1Column43: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column44: TdxDBGridDateColumn;
|
|
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
|
|
Label21: TLabel;
|
|
|
|
|
RxDBLookupCombo20: TRxDBLookupCombo;
|
|
|
|
|
t_price_brother: TADOQuery;
|
|
|
|
|
t_price_brother1: TDataSource;
|
|
|
|
|
dxDBGrid1Column20: TdxDBGridColumn;
|
|
|
|
|
dxDBGrid1Column21: TdxDBGridColumn;
|
|
|
|
|
bsSkinPanel4: TbsSkinPanel;
|
|
|
|
|
Label9: TLabel;
|
|
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
|
|
Label20: TLabel;
|
|
|
|
|
wwDBLookupCombo3: TwwDBLookupCombo;
|
|
|
|
|
DBText1: TDBText;
|
|
|
|
|
DBEdit1: TDBEdit;
|
|
|
|
|
DBText2: TDBText;
|
|
|
|
|
DBEdit2: TDBEdit;
|
|
|
|
|
DBText3: TDBText;
|
|
|
|
|
DBEdit3: TDBEdit;
|
|
|
|
|
DBText6: TDBText;
|
|
|
|
|
DBEdit4: TDBEdit;
|
|
|
|
|
DBText5: TDBText;
|
|
|
|
|
DBEdit5: TDBEdit;
|
|
|
|
|
DBText4: TDBText;
|
|
|
|
|
DBEdit6: TDBEdit;
|
|
|
|
|
DBText7: TDBText;
|
|
|
|
|
DBEdit36: TDBEdit;
|
|
|
|
|
DBText8: TDBText;
|
|
|
|
|
DBEdit41: TDBEdit;
|
|
|
|
|
Label14: TLabel;
|
|
|
|
|
DBEdit31: TDBEdit;
|
|
|
|
|
Label17: TLabel;
|
|
|
|
|
DBEdit34: TDBEdit;
|
|
|
|
|
Label15: TLabel;
|
|
|
|
|
DBEdit32: TDBEdit;
|
|
|
|
|
Label16: TLabel;
|
|
|
|
|
DBEdit33: TDBEdit;
|
|
|
|
|
Label19: TLabel;
|
|
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
|
|
Label22: TLabel;
|
|
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
|
|
Label23: TLabel;
|
|
|
|
|
DBEdit38: TDBEdit;
|
|
|
|
|
Label24: TLabel;
|
|
|
|
|
DBEdit39: TDBEdit;
|
|
|
|
|
Label25: TLabel;
|
|
|
|
|
DBMemo1: TDBMemo;
|
|
|
|
|
Label13: TLabel;
|
|
|
|
|
wwDBLookupCombo52: TwwDBLookupCombo;
|
|
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
|
|
dxDBGrid2Column1: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid2Column2: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid2Column3: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid2Column4: TdxDBGridMaskColumn;
|
|
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton11Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton8Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
procedure t_price_brotherAfterInsert(DataSet: TDataSet);
|
|
|
|
|
procedure t_price_brotherBeforePost(DataSet: TDataSet);
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure Panel1Resize(Sender: TObject);
|
|
|
|
|
procedure dxDBGrid1CustomDrawCell(Sender: TObject; ACanvas: TCanvas;
|
|
|
|
|
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxTreeListColumn;
|
|
|
|
|
ASelected, AFocused, ANewItemRow: Boolean; var AText: String;
|
|
|
|
|
var AColor: TColor; AFont: TFont; var AAlignment: TAlignment;
|
|
|
|
|
var ADone: Boolean);
|
|
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
procedure t_price_brotherBeforeEdit(DataSet: TDataSet);
|
|
|
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
|
|
|
procedure RxDBLookupCombo20KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure RxDBLookupCombo2KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure RxDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure wwDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure DBEdit2KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure DBEdit3KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure DBEdit4KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure DBEdit5KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure DBEdit6KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure DBEdit36KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure DBEdit41KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure DBEdit31KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure DBEdit34KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure DBEdit32KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure DBEdit33KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure wwDBDateTimePicker1KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure wwDBDateTimePicker2KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure DBEdit38KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure DBEdit39KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
procedure wwDBLookupCombo52KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure bsSkinPanel3Resize(Sender: TObject);
|
|
|
|
|
procedure dxDBGrid2DblClick(Sender: TObject);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_info_price_brother: Tfrm_info_price_brother;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_main, u_data_share, my_sys_function, u_info_price_brother_query;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.FormClose(Sender: TObject;
|
|
|
|
|
var Action: TCloseAction);
|
|
|
|
|
begin
|
|
|
|
|
frm_info_price_brother.Hide;
|
|
|
|
|
frm_info_price_brother.ManualFloat(frm_info_price_brother.BoundsRect );
|
|
|
|
|
frm_main.freeTabs('frm_info_price_brother');
|
|
|
|
|
action:=cafree;
|
|
|
|
|
frm_info_price_brother:=nil;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.bsSkinButton7Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_Prior(t_price_brother);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_next(t_price_brother);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.bsSkinButton11Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_post(t_price_brother);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.bsSkinButton8Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_cancel(t_price_brother);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.bsSkinButton4Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_delete(t_price_brother);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
answer:TModalResult;
|
|
|
|
|
begin
|
|
|
|
|
if bsSkinButton10.Caption='<27>༭<EFBFBD><EFBFBD>' then
|
|
|
|
|
begin
|
|
|
|
|
Notebook1.PageIndex:=1;
|
|
|
|
|
bsSkinButton10.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
if (t_price_brother.State=dsinsert)or(t_price_brother.State=dsedit) then
|
|
|
|
|
BEGIN
|
|
|
|
|
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>ģ<DEB8><C4A3>Ƿ棿',mtWarning,mbYesNoCancel,0);
|
|
|
|
|
if answer=mrYes then
|
|
|
|
|
begin
|
|
|
|
|
t_price_brother.post;
|
|
|
|
|
end;
|
|
|
|
|
if answer=mrNo then
|
|
|
|
|
begin
|
|
|
|
|
t_price_brother.cancel;
|
|
|
|
|
end;
|
|
|
|
|
if answer=mrCancel then
|
|
|
|
|
begin
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
END;
|
|
|
|
|
Notebook1.PageIndex:=0;
|
|
|
|
|
bsSkinButton10.Caption:='<27>༭<EFBFBD><EFBFBD>';
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.bsSkinButton9Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
t_price_brother.insert;
|
|
|
|
|
Notebook1.PageIndex:=1;
|
|
|
|
|
bsSkinButton10.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.bsSkinButton3Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
afield : variant;
|
|
|
|
|
i: Integer;
|
|
|
|
|
begin
|
|
|
|
|
if t_price_brother.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
afield := vararraycreate([0,t_price_brother.fieldcount-1],varvariant);
|
|
|
|
|
for i := 0 to (t_price_brother.fieldcount-1) do
|
|
|
|
|
begin
|
|
|
|
|
afield[i] :=t_price_brother.fields[i].value ;
|
|
|
|
|
end;
|
|
|
|
|
t_price_brother.append;
|
|
|
|
|
for i := 1 to (t_price_brother.fieldcount-1) do
|
|
|
|
|
begin
|
|
|
|
|
if t_price_brother.fields[i].FieldName<>'<27>˼۱<CBBC><DBB1><EFBFBD>' then
|
|
|
|
|
t_price_brother.fields[i].value := afield[i] ;
|
|
|
|
|
end;
|
|
|
|
|
t_price_brother['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
|
|
t_price_brother['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
|
|
Notebook1.PageIndex:=1;
|
|
|
|
|
bsSkinButton10.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳɹ<D3B3><C9B9><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
sys_print('ͬ<><CDAC><EFBFBD>˼۴<CBBC>ӡ',2,t_price_brother1,frm_data_share.t_code_price_ctn1,nil,nil,t_price_brother1,nil,nil,nil,nil,nil,nil);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.t_price_brotherAfterInsert(
|
|
|
|
|
DataSet: TDataSet);
|
|
|
|
|
begin
|
|
|
|
|
t_price_brother['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
|
|
t_price_brother['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
|
|
t_price_brother['<27><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>']:=date;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.t_price_brotherBeforePost(
|
|
|
|
|
DataSet: TDataSet);
|
|
|
|
|
begin
|
|
|
|
|
table_before_post(t_price_brother,'<27><><EFBFBD><EFBFBD>˾');
|
|
|
|
|
table_before_post(t_price_brother,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾');
|
|
|
|
|
table_before_post(t_price_brother,'<27><><EFBFBD>˸<EFBFBD>');
|
|
|
|
|
table_before_post(t_price_brother,'Ŀ<>ĸ<EFBFBD>');
|
|
|
|
|
table_before_post(t_price_brother,'<27><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>');
|
|
|
|
|
table_before_post(t_price_brother,'<27><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.FormShow(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
t_price_brother.sql.Clear;
|
|
|
|
|
t_price_brother.sql.add('SELECT * FROM t_price_brother where <20><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>>=getdate()');
|
|
|
|
|
t_price_brother.sql.add(' and '+open_data('3004','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no'));
|
|
|
|
|
t_price_brother.sql.add(' order by <20>˼۱<CBBC><DBB1><EFBFBD>');
|
|
|
|
|
t_price_brother.open;
|
|
|
|
|
|
|
|
|
|
frm_data_share.t_code_price_ctn.requery;
|
|
|
|
|
|
|
|
|
|
if frm_data_share.t_code_price_ctn.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
if trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>1').asstring)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
dxDBGrid120GP.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>1').asstring);
|
|
|
|
|
dxDBGrid120GP.Visible:=true;
|
|
|
|
|
end;
|
|
|
|
|
if trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>2').asstring)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
dxDBGrid140GP.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>2').asstring);
|
|
|
|
|
dxDBGrid140GP.Visible:=true;
|
|
|
|
|
end;
|
|
|
|
|
if trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>3').asstring)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
dxDBGrid140HQ.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>3').asstring);
|
|
|
|
|
dxDBGrid140HQ.Visible:=true;
|
|
|
|
|
end;
|
|
|
|
|
if trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>4').asstring)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
dxDBGrid140RF.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>4').asstring);
|
|
|
|
|
dxDBGrid140RF.Visible:=true;
|
|
|
|
|
end;
|
|
|
|
|
if trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>5').asstring)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
dxDBGrid140RH.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>5').asstring);
|
|
|
|
|
dxDBGrid140RH.Visible:=true;
|
|
|
|
|
end;
|
|
|
|
|
if trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>6').asstring)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
dxDBGrid145HQ.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>6').asstring);
|
|
|
|
|
dxDBGrid145HQ.Visible:=true;
|
|
|
|
|
end;
|
|
|
|
|
if trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>7').asstring)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
dxDBGrid1Column20.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>7').asstring);
|
|
|
|
|
dxDBGrid1Column20.Visible:=true;
|
|
|
|
|
end;
|
|
|
|
|
if trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>8').asstring)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
dxDBGrid1Column21.Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>8').asstring);
|
|
|
|
|
dxDBGrid1Column21.Visible:=true;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.Panel1Resize(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
i:integer;
|
|
|
|
|
begin
|
|
|
|
|
i:=round(Panel1.Width/11);
|
|
|
|
|
bsSkinButton5.Width:=i;
|
|
|
|
|
bsSkinButton7.Width:=i;
|
|
|
|
|
bsSkinButton6.Width:=i;
|
|
|
|
|
bsSkinButton2.Width:=i;
|
|
|
|
|
bsSkinButton3.Width:=i;
|
|
|
|
|
bsSkinButton10.Width:=i;
|
|
|
|
|
bsSkinButton11.Width:=i;
|
|
|
|
|
bsSkinButton4.Width:=i;
|
|
|
|
|
bsSkinButton8.Width:=i;
|
|
|
|
|
bsSkinButton1.Width:=i;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.dxDBGrid1CustomDrawCell(Sender: TObject;
|
|
|
|
|
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
|
|
|
|
|
AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean;
|
|
|
|
|
var AText: String; var AColor: TColor; AFont: TFont;
|
|
|
|
|
var AAlignment: TAlignment; var ADone: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
if strtodatetime(ANode.Strings[dxDBGrid1Column42.Index])<date then
|
|
|
|
|
AColor:=clBtnFace;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
try
|
|
|
|
|
frm_info_price_brother_query:=tfrm_info_price_brother_query.Create (self);
|
|
|
|
|
frm_info_price_brother_query.ShowModal;
|
|
|
|
|
finally
|
|
|
|
|
frm_info_price_brother_query.Free;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.t_price_brotherBeforeEdit(
|
|
|
|
|
DataSet: TDataSet);
|
|
|
|
|
begin
|
|
|
|
|
if do_data('3004',t_price_brother.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'','','','','')=false then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
|
|
|
|
|
abort;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.FormCloseQuery(Sender: TObject;
|
|
|
|
|
var CanClose: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
CanClose:=frm_close_query(t_price_brother);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.RxDBLookupCombo20KeyPress(
|
|
|
|
|
Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo2);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.RxDBLookupCombo2KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.RxDBLookupCombo1KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo3);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.wwDBLookupCombo3KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo52);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.DBEdit1KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit2);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.DBEdit2KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit3);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.DBEdit3KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit4);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.DBEdit4KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit5);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.DBEdit5KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit6);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.DBEdit6KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit36);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.DBEdit36KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit41);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.DBEdit41KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit31);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.DBEdit31KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit34);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.DBEdit34KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit32);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.DBEdit32KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit33);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.DBEdit33KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_wwDBDateTimePicker(Key,wwDBDateTimePicker1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.wwDBDateTimePicker1KeyPress(
|
|
|
|
|
Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_wwDBDateTimePicker(Key,wwDBDateTimePicker2);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.wwDBDateTimePicker2KeyPress(
|
|
|
|
|
Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit38);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.DBEdit38KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit39);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.DBEdit39KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBMemo(Key,DBMemo1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
Column_sort(Column,t_price_brother,'<27>˼۱<CBBC><DBB1><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.wwDBLookupCombo52KeyPress(
|
|
|
|
|
Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
key_DBEdit(Key,DBEdit1);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.bsSkinPanel3Resize(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
wwDBLookupCombo52.Width:=bsSkinPanel3.Width;
|
|
|
|
|
RxDBLookupCombo20.Width:=bsSkinPanel3.Width-RxDBLookupCombo20.left;
|
|
|
|
|
Label13.Left:=round((bsSkinPanel3.Width-Label13.Width)/2);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_price_brother.dxDBGrid2DblClick(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
if frm_data_share.t_code_disport.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
if t_price_brother.IsEmpty then
|
|
|
|
|
exit;
|
|
|
|
|
t_price_brother.edit;
|
|
|
|
|
t_price_brother['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_disport['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_price_brother['Ŀ<>ĸ<EFBFBD>']:=frm_data_share.t_code_disport['Ӣ<><D3A2><EFBFBD><EFBFBD>'];
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|