|
|
unit u_info_price_manage;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, ExtCtrls, bsSkinCtrls, DB, ADODB, Grids, Wwdbigrd, Wwdbgrid,
|
|
|
StdCtrls, wwdblook, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid,
|
|
|
dxDBTLCl, dxGrClms, Mask, DBCtrls, RxLookup, wwdbdatetimepicker, Wwkeycb,
|
|
|
ComCtrls, bsSkinTabs, Menus, XPMenu, bsdbctrls, wwdbedit, Wwdotdot,
|
|
|
Wwdbcomb,inifiles;
|
|
|
|
|
|
type
|
|
|
Tfrm_info_price_manage = class(TForm)
|
|
|
Panel1: TPanel;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinButton11: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
t_price_ship: TADOQuery;
|
|
|
t_price_ship1: TDataSource;
|
|
|
Notebook1: TNotebook;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
t_price_agreement: TADOQuery;
|
|
|
t_price_agreement1: TDataSource;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
bsSkinPanel4: TbsSkinPanel;
|
|
|
Label1: TLabel;
|
|
|
Label2: TLabel;
|
|
|
Label3: TLabel;
|
|
|
Label4: TLabel;
|
|
|
Label5: TLabel;
|
|
|
DBText1: TDBText;
|
|
|
DBText2: TDBText;
|
|
|
DBText3: TDBText;
|
|
|
DBText6: TDBText;
|
|
|
DBText5: TDBText;
|
|
|
DBText4: TDBText;
|
|
|
DBText7: TDBText;
|
|
|
DBText8: TDBText;
|
|
|
Label14: TLabel;
|
|
|
Label15: TLabel;
|
|
|
Label16: TLabel;
|
|
|
Label17: TLabel;
|
|
|
Label18: TLabel;
|
|
|
Label19: TLabel;
|
|
|
Label22: TLabel;
|
|
|
Label23: TLabel;
|
|
|
Label24: TLabel;
|
|
|
Label25: TLabel;
|
|
|
Label20: TLabel;
|
|
|
Label9: TLabel;
|
|
|
Label21: TLabel;
|
|
|
Label6: TLabel;
|
|
|
Label13: TLabel;
|
|
|
DBEdit1: TDBEdit;
|
|
|
DBEdit7: TDBEdit;
|
|
|
DBEdit13: TDBEdit;
|
|
|
DBEdit19: TDBEdit;
|
|
|
DBEdit25: TDBEdit;
|
|
|
DBEdit2: TDBEdit;
|
|
|
DBEdit8: TDBEdit;
|
|
|
DBEdit14: TDBEdit;
|
|
|
DBEdit20: TDBEdit;
|
|
|
DBEdit26: TDBEdit;
|
|
|
DBEdit3: TDBEdit;
|
|
|
DBEdit9: TDBEdit;
|
|
|
DBEdit15: TDBEdit;
|
|
|
DBEdit21: TDBEdit;
|
|
|
DBEdit27: TDBEdit;
|
|
|
DBEdit4: TDBEdit;
|
|
|
DBEdit10: TDBEdit;
|
|
|
DBEdit16: TDBEdit;
|
|
|
DBEdit22: TDBEdit;
|
|
|
DBEdit28: TDBEdit;
|
|
|
DBEdit5: TDBEdit;
|
|
|
DBEdit11: TDBEdit;
|
|
|
DBEdit17: TDBEdit;
|
|
|
DBEdit23: TDBEdit;
|
|
|
DBEdit29: TDBEdit;
|
|
|
DBEdit6: TDBEdit;
|
|
|
DBEdit12: TDBEdit;
|
|
|
DBEdit18: TDBEdit;
|
|
|
DBEdit24: TDBEdit;
|
|
|
DBEdit30: TDBEdit;
|
|
|
DBEdit36: TDBEdit;
|
|
|
DBEdit37: TDBEdit;
|
|
|
DBEdit42: TDBEdit;
|
|
|
DBEdit44: TDBEdit;
|
|
|
DBEdit46: TDBEdit;
|
|
|
DBEdit41: TDBEdit;
|
|
|
DBEdit40: TDBEdit;
|
|
|
DBEdit43: TDBEdit;
|
|
|
DBEdit45: TDBEdit;
|
|
|
DBEdit47: TDBEdit;
|
|
|
DBEdit31: TDBEdit;
|
|
|
DBEdit32: TDBEdit;
|
|
|
DBEdit33: TDBEdit;
|
|
|
DBEdit34: TDBEdit;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
bsSkinButton12: TbsSkinButton;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
DBEdit38: TDBEdit;
|
|
|
DBEdit39: TDBEdit;
|
|
|
DBMemo1: TDBMemo;
|
|
|
wwDBLookupCombo3: TwwDBLookupCombo;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo20: TRxDBLookupCombo;
|
|
|
wwDBLookupCombo1: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo52: TwwDBLookupCombo;
|
|
|
bsSkinPanel5: TbsSkinPanel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
Label7: TLabel;
|
|
|
wwDBLookupCombo2: TwwDBLookupCombo;
|
|
|
Label124: TLabel;
|
|
|
wwDBLookupCombo4: TwwDBLookupCombo;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column55: TdxDBGridColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid120GP: TdxDBGridMaskColumn;
|
|
|
dxDBGrid140GP: TdxDBGridMaskColumn;
|
|
|
dxDBGrid140HQ: TdxDBGridMaskColumn;
|
|
|
dxDBGrid140RF: TdxDBGridMaskColumn;
|
|
|
dxDBGrid140RH: TdxDBGridMaskColumn;
|
|
|
dxDBGrid145HQ: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column14: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column15: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column17: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column18: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column19: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column20: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column21: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column22: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column23: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column24: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column25: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column26: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column27: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column28: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column29: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column30: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column31: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column32: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column33: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column34: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column35: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column36: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column37: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column38: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column39: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column40: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column41: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column42: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column43: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column44: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column45: TdxDBGridColumn;
|
|
|
dxDBGrid1Column46: TdxDBGridColumn;
|
|
|
dxDBGrid1Column47: TdxDBGridColumn;
|
|
|
dxDBGrid1Column48: TdxDBGridColumn;
|
|
|
dxDBGrid1Column49: TdxDBGridColumn;
|
|
|
dxDBGrid1Column50: TdxDBGridColumn;
|
|
|
dxDBGrid1Column51: TdxDBGridColumn;
|
|
|
dxDBGrid1Column52: TdxDBGridColumn;
|
|
|
dxDBGrid1Column53: TdxDBGridColumn;
|
|
|
dxDBGrid1Column54: TdxDBGridColumn;
|
|
|
Edit1: TEdit;
|
|
|
Label11: TLabel;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
Label8: TLabel;
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
Label10: TLabel;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
N13: TMenuItem;
|
|
|
N12: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
N73: TMenuItem;
|
|
|
N48: TMenuItem;
|
|
|
lockshut: TbsSkinButton;
|
|
|
lockopen: TbsSkinButton;
|
|
|
dxDBGrid1Column56: TdxDBGridColumn;
|
|
|
dxDBGrid1Column57: TdxDBGridCheckColumn;
|
|
|
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
|
|
|
dxDBGrid1Column58: TdxDBGridColumn;
|
|
|
DBEdit35: TDBEdit;
|
|
|
Label12: TLabel;
|
|
|
XPMenu1: TXPMenu;
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
N1: TMenuItem;
|
|
|
N2: TMenuItem;
|
|
|
PopupMenu3: TPopupMenu;
|
|
|
N3: TMenuItem;
|
|
|
N4: TMenuItem;
|
|
|
qryprice1: TADOQuery;
|
|
|
qryprice2: TADOQuery;
|
|
|
qryprice3: TADOQuery;
|
|
|
t_price_shipDSDesigner: TAutoIncField;
|
|
|
t_price_shipDSDesigner2: TStringField;
|
|
|
t_price_shipDSDesigner3: TStringField;
|
|
|
t_price_shipDSDesigner4: TStringField;
|
|
|
t_price_shipDSDesigner5: TStringField;
|
|
|
t_price_shipDSDesigner1: TStringField;
|
|
|
t_price_shipDSDesigner22: TStringField;
|
|
|
t_price_shipDSDesigner32: TStringField;
|
|
|
t_price_shipDSDesigner42: TStringField;
|
|
|
t_price_shipDSDesigner52: TStringField;
|
|
|
t_price_shipDSDesigner6: TStringField;
|
|
|
t_price_shipDSDesigner7: TStringField;
|
|
|
t_price_shipDSDesigner8: TStringField;
|
|
|
t_price_shipDSDesigner12: TStringField;
|
|
|
t_price_shipDSDesigner23: TStringField;
|
|
|
t_price_shipDSDesigner33: TStringField;
|
|
|
t_price_shipDSDesigner43: TStringField;
|
|
|
t_price_shipDSDesigner53: TStringField;
|
|
|
t_price_shipDSDesigner62: TStringField;
|
|
|
t_price_shipDSDesigner72: TStringField;
|
|
|
t_price_shipDSDesigner82: TStringField;
|
|
|
t_price_shipDSDesigner13: TStringField;
|
|
|
t_price_shipDSDesigner24: TStringField;
|
|
|
t_price_shipDSDesigner34: TStringField;
|
|
|
t_price_shipDSDesigner44: TStringField;
|
|
|
t_price_shipDSDesigner54: TStringField;
|
|
|
t_price_shipDSDesigner63: TStringField;
|
|
|
t_price_shipDSDesigner73: TStringField;
|
|
|
t_price_shipDSDesigner83: TStringField;
|
|
|
t_price_shipDSDesigner14: TStringField;
|
|
|
t_price_shipDSDesigner25: TStringField;
|
|
|
t_price_shipDSDesigner35: TStringField;
|
|
|
t_price_shipDSDesigner45: TStringField;
|
|
|
t_price_shipDSDesigner55: TStringField;
|
|
|
t_price_shipDSDesigner64: TStringField;
|
|
|
t_price_shipDSDesigner74: TStringField;
|
|
|
t_price_shipDSDesigner84: TStringField;
|
|
|
t_price_shipDSDesigner15: TStringField;
|
|
|
t_price_shipDSDesigner26: TStringField;
|
|
|
t_price_shipDSDesigner36: TStringField;
|
|
|
t_price_shipDSDesigner46: TStringField;
|
|
|
t_price_shipDSDesigner56: TStringField;
|
|
|
t_price_shipDSDesigner65: TStringField;
|
|
|
t_price_shipDSDesigner75: TStringField;
|
|
|
t_price_shipDSDesigner85: TStringField;
|
|
|
t_price_shipDSDesigner9: TStringField;
|
|
|
t_price_shipDSDesigner10: TStringField;
|
|
|
t_price_shipDSDesigner11: TStringField;
|
|
|
t_price_shipDSDesigner16: TStringField;
|
|
|
t_price_shipDSDesigner17: TStringField;
|
|
|
t_price_shipDSDesigner18: TDateTimeField;
|
|
|
t_price_shipDSDesigner19: TDateTimeField;
|
|
|
t_price_shipDSDesigner20: TStringField;
|
|
|
t_price_shipDSDesigner21: TDateTimeField;
|
|
|
t_price_shipDSDesigner27: TStringField;
|
|
|
t_price_shipDSDesigner28: TStringField;
|
|
|
t_price_shipDSDesigner29: TBooleanField;
|
|
|
t_price_shipDSDesigner30: TStringField;
|
|
|
qryprice01: TADOQuery;
|
|
|
qryprice02: TADOQuery;
|
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
|
Label26: TLabel;
|
|
|
Label27: TLabel;
|
|
|
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
|
|
|
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_shipAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_price_shipBeforePost(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 bsSkinButton12Click(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure t_price_shipBeforeEdit(DataSet: TDataSet);
|
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
|
procedure RxDBLookupCombo20KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo2KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit7KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit13KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit19KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit25KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit2KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit8KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit14KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit20KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit26KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit3KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit9KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit15KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit21KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit27KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit4KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit10KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit16KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit22KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit28KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit5KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit11KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit17KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit23KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit29KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit6KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit12KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit18KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit24KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit30KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit36KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit37KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit42KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit44KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit46KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit41KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit40KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit43KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit45KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit47KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit31KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit33KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit34KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo1KeyPress(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);
|
|
|
procedure wwDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBLookupCombo52Exit(Sender: TObject);
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
procedure t_price_ship1DataChange(Sender: TObject; Field: TField);
|
|
|
procedure DBEdit35KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit32KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure bbhh1Click(Sender: TObject);
|
|
|
procedure N1Click(Sender: TObject);
|
|
|
procedure N2Click(Sender: TObject);
|
|
|
procedure N3Click(Sender: TObject);
|
|
|
procedure N4Click(Sender: TObject);
|
|
|
procedure lockshutClick(Sender: TObject);
|
|
|
procedure lockopenClick(Sender: TObject);
|
|
|
procedure dxDBGrid1DblClick(Sender: TObject);
|
|
|
procedure t_price_shipDSDesigner13GetText(Sender: TField;
|
|
|
var Text: String; DisplayText: Boolean);
|
|
|
procedure t_price_shipDSDesigner14GetText(Sender: TField;
|
|
|
var Text: String; DisplayText: Boolean);
|
|
|
procedure DBEdit13Enter(Sender: TObject);
|
|
|
procedure DBEdit19Enter(Sender: TObject);
|
|
|
procedure DBEdit25Enter(Sender: TObject);
|
|
|
procedure t_price_shipDSDesigner15GetText(Sender: TField;
|
|
|
var Text: String; DisplayText: Boolean);
|
|
|
procedure t_price_shipDSDesigner1GetText(Sender: TField;
|
|
|
var Text: String; DisplayText: Boolean);
|
|
|
procedure t_price_shipDSDesigner12GetText(Sender: TField;
|
|
|
var Text: String; DisplayText: Boolean);
|
|
|
procedure DBEdit1Enter(Sender: TObject);
|
|
|
procedure DBEdit7Enter(Sender: TObject);
|
|
|
procedure wwDBLookupCombo1Exit(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
procedure setbandview ;
|
|
|
procedure loadFindIni ;
|
|
|
procedure writeFindIni ;
|
|
|
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_info_price_manage: Tfrm_info_price_manage;
|
|
|
info_price_manage_do1,info_price_manage_do2:boolean;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, u_data_share, my_sys_function, u_info_price_query,
|
|
|
u_info_price_agreeview;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_info_price_manage.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
|
|
|
savereggrid(dxdbgrid1,caption+'1');
|
|
|
frm_info_price_manage.Hide;
|
|
|
frm_info_price_manage.ManualFloat(frm_info_price_manage.BoundsRect );
|
|
|
frm_main.freeTabs('frm_info_price_manage');
|
|
|
action:=cafree;
|
|
|
frm_info_price_manage:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.bsSkinButton7Click(Sender: TObject);
|
|
|
begin
|
|
|
table_Prior(t_price_ship);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
table_next(t_price_ship);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.bsSkinButton11Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_price_ship);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.bsSkinButton8Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_price_ship);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_price_ship);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.bsSkinButton10Click(Sender: TObject);
|
|
|
var
|
|
|
str,str_tiaojian:String;
|
|
|
begin
|
|
|
IF TRIM(Edit1.TEXT)=''THEN
|
|
|
EXIT;
|
|
|
str_tiaojian:=' like '+''''+'%'+TRIM(Edit1.TEXT)+'%'+'''';
|
|
|
str:='where Ŀ<>ĸ<EFBFBD>'+str_tiaojian;
|
|
|
str:=str+' or Ŀ<>ĸ<EFBFBD><C4B8><EFBFBD><EFBFBD><EFBFBD>'+str_tiaojian;
|
|
|
str:=str+' or <20><><EFBFBD>˸<EFBFBD>'+str_tiaojian;
|
|
|
str:=str+' or <20><><EFBFBD><EFBFBD>'+str_tiaojian;
|
|
|
str:=str+' or <20><><EFBFBD><EFBFBD>˾'+str_tiaojian;
|
|
|
str:=str+' or <20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>'+str_tiaojian;
|
|
|
str:=str+' or <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>'+str_tiaojian;
|
|
|
str:=str+' or <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>'+str_tiaojian;
|
|
|
str:=Str+' and '+open_data('3001','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no');
|
|
|
|
|
|
// str:=str+' or ʡ<><CAA1>'+str_tiaojian;
|
|
|
t_price_ship.close;
|
|
|
t_price_ship.sql.Clear;
|
|
|
t_price_ship.sql.add('select * from t_price_ship ');
|
|
|
t_price_ship.sql.add(str);
|
|
|
t_price_ship.sql.add(' order by <20>˼۱<CBBC><DBB1><EFBFBD>');
|
|
|
t_price_ship.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
t_price_ship.insert;
|
|
|
bsSkinPageControl1.activePageIndex:=1;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.bsSkinButton3Click(Sender: TObject);
|
|
|
var
|
|
|
afield : variant;
|
|
|
i: Integer;
|
|
|
begin
|
|
|
if t_price_ship.IsEmpty then
|
|
|
exit;
|
|
|
if t_price_ship['¼<><C2BC><EFBFBD><EFBFBD>']<>employee then
|
|
|
begin
|
|
|
showmessage('¼<><C2BC><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>'+employee+'<27><><EFBFBD><EFBFBD>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>');
|
|
|
exit ;
|
|
|
end;
|
|
|
afield := vararraycreate([0,t_price_ship.fieldcount-1],varvariant);
|
|
|
for i := 0 to (t_price_ship.fieldcount-1) do
|
|
|
begin
|
|
|
afield[i] :=t_price_ship.fields[i].value ;
|
|
|
end;
|
|
|
t_price_ship.append;
|
|
|
for i := 1 to (t_price_ship.fieldcount-1) do
|
|
|
begin
|
|
|
if t_price_ship.fields[i].FieldName<>'<27>˼۱<CBBC><DBB1><EFBFBD>' then
|
|
|
if t_price_ship.fields[i].FieldName='<27><><EFBFBD><EFBFBD>' then
|
|
|
t_price_ship.fields[i].value := 0 else
|
|
|
t_price_ship.fields[i].value := afield[i] ;
|
|
|
end;
|
|
|
t_price_ship['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_price_ship['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
bsSkinPageControl1.activePageIndex:=1;
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳɹ<D3B3><C9B9><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
sys_print('<27><>Լ<EFBFBD>˼۴<CBBC>ӡ',2,t_price_ship1,frm_data_share.t_code_price_ctn1,nil,nil,t_price_ship1,nil,nil,nil,nil,nil,nil);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.t_price_shipAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_price_ship['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_price_ship['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
t_price_ship['<27><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>']:=date;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.t_price_shipBeforePost(DataSet: TDataSet);
|
|
|
begin
|
|
|
table_before_post(t_price_ship,'<27><><EFBFBD><EFBFBD>˾');
|
|
|
table_before_post(t_price_ship,'<27><><EFBFBD>˸<EFBFBD>');
|
|
|
table_before_post(t_price_ship,'Ŀ<>ĸ<EFBFBD>');
|
|
|
table_before_post(t_price_ship,'<27><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_price_ship,'<27><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
|
|
|
qryprice1.Close ;
|
|
|
qryprice1.Parameters.ParamByName('myname').Value:=employee ;
|
|
|
qryprice1.Open ;
|
|
|
|
|
|
qryprice2.Close ;
|
|
|
qryprice2.Parameters.ParamByName('myname').Value:=employee ;
|
|
|
qryprice2.Open ;
|
|
|
|
|
|
qryprice3.Close ;
|
|
|
qryprice3.Parameters.ParamByName('myname').Value:=employee ;
|
|
|
qryprice3.Open ;
|
|
|
|
|
|
qryprice01.Close ;
|
|
|
qryprice01.Parameters.ParamByName('myname').Value:=employee ;
|
|
|
qryprice01.Open ;
|
|
|
|
|
|
qryprice02.Close ;
|
|
|
qryprice02.Parameters.ParamByName('myname').Value:=employee ;
|
|
|
qryprice02.Open ;
|
|
|
|
|
|
t_price_ship.sql.Clear;
|
|
|
t_price_ship.sql.add('SELECT * FROM t_price_ship where 1=1 ');
|
|
|
t_price_ship.sql.add(' and '+open_data('3001','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no'));
|
|
|
t_price_ship.sql.add(' order by <20>˼۱<CBBC><DBB1><EFBFBD>');
|
|
|
t_price_ship.open;
|
|
|
|
|
|
t_price_agreement.open;
|
|
|
setbandview ;
|
|
|
loadreggrid(dxdbgrid1,true,caption+'1');
|
|
|
loadFindIni;
|
|
|
{
|
|
|
wwDBComboBox20.Items.IndexOf(FormatDateTime('YYYY',Now));
|
|
|
wwDBComboBox20.Text:=FormatDateTime('YYYY',Now);
|
|
|
Edit2.Text:=IntToStr(WeekofYear(Now));
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.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;
|
|
|
bsSkinButton11.Width:=i;
|
|
|
bsSkinButton4.Width:=i;
|
|
|
bsSkinButton8.Width:=i;
|
|
|
lockshut.Width:=i ;
|
|
|
lockopen.width:=i ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.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_manage.bsSkinButton12Click(Sender: TObject);
|
|
|
begin
|
|
|
if RxDBLookupCombo1.DisplayValue='' then
|
|
|
exit;
|
|
|
if t_price_agreement.Locate('<27><>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD>',RxDBLookupCombo1.DisplayValue,[])then
|
|
|
begin
|
|
|
try
|
|
|
frm_info_price_agreeview:=tfrm_info_price_agreeview.Create (self);
|
|
|
frm_info_price_agreeview.ShowModal;
|
|
|
finally
|
|
|
frm_info_price_agreeview.Free;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
str:widestring;
|
|
|
FirstweekDay,endWeekday,aPerWeek: TDate;
|
|
|
i:integer;
|
|
|
begin
|
|
|
|
|
|
str:='SELECT * FROM t_price_ship where 1=1 ';
|
|
|
str:=Str+' and '+open_data('3001','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no');
|
|
|
if wwDBLookupCombo2.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD>˸<EFBFBD> like '+''''+'%'+wwDBLookupCombo2.text+'%'+'''';
|
|
|
if wwDBLookupCombo4.text<>''then
|
|
|
str:=str+' and Ŀ<>ĸ<EFBFBD> like '+''''+'%'+wwDBLookupCombo4.text+'%'+'''';
|
|
|
if RxDBLookupCombo3.DisplayValue<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD>˾='+''''+RxDBLookupCombo3.KeyValue+'''';
|
|
|
if RxDBLookupCombo4.DisplayValue<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo4.KeyValue+'''';
|
|
|
if (wwDBDateTimePicker3.Text<>'') and (wwDBDateTimePicker4.text<>'') then begin
|
|
|
str:=str+' and <20><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>>='+''''+FormatDateTime('YYYY-MM-DD',wwDBDateTimePicker3.date)+'''';
|
|
|
str:=str+' and <20><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD><='+''''+FormatDateTime('YYYY-MM-DD',wwDBDateTimePicker4.date)+'''';
|
|
|
|
|
|
{
|
|
|
aPerWeek:=dayofW(wwDBComboBox20.Text,strtoint(edit2.text));
|
|
|
i:=DayOfWeek(aPerWeek);
|
|
|
FirstweekDay:=aPerWeek-(i-2);
|
|
|
endWeekday:=FirstweekDay+6;
|
|
|
str:=str+' and <20><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>>='+''''+FormatDateTime('YYYY-MM-DD',FirstweekDay)+'''';
|
|
|
str:=str+' and <20><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD><='+''''+FormatDateTime('YYYY-MM-DD',endWeekday)+'''';
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
t_price_ship.close;
|
|
|
t_price_ship.sql.Clear;
|
|
|
t_price_ship.sql.add(str);
|
|
|
t_price_ship.sql.add(' order by <20>˼۱<CBBC><DBB1><EFBFBD>');
|
|
|
t_price_ship.open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.t_price_shipBeforeEdit(DataSet: TDataSet);
|
|
|
begin
|
|
|
if do_data('3001',t_price_ship.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_manage.FormCloseQuery(Sender: TObject;
|
|
|
var CanClose: Boolean);
|
|
|
begin
|
|
|
writeFindIni;
|
|
|
CanClose:=frm_close_query(t_price_ship);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.RxDBLookupCombo20KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.RxDBLookupCombo2KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit33);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.wwDBLookupCombo3KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo52);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit7);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit7KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit13);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit13KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit19);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit19KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit25);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit25KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit2KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit8);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit8KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit14);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit14KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit20);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit20KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit26);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit26KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit3);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit3KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit9);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit9KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit15);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit15KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit21);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit21KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit27);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit27KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit4);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit4KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit10);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit10KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit16);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit16KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit22);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit22KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit28);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit28KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit5);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit5KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit11);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit11KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit17);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit17KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit23);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit23KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit29);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit29KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit6);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit6KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit12);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit12KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit18);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit18KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit24);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit24KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit30);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit30KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit36);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit36KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit37);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit37KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit42);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit42KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit44);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit44KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit46);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit46KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit41);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit41KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit40);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit40KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit43);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit43KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit45);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit45KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit47);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit47KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit31);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit31KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit33KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit34);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit34KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit32);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.RxDBLookupCombo1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBDateTimePicker(Key,wwDBDateTimePicker1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.wwDBDateTimePicker1KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_wwDBDateTimePicker(Key,wwDBDateTimePicker2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.wwDBDateTimePicker2KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit38);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit38KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit39);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit39KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
begin
|
|
|
Column_sort(Column,t_price_ship,'<27><><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.wwDBLookupCombo52KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBLookupCombo(Key,wwDBLookupCombo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.bsSkinPanel3Resize(Sender: TObject);
|
|
|
begin
|
|
|
{
|
|
|
wwDBLookupCombo52.Width:=bsSkinPanel3.Width-bsSkinButton13.Width-10;
|
|
|
bsSkinButton13.left:=bsSkinPanel3.Width-bsSkinButton13.Width-2;
|
|
|
bsSkinButton14.left:=bsSkinPanel3.Width-bsSkinButton13.Width-2;
|
|
|
RxDBLookupCombo20.Width:=bsSkinPanel3.Width-RxDBLookupCombo20.left;
|
|
|
Label13.Left:=round((bsSkinPanel3.Width-Label13.Width)/2);
|
|
|
wwDBLookupCombo1.Width:=bsSkinPanel3.Width-bsSkinButton13.Width-10;
|
|
|
Label6.Left:=round((bsSkinPanel3.Width-Label13.Width)/2);
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.dxDBGrid2DblClick(Sender: TObject);
|
|
|
begin
|
|
|
bsSkinPageControl1.ActivePageIndex:=1;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.wwDBLookupCombo1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo20);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.wwDBLookupCombo52Exit(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TAdoQuery;
|
|
|
begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD> from t_code_disport where Ӣ<><D3A2><EFBFBD><EFBFBD>='''+uppercase(wwDBLookupCombo52.Text)+'''');
|
|
|
Open;
|
|
|
if recordcount<>0 then begin
|
|
|
wwDBLookupCombo1.Text:=fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
if t_price_ship.State in [dsedit,dsinsert] then
|
|
|
t_price_ship.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
freeAndNil(aQuery);
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
setbandview ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.N12Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_band(dxdbgrid1,116);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.setbandview;
|
|
|
begin
|
|
|
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
|
|
|
dxDBGrid1.Bands[1].Visible:=true;
|
|
|
dxDBGrid1.Bands[1].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>1').asstring);
|
|
|
end;
|
|
|
if trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>2').asstring)<>'' then
|
|
|
begin
|
|
|
dxDBGrid1.Bands[2].Visible:=true;
|
|
|
dxDBGrid1.Bands[2].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>2').asstring);
|
|
|
end;
|
|
|
if trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>3').asstring)<>'' then
|
|
|
begin
|
|
|
dxDBGrid1.Bands[3].Visible:=true;
|
|
|
dxDBGrid1.Bands[3].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>3').asstring);
|
|
|
end;
|
|
|
if trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>4').asstring)<>'' then
|
|
|
begin
|
|
|
dxDBGrid1.Bands[4].Visible:=true;
|
|
|
dxDBGrid1.Bands[4].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>4').asstring);
|
|
|
end;
|
|
|
if trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>5').asstring)<>'' then
|
|
|
begin
|
|
|
dxDBGrid1.Bands[5].Visible:=true;
|
|
|
dxDBGrid1.Bands[5].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>5').asstring);
|
|
|
end;
|
|
|
if trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>6').asstring)<>'' then
|
|
|
begin
|
|
|
dxDBGrid1.Bands[6].Visible:=true;
|
|
|
dxDBGrid1.Bands[6].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>6').asstring);
|
|
|
end;
|
|
|
if trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>7').asstring)<>'' then
|
|
|
begin
|
|
|
dxDBGrid1.Bands[7].Visible:=true;
|
|
|
dxDBGrid1.Bands[7].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>7').asstring);
|
|
|
end;
|
|
|
if trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>8').asstring)<>'' then
|
|
|
begin
|
|
|
dxDBGrid1.Bands[8].Visible:=true;
|
|
|
dxDBGrid1.Bands[8].Caption:=trim(frm_data_share.t_code_price_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>8').asstring);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.t_price_ship1DataChange(Sender: TObject;
|
|
|
Field: TField);
|
|
|
var canmodify:boolean ;
|
|
|
I:integer ;
|
|
|
begin
|
|
|
canmodify:=t_price_ship.fieldbyname('<27><><EFBFBD><EFBFBD>').asboolean ;
|
|
|
with bsSkinPanel4 do
|
|
|
for i:=0 to ControlCount-1 do
|
|
|
if Controls[i] is TRxDBLookupCombo then (Controls[i] as TRxDBLookupCombo).ReadOnly :=canmodify
|
|
|
else if Controls[i] is TwwDBDateTimePicker then (Controls[i] as TwwDBDateTimePicker).ReadOnly :=canmodify
|
|
|
else if Controls[i] is TDBMemo then (Controls[i] as TDBMemo).ReadOnly :=canmodify
|
|
|
else if Controls[i] is TDBEdit then (Controls[i] as TDBedit).ReadOnly :=canmodify
|
|
|
else if Controls[i] is TwwDBLookupCombo then (Controls[i] as TwwDBLookupCombo).ReadOnly :=canmodify ;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit35KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit32KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit35);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.bbhh1Click(Sender: TObject);
|
|
|
begin
|
|
|
dxdbgrid1.ColumnByFieldName(dxDBGrid1.FocusedField.DisplayName).Caption:='13456' ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.N1Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_price_ship.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean then exit ;
|
|
|
t_price_ship.Edit ;
|
|
|
t_price_ship.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean:=true ;
|
|
|
t_price_ship.post ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.N2Click(Sender: TObject);
|
|
|
begin
|
|
|
t_price_ship.First ;
|
|
|
while not t_price_ship.eof do
|
|
|
begin
|
|
|
if t_price_ship.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean<>true then
|
|
|
begin
|
|
|
t_price_ship.Edit ;
|
|
|
t_price_ship.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean:=true ;
|
|
|
t_price_ship.post ;
|
|
|
end ;
|
|
|
t_price_ship.Next ;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.N3Click(Sender: TObject);
|
|
|
begin
|
|
|
if not t_price_ship.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean then exit ;
|
|
|
t_price_ship.Edit ;
|
|
|
t_price_ship.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean:=False ;
|
|
|
t_price_ship.post ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.N4Click(Sender: TObject);
|
|
|
begin
|
|
|
t_price_ship.First ;
|
|
|
while not t_price_ship.eof do
|
|
|
begin
|
|
|
if t_price_ship.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean then
|
|
|
begin
|
|
|
t_price_ship.Edit ;
|
|
|
t_price_ship.FieldByName('<27><><EFBFBD><EFBFBD>').AsBoolean:=False ;
|
|
|
t_price_ship.post ;
|
|
|
end ;
|
|
|
t_price_ship.Next ;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.lockshutClick(Sender: TObject);
|
|
|
var
|
|
|
Pnt:Tpoint;
|
|
|
begin
|
|
|
if not if_open('263') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
Pnt:=lockshut.ClientToScreen(Point(0,lockshut.Height));
|
|
|
PopupMenu1.Popup(Pnt.x,Pnt.y);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.lockopenClick(Sender: TObject);
|
|
|
var
|
|
|
Pnt:Tpoint;
|
|
|
begin
|
|
|
if not if_open('263') then
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
Pnt:=lockOpen.ClientToScreen(Point(0,lockOpen.Height));
|
|
|
PopupMenu3.Popup(Pnt.x,Pnt.y);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.dxDBGrid1DblClick(Sender: TObject);
|
|
|
begin
|
|
|
bsSkinPageControl1.ActivePageIndex:=1
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.t_price_shipDSDesigner13GetText(
|
|
|
Sender: TField; var Text: String; DisplayText: Boolean);
|
|
|
var Canview :boolean ;
|
|
|
begin
|
|
|
if qryprice1.Locate('ְԱ',t_price_ship.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
begin
|
|
|
Canview:=qryprice1.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsBoolean ;
|
|
|
if CanView then text:=sender.AsString else text:='--' ;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.t_price_shipDSDesigner14GetText(
|
|
|
Sender: TField; var Text: String; DisplayText: Boolean);
|
|
|
var Canview :boolean ;
|
|
|
begin
|
|
|
if qryprice2.Locate('ְԱ',t_price_ship.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
begin
|
|
|
Canview:=qryprice2.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsBoolean ;
|
|
|
if CanView then text:=sender.AsString else text:='--' ;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit13Enter(Sender: TObject);
|
|
|
var Canview,canoop :boolean ;
|
|
|
begin
|
|
|
if qryprice1.Locate('ְԱ',t_price_ship.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
begin
|
|
|
Canoop:=qryprice1.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsBoolean ;
|
|
|
if (not Canoop) or (bsSkinDBCheckRadioBox1.checked) then
|
|
|
(sender as Tdbedit).ReadOnly:=true ;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit19Enter(Sender: TObject);
|
|
|
var Canview,canoop :boolean ;
|
|
|
begin
|
|
|
if qryprice2.Locate('ְԱ',t_price_ship.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
begin
|
|
|
Canoop:=qryprice2.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsBoolean ;
|
|
|
if (not Canoop) or (bsSkinDBCheckRadioBox1.checked) then
|
|
|
(sender as Tdbedit).ReadOnly:=true ;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit25Enter(Sender: TObject);
|
|
|
var Canview,canoop :boolean ;
|
|
|
begin
|
|
|
if qryprice3.Locate('ְԱ',t_price_ship.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
begin
|
|
|
Canoop:=qryprice3.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsBoolean ;
|
|
|
if (not Canoop) or (bsSkinDBCheckRadioBox1.checked) then
|
|
|
(sender as Tdbedit).ReadOnly:=true ;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.t_price_shipDSDesigner15GetText(
|
|
|
Sender: TField; var Text: String; DisplayText: Boolean);
|
|
|
var Canview :boolean ;
|
|
|
begin
|
|
|
if qryprice3.Locate('ְԱ',t_price_ship.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
begin
|
|
|
Canview:=qryprice3.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsBoolean ;
|
|
|
if CanView then text:=sender.AsString else text:='--' ;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.t_price_shipDSDesigner1GetText(
|
|
|
Sender: TField; var Text: String; DisplayText: Boolean);
|
|
|
var Canview :boolean ;
|
|
|
begin
|
|
|
if qryprice01.Locate('ְԱ',t_price_ship.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
begin
|
|
|
Canview:=qryprice01.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsBoolean ;
|
|
|
if CanView then text:=sender.AsString else text:='--' ;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.t_price_shipDSDesigner12GetText(
|
|
|
Sender: TField; var Text: String; DisplayText: Boolean);
|
|
|
var Canview :boolean ;
|
|
|
begin
|
|
|
if qryprice02.Locate('ְԱ',t_price_ship.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
begin
|
|
|
Canview:=qryprice02.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsBoolean ;
|
|
|
if CanView then text:=sender.AsString else text:='--' ;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit1Enter(Sender: TObject);
|
|
|
var Canview,canoop :boolean ;
|
|
|
begin
|
|
|
if qryprice01.Locate('ְԱ',t_price_ship.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
begin
|
|
|
Canoop:=qryprice01.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsBoolean ;
|
|
|
if (not Canoop) or (bsSkinDBCheckRadioBox1.checked) then
|
|
|
(sender as Tdbedit).ReadOnly:=true ;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.DBEdit7Enter(Sender: TObject);
|
|
|
var Canview,canoop :boolean ;
|
|
|
begin
|
|
|
if qryprice02.Locate('ְԱ',t_price_ship.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
begin
|
|
|
Canoop:=qryprice02.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsBoolean ;
|
|
|
if (not Canoop) or (bsSkinDBCheckRadioBox1.checked) then
|
|
|
(sender as Tdbedit).ReadOnly:=true ;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.loadFindIni;
|
|
|
var
|
|
|
findini:tinifile ;
|
|
|
mysec,tmpname:string;
|
|
|
canload:boolean ; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
|
|
i:integer ;
|
|
|
begin
|
|
|
mysec:='1';
|
|
|
findini:=Tinifile.Create(ExtractFilePath(application.ExeName)+'pricequery.ini');
|
|
|
try
|
|
|
canload:=findini.ReadBool(mysec,mysec,false);
|
|
|
bsSkinCheckRadioBox1.Checked:=canload ;
|
|
|
if canload then
|
|
|
begin
|
|
|
with bsSkinPanel5 do
|
|
|
for i:=0 to ControlCount-1 do
|
|
|
begin
|
|
|
tmpname:=Controls[i].Name ;
|
|
|
if Controls[i] is TComboBox then
|
|
|
(Controls[i] as TComboBox).Text:=findini.ReadString(mysec,TmpName,'') else
|
|
|
if Controls[i] is TwwDBLookupCombo then
|
|
|
(Controls[i] as TwwDBLookupCombo).Text:=findini.ReadString(mysec,TmpName,'') else
|
|
|
if Controls[i] is TEdit then
|
|
|
(Controls[i] as TEdit).Text:=findini.ReadString(mysec,TmpName,'') else
|
|
|
if Controls[i] is TwwDBDateTimePicker then
|
|
|
(Controls[i] as TwwDBDateTimePicker).Date:=strtodate(findini.ReadString(mysec,TmpName,'')) else
|
|
|
if Controls[i] is TRxDBLookupCombo then
|
|
|
(Controls[i] as TRxDBLookupCombo).Value:=findini.ReadString(mysec,TmpName,'') ;
|
|
|
end ;
|
|
|
end else
|
|
|
begin
|
|
|
end ;
|
|
|
finally
|
|
|
findini.free;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.writeFindIni;
|
|
|
var
|
|
|
findini:tinifile ;
|
|
|
mysec,tmpname:string;
|
|
|
canload:boolean ; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
|
|
i:integer ;
|
|
|
begin
|
|
|
canload:=bsSkinCheckRadioBox1.Checked ;
|
|
|
mysec:='1';
|
|
|
findini:=Tinifile.Create(ExtractFilePath(application.ExeName)+'pricequery.ini');
|
|
|
try
|
|
|
findini.WriteBool(mysec,mysec,canload);
|
|
|
|
|
|
if canload then
|
|
|
begin
|
|
|
with bsSkinPanel5 do
|
|
|
for i:=0 to ControlCount-1 do
|
|
|
begin
|
|
|
tmpname:=Controls[i].Name ;
|
|
|
if Controls[i] is TComboBox then
|
|
|
findini.WriteString(mysec,TmpName,(Controls[i] as TComboBox).Text) else
|
|
|
if Controls[i] is TwwDBLookupCombo then
|
|
|
findini.WriteString(mysec,TmpName,(Controls[i] as TwwDBLookupCombo).Text) else
|
|
|
if Controls[i] is TEdit then
|
|
|
findini.WriteString(mysec,TmpName,(Controls[i] as TEdit).Text) else
|
|
|
if Controls[i] is TwwDBDateTimePicker then
|
|
|
findini.WriteString(mysec,TmpName,datetostr((Controls[i] as TwwDBDateTimePicker).Date)) else
|
|
|
if Controls[i] is TRxDBLookupCombo then
|
|
|
findini.writeString(mysec,TmpName,(Controls[i] as TRxDBLookupCombo).Value) ;
|
|
|
end ;
|
|
|
end ;
|
|
|
finally
|
|
|
findini.free;
|
|
|
end ;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_info_price_manage.wwDBLookupCombo1Exit(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TAdoQuery;
|
|
|
begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,Ӣ<><D3A2><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD> from t_code_disport where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+uppercase(wwDBLookupCombo1.Text)+'''');
|
|
|
Open;
|
|
|
if recordcount<>0 then begin
|
|
|
wwDBLookupCombo52.Text:=fieldbyname('Ӣ<><D3A2><EFBFBD><EFBFBD>').AsString;
|
|
|
if t_price_ship.State in [dsedit,dsinsert] then
|
|
|
t_price_ship.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
freeAndNil(aQuery);
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end.
|