|
|
unit u_crm_client_sales;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, DB, ADODB, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid,
|
|
|
ComCtrls, bsSkinTabs, ExtCtrls, bsSkinCtrls, RxLookup, StdCtrls, Mask,
|
|
|
DBCtrls, bsdbctrls, wwdbedit, Wwdotdot, Wwdbcomb, wwdbdatetimepicker,
|
|
|
dxDBTLCl, dxGrClms, Menus, XPMenu, Grids, Wwdbigrd, Wwdbgrid, wwdblook,
|
|
|
Psock, NMsmtp, IdMessage, IdBaseComponent, IdComponent, IdTCPConnection,
|
|
|
IdTCPClient, IdMessageClient, IdSMTP, IdExplicitTLSClientServerBase,IdSMTPBase,DateUtils;
|
|
|
|
|
|
type
|
|
|
Tfrm_crm_client_sales = class(TForm)
|
|
|
t_crm_client: TADOQuery;
|
|
|
t_crm_client1: TDataSource;
|
|
|
Panel2: TPanel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet3: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet4: TbsSkinTabSheet;
|
|
|
bsSkinTabSheet5: TbsSkinTabSheet;
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
bsSkinButton12: TbsSkinButton;
|
|
|
t_crm_client_linkman: TADOQuery;
|
|
|
t_crm_client_linkman1: TDataSource;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
t_crm_client_link: TADOQuery;
|
|
|
t_crm_client_link1: TDataSource;
|
|
|
dxDBGrid3: TdxDBGrid;
|
|
|
t_crm_client_contract: TADOQuery;
|
|
|
t_crm_client_contract1: TDataSource;
|
|
|
dxDBGrid4: TdxDBGrid;
|
|
|
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
|
|
|
dxDBGridDateColumn1: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column12: TdxDBGridColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridDateColumn;
|
|
|
bsSkinGroupBox9: TbsSkinGroupBox;
|
|
|
DBRichEdit1: TDBRichEdit;
|
|
|
dxDBGrid4Column6: TdxDBGridColumn;
|
|
|
v_all_client: TADOQuery;
|
|
|
bsSkinTabSheet6: TbsSkinTabSheet;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
Panel1: TPanel;
|
|
|
bsSkinGroupBox10: TbsSkinGroupBox;
|
|
|
DBMemo4: TDBMemo;
|
|
|
bsSkinGroupBox4: TbsSkinGroupBox;
|
|
|
bsSkinDBCheckRadioBox5: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox12: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox4: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox3: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox6: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox7: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox8: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox13: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox14: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox15: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinGroupBox2: TbsSkinGroupBox;
|
|
|
Label13: TLabel;
|
|
|
Label14: TLabel;
|
|
|
Label15: TLabel;
|
|
|
Label16: TLabel;
|
|
|
Label67: TLabel;
|
|
|
Label68: TLabel;
|
|
|
DBEdit13: TDBEdit;
|
|
|
DBEdit14: TDBEdit;
|
|
|
DBEdit15: TDBEdit;
|
|
|
DBEdit16: TDBEdit;
|
|
|
DBEdit50: TDBEdit;
|
|
|
DBEdit51: TDBEdit;
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
Label1: TLabel;
|
|
|
Label3: TLabel;
|
|
|
Label9: TLabel;
|
|
|
Label12: TLabel;
|
|
|
DBEdit1: TDBEdit;
|
|
|
DBEdit3: TDBEdit;
|
|
|
DBEdit11: TDBEdit;
|
|
|
DBEdit12: TDBEdit;
|
|
|
bsSkinGroupBox3: TbsSkinGroupBox;
|
|
|
Label4: TLabel;
|
|
|
Label5: TLabel;
|
|
|
Label2: TLabel;
|
|
|
Label7: TLabel;
|
|
|
Label6: TLabel;
|
|
|
Label10: TLabel;
|
|
|
Label11: TLabel;
|
|
|
Label8: TLabel;
|
|
|
Label17: TLabel;
|
|
|
Label18: TLabel;
|
|
|
Label62: TLabel;
|
|
|
Label63: TLabel;
|
|
|
Label64: TLabel;
|
|
|
Label65: TLabel;
|
|
|
Label66: TLabel;
|
|
|
DBEdit4: TDBEdit;
|
|
|
DBEdit5: TDBEdit;
|
|
|
DBEdit2: TDBEdit;
|
|
|
DBEdit7: TDBEdit;
|
|
|
DBEdit6: TDBEdit;
|
|
|
DBEdit10: TDBEdit;
|
|
|
DBEdit9: TDBEdit;
|
|
|
DBEdit8: TDBEdit;
|
|
|
DBEdit17: TDBEdit;
|
|
|
DBEdit18: TDBEdit;
|
|
|
DBEdit45: TDBEdit;
|
|
|
RxDBLookupCombo14: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
wwDBDateTimePicker6: TwwDBDateTimePicker;
|
|
|
wwDBComboBox6: TwwDBComboBox;
|
|
|
dxDBGrid5: TdxDBGrid;
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
|
|
|
Panel3: TPanel;
|
|
|
bsSkinGroupBox5: TbsSkinGroupBox;
|
|
|
Label20: TLabel;
|
|
|
Label21: TLabel;
|
|
|
Label22: TLabel;
|
|
|
Label164: TLabel;
|
|
|
DBEdit20: TDBEdit;
|
|
|
DBEdit21: TDBEdit;
|
|
|
DBEdit22: TDBEdit;
|
|
|
RxDBLookupCombo11: TRxDBLookupCombo;
|
|
|
bsSkinGroupBox6: TbsSkinGroupBox;
|
|
|
Label19: TLabel;
|
|
|
Label24: TLabel;
|
|
|
Label46: TLabel;
|
|
|
DBEdit19: TDBEdit;
|
|
|
DBEdit24: TDBEdit;
|
|
|
DBEdit30: TDBEdit;
|
|
|
bsSkinGroupBox7: TbsSkinGroupBox;
|
|
|
Label23: TLabel;
|
|
|
Label26: TLabel;
|
|
|
Label27: TLabel;
|
|
|
Label28: TLabel;
|
|
|
DBEdit26: TDBEdit;
|
|
|
DBEdit23: TDBEdit;
|
|
|
DBEdit27: TDBEdit;
|
|
|
bsSkinDBCheckRadioBox9: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox10: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox11: TbsSkinDBCheckRadioBox;
|
|
|
DBEdit28: TDBEdit;
|
|
|
bsSkinGroupBox8: TbsSkinGroupBox;
|
|
|
Label29: TLabel;
|
|
|
Label30: TLabel;
|
|
|
Label31: TLabel;
|
|
|
Label32: TLabel;
|
|
|
Label33: TLabel;
|
|
|
Label34: TLabel;
|
|
|
Label35: TLabel;
|
|
|
DBEdit29: TDBEdit;
|
|
|
DBEdit31: TDBEdit;
|
|
|
DBEdit32: TDBEdit;
|
|
|
DBEdit33: TDBEdit;
|
|
|
DBEdit34: TDBEdit;
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
DBMemo1: TDBMemo;
|
|
|
dxDBGrid6: TdxDBGrid;
|
|
|
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn8: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn9: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn10: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1EDI: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column14: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column17: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column18: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column19: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1USD: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column20: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1RMB: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column22: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column23: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column24: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column25: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column26: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column27: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column28: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column29: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column30: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column31: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column32: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column33: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column34: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column35: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column36: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column37: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column38: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column39: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column40: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column41: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column42: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column43: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column44: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column45: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column46: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column47: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column48: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column49: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column50: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column51: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column52: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column53: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column54: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column55: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column56: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column57: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column58: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column59: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column60: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column61: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column62: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column63: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column64: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column65: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column66: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column67: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column68: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column69: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column70: TdxDBGridMaskColumn;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N10: TMenuItem;
|
|
|
N11: TMenuItem;
|
|
|
N14: TMenuItem;
|
|
|
N13: TMenuItem;
|
|
|
N12: TMenuItem;
|
|
|
N15: TMenuItem;
|
|
|
N16: TMenuItem;
|
|
|
XPMenu1: TXPMenu;
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
N1: TMenuItem;
|
|
|
N2: TMenuItem;
|
|
|
N3: TMenuItem;
|
|
|
N4: TMenuItem;
|
|
|
N5: TMenuItem;
|
|
|
N6: TMenuItem;
|
|
|
N7: TMenuItem;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
bsSkinButton14: TbsSkinButton;
|
|
|
bsSkinButton15: TbsSkinButton;
|
|
|
bsSkinButton16: TbsSkinButton;
|
|
|
bsSkinButton17: TbsSkinButton;
|
|
|
DBEdit46: TDBEdit;
|
|
|
Label55: TLabel;
|
|
|
Label54: TLabel;
|
|
|
wwDBComboBox3: TwwDBComboBox;
|
|
|
Label56: TLabel;
|
|
|
DBEdit47: TDBEdit;
|
|
|
Label57: TLabel;
|
|
|
wwDBDateTimePicker5: TwwDBDateTimePicker;
|
|
|
Label60: TLabel;
|
|
|
RxDBLookupCombo8: TRxDBLookupCombo;
|
|
|
Label58: TLabel;
|
|
|
DBEdit49: TDBEdit;
|
|
|
Label61: TLabel;
|
|
|
wwDBComboBox4: TwwDBComboBox;
|
|
|
Label59: TLabel;
|
|
|
DBMemo3: TDBMemo;
|
|
|
dxDBGrid3Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid3Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid3Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid3Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid3Column5: TdxDBGridDateColumn;
|
|
|
dxDBGrid3Column6: TdxDBGridCurrencyColumn;
|
|
|
dxDBGrid3Column7: TdxDBGridMaskColumn;
|
|
|
dxDBGrid3Column8: TdxDBGridMaskColumn;
|
|
|
dxDBGrid3Column9: TdxDBGridDateColumn;
|
|
|
Label36: TLabel;
|
|
|
DBEdit35: TDBEdit;
|
|
|
Label37: TLabel;
|
|
|
wwDBComboBox2: TwwDBComboBox;
|
|
|
Label38: TLabel;
|
|
|
DBEdit37: TDBEdit;
|
|
|
Label39: TLabel;
|
|
|
DBEdit38: TDBEdit;
|
|
|
Label40: TLabel;
|
|
|
DBEdit39: TDBEdit;
|
|
|
Label41: TLabel;
|
|
|
DBEdit36: TDBEdit;
|
|
|
Label42: TLabel;
|
|
|
DBEdit40: TDBEdit;
|
|
|
Label43: TLabel;
|
|
|
DBEdit41: TDBEdit;
|
|
|
Label44: TLabel;
|
|
|
DBEdit42: TDBEdit;
|
|
|
Label47: TLabel;
|
|
|
DBEdit43: TDBEdit;
|
|
|
Label48: TLabel;
|
|
|
DBEdit44: TDBEdit;
|
|
|
Label49: TLabel;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
Label50: TLabel;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker8: TwwDBDateTimePicker;
|
|
|
Label52: TLabel;
|
|
|
wwDBDateTimePicker7: TwwDBDateTimePicker;
|
|
|
Label51: TLabel;
|
|
|
Label53: TLabel;
|
|
|
DBMemo2: TDBMemo;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
bsSkinButton11: TbsSkinButton;
|
|
|
bsSkinButton13: TbsSkinButton;
|
|
|
dxDBGrid2Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column7: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column8: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column9: TdxDBGridMaskColumn;
|
|
|
dxDBGrid2Column11: TdxDBGridDateColumn;
|
|
|
dxDBGrid21: TdxDBGridDateColumn;
|
|
|
dxDBGrid22: TdxDBGridDateColumn;
|
|
|
dxDBGrid23: TdxDBGridDateColumn;
|
|
|
bskntbsht1: TbsSkinTabSheet;
|
|
|
bsSkinPanel3: TbsSkinPanel;
|
|
|
t_crm_client_sales: TADOQuery;
|
|
|
ds_crm_client_sales1: TDataSource;
|
|
|
wwDBGrid1: TwwDBGrid;
|
|
|
pnl1: TPanel;
|
|
|
bsSkinPanel4: TbsSkinPanel;
|
|
|
bskngrpbx1: TbsSkinGroupBox;
|
|
|
bskngrpbx2: TbsSkinGroupBox;
|
|
|
Label74: TLabel;
|
|
|
Label75: TLabel;
|
|
|
Label76: TLabel;
|
|
|
Label80: TLabel;
|
|
|
Label81: TLabel;
|
|
|
Label82: TLabel;
|
|
|
Label83: TLabel;
|
|
|
Label84: TLabel;
|
|
|
Label88: TLabel;
|
|
|
Label89: TLabel;
|
|
|
Label78: TLabel;
|
|
|
Label85: TLabel;
|
|
|
bvl1: TBevel;
|
|
|
Bevel1: TBevel;
|
|
|
DBEdit48: TDBEdit;
|
|
|
DBEdit54: TDBEdit;
|
|
|
DBEdit56: TDBEdit;
|
|
|
DBEdit57: TDBEdit;
|
|
|
DBEdit58: TDBEdit;
|
|
|
DBEdit60: TDBEdit;
|
|
|
wwDBComboBox11: TwwDBComboBox;
|
|
|
bsSkinPanel5: TbsSkinPanel;
|
|
|
Label25: TLabel;
|
|
|
lbl1: TLabel;
|
|
|
Label45: TLabel;
|
|
|
DBEdit53: TDBEdit;
|
|
|
wwDBComboBox5: TwwDBComboBox;
|
|
|
wwDBComboBox10: TwwDBComboBox;
|
|
|
bsSkinGroupBox12: TbsSkinGroupBox;
|
|
|
Label69: TLabel;
|
|
|
DBEdit25: TDBEdit;
|
|
|
bsSkinGroupBox13: TbsSkinGroupBox;
|
|
|
Label77: TLabel;
|
|
|
Label70: TLabel;
|
|
|
Label71: TLabel;
|
|
|
Label72: TLabel;
|
|
|
Label73: TLabel;
|
|
|
wwDBComboBox7: TwwDBComboBox;
|
|
|
wwDBComboBox8: TwwDBComboBox;
|
|
|
DBEdit52: TDBEdit;
|
|
|
bsSkinButton18: TbsSkinButton;
|
|
|
bsSkinButton19: TbsSkinButton;
|
|
|
bsSkinButton20: TbsSkinButton;
|
|
|
bsSkinButton21: TbsSkinButton;
|
|
|
wwDBLookupCombo2: TwwDBLookupCombo;
|
|
|
ds_sys_emply1: TDataSource;
|
|
|
t_sys_emply: TADOQuery;
|
|
|
bsSkinDBCheckRadioBox16: TbsSkinDBCheckRadioBox;
|
|
|
v_crm_client1: TDataSource;
|
|
|
v_crm_client: TADOQuery;
|
|
|
SMTP1: TIdSMTP;
|
|
|
IdMsg: TIdMessage;
|
|
|
bsSkinGroupBox11: TbsSkinGroupBox;
|
|
|
DBMemo5: TDBMemo;
|
|
|
bsSkinButton22: TbsSkinButton;
|
|
|
PopupMenu3: TPopupMenu;
|
|
|
N8: TMenuItem;
|
|
|
N9: TMenuItem;
|
|
|
N17: TMenuItem;
|
|
|
N18: TMenuItem;
|
|
|
N20: TMenuItem;
|
|
|
N21: TMenuItem;
|
|
|
N22: TMenuItem;
|
|
|
N23: TMenuItem;
|
|
|
N24: TMenuItem;
|
|
|
N25: TMenuItem;
|
|
|
N27: TMenuItem;
|
|
|
dxDBGrid4Column7: TdxDBGridColumn;
|
|
|
bsSkinGroupBox14: TbsSkinGroupBox;
|
|
|
DBMemo6: TDBMemo;
|
|
|
N19: TMenuItem;
|
|
|
N26: TMenuItem;
|
|
|
bsSkinButton23: TbsSkinButton;
|
|
|
N28: TMenuItem;
|
|
|
N29: TMenuItem;
|
|
|
bsSkinTabSheet8: TbsSkinTabSheet;
|
|
|
t_crm_client_ty: TADOQuery;
|
|
|
t_crm_client_ty1: TDataSource;
|
|
|
bsSkinPanel6: TbsSkinPanel;
|
|
|
Label79: TLabel;
|
|
|
Label86: TLabel;
|
|
|
Label87: TLabel;
|
|
|
Label90: TLabel;
|
|
|
Label91: TLabel;
|
|
|
Label92: TLabel;
|
|
|
Label93: TLabel;
|
|
|
Label94: TLabel;
|
|
|
Label95: TLabel;
|
|
|
Label96: TLabel;
|
|
|
Label97: TLabel;
|
|
|
Label98: TLabel;
|
|
|
DBEdit55: TDBEdit;
|
|
|
DBEdit59: TDBEdit;
|
|
|
DBEdit61: TDBEdit;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
DBEdit62: TDBEdit;
|
|
|
DBEdit63: TDBEdit;
|
|
|
DBMemo7: TDBMemo;
|
|
|
bsSkinDBCheckRadioBox17: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinDBCheckRadioBox18: TbsSkinDBCheckRadioBox;
|
|
|
DBEdit64: TDBEdit;
|
|
|
DBEdit65: TDBEdit;
|
|
|
DBEdit66: TDBEdit;
|
|
|
DBMemo8: TDBMemo;
|
|
|
bsSkinPanel7: TbsSkinPanel;
|
|
|
bsSkinButton24: TbsSkinButton;
|
|
|
bsSkinButton25: TbsSkinButton;
|
|
|
bsSkinButton26: TbsSkinButton;
|
|
|
bsSkinButton27: TbsSkinButton;
|
|
|
bsSkinButton36: TbsSkinButton;
|
|
|
DBEdit67: TDBEdit;
|
|
|
Label99: TLabel;
|
|
|
DBEdit68: TDBEdit;
|
|
|
N30: TMenuItem;
|
|
|
N31: TMenuItem;
|
|
|
N32: TMenuItem;
|
|
|
N33: TMenuItem;
|
|
|
bsSkinTabSheet9: TbsSkinTabSheet;
|
|
|
bsSkinPanel8: TbsSkinPanel;
|
|
|
bsSkinPanel9: TbsSkinPanel;
|
|
|
bsSkinPanel10: TbsSkinPanel;
|
|
|
bsSkinPanel11: TbsSkinPanel;
|
|
|
wwDBGrid2: TwwDBGrid;
|
|
|
bsSkinPanel12: TbsSkinPanel;
|
|
|
bsSkinButton28: TbsSkinButton;
|
|
|
bsSkinButton29: TbsSkinButton;
|
|
|
bsSkinButton30: TbsSkinButton;
|
|
|
bsSkinButton31: TbsSkinButton;
|
|
|
bsSkinButton32: TbsSkinButton;
|
|
|
bsSkinGroupBox15: TbsSkinGroupBox;
|
|
|
bsSkinPanel13: TbsSkinPanel;
|
|
|
Label112: TLabel;
|
|
|
Label113: TLabel;
|
|
|
Label114: TLabel;
|
|
|
DBEdit75: TDBEdit;
|
|
|
wwDBComboBox12: TwwDBComboBox;
|
|
|
wwDBComboBox13: TwwDBComboBox;
|
|
|
bsSkinDBCheckRadioBox19: TbsSkinDBCheckRadioBox;
|
|
|
bsSkinGroupBox17: TbsSkinGroupBox;
|
|
|
Label115: TLabel;
|
|
|
DBEdit76: TDBEdit;
|
|
|
bsSkinGroupBox18: TbsSkinGroupBox;
|
|
|
Label116: TLabel;
|
|
|
Label117: TLabel;
|
|
|
Label118: TLabel;
|
|
|
Label119: TLabel;
|
|
|
Label120: TLabel;
|
|
|
wwDBComboBox14: TwwDBComboBox;
|
|
|
wwDBComboBox15: TwwDBComboBox;
|
|
|
DBEdit77: TDBEdit;
|
|
|
t_crm_client_tmpacc: TADOQuery;
|
|
|
t_crm_client_tmpacc1: TDataSource;
|
|
|
wwDBLookupCombo1: TwwDBLookupCombo;
|
|
|
bsSkinPanel14: TbsSkinPanel;
|
|
|
bsSkinPanel15: TbsSkinPanel;
|
|
|
bsSkinPanel16: TbsSkinPanel;
|
|
|
bsSkinButton33: TbsSkinButton;
|
|
|
bsSkinButton34: TbsSkinButton;
|
|
|
bsSkinButton35: TbsSkinButton;
|
|
|
bsSkinButton37: TbsSkinButton;
|
|
|
bsSkinButton38: TbsSkinButton;
|
|
|
t_crm_client_limitamt: TADOQuery;
|
|
|
t_crm_client_limitamt1: TDataSource;
|
|
|
dxDBGrid7: TdxDBGrid;
|
|
|
dxDBGrid7Column1: TdxDBGridColumn;
|
|
|
dxDBGrid7Column2: TdxDBGridColumn;
|
|
|
dxDBGrid7Column4: TdxDBGridColumn;
|
|
|
dxDBGrid7Column5: TdxDBGridColumn;
|
|
|
dxDBGrid7Column6: TdxDBGridColumn;
|
|
|
dxDBGrid7Column7: TdxDBGridColumn;
|
|
|
Label100: TLabel;
|
|
|
DBEdit69: TDBEdit;
|
|
|
Label101: TLabel;
|
|
|
DBEdit70: TDBEdit;
|
|
|
Label102: TLabel;
|
|
|
DBEdit71: TDBEdit;
|
|
|
Label103: TLabel;
|
|
|
DBEdit72: TDBEdit;
|
|
|
Label104: TLabel;
|
|
|
RxDBLookupCombo13: TRxDBLookupCombo;
|
|
|
bsSkinTabSheet10: TbsSkinTabSheet;
|
|
|
bsSkinPanel17: TbsSkinPanel;
|
|
|
t_crm_client_unlock: TADOQuery;
|
|
|
t_crm_client_unlock1: TDataSource;
|
|
|
t_crm_client_unlockitems: TADOQuery;
|
|
|
t_crm_client_unlockitems1: TDataSource;
|
|
|
bsSkinPanel19: TbsSkinPanel;
|
|
|
dxDBGrid8: TdxDBGrid;
|
|
|
dxDBGrid8Column1: TdxDBGridColumn;
|
|
|
dxDBGrid8Column2: TdxDBGridColumn;
|
|
|
dxDBGrid8Column3: TdxDBGridColumn;
|
|
|
dxDBGrid8Column4: TdxDBGridColumn;
|
|
|
dxDBGrid8Column5: TdxDBGridColumn;
|
|
|
bsSkinPanel18: TbsSkinPanel;
|
|
|
bsSkinButton39: TbsSkinButton;
|
|
|
bsSkinButton40: TbsSkinButton;
|
|
|
bsSkinButton41: TbsSkinButton;
|
|
|
bsSkinButton42: TbsSkinButton;
|
|
|
bsSkinButton43: TbsSkinButton;
|
|
|
bsSkinPanel21: TbsSkinPanel;
|
|
|
Label105: TLabel;
|
|
|
Edit1: TEdit;
|
|
|
bsSkinButton44: TbsSkinButton;
|
|
|
bsSkinButton46: TbsSkinButton;
|
|
|
dxDBGrid9: TdxDBGrid;
|
|
|
dxDBGridColumn1: TdxDBGridColumn;
|
|
|
dxDBGridColumn2: TdxDBGridColumn;
|
|
|
dxDBGridColumn3: TdxDBGridColumn;
|
|
|
dxDBGrid7Column8: TdxDBGridColumn;
|
|
|
bsSkinGroupBox19: TbsSkinGroupBox;
|
|
|
DBMemo9: TDBMemo;
|
|
|
DBMemo10: TDBMemo;
|
|
|
Label106: TLabel;
|
|
|
dxDBGrid8Column6: TdxDBGridColumn;
|
|
|
Memo1: TMemo;
|
|
|
Label107: TLabel;
|
|
|
DBEdit73: TDBEdit;
|
|
|
Label108: TLabel;
|
|
|
DBEdit74: TDBEdit;
|
|
|
DBEdit78: TDBEdit;
|
|
|
bsSkinTabSheet11: TbsSkinTabSheet;
|
|
|
t_code_custclass1: TDataSource;
|
|
|
t_code_custclass: TADOQuery;
|
|
|
t_crm_client_class: TADOQuery;
|
|
|
t_crm_client_class1: TDataSource;
|
|
|
dxDBGrid10: TdxDBGrid;
|
|
|
dxDBGridColumn4: TdxDBGridColumn;
|
|
|
dxDBGridColumn6: TdxDBGridColumn;
|
|
|
dxDBGridColumn7: TdxDBGridColumn;
|
|
|
dxDBGridColumn8: TdxDBGridColumn;
|
|
|
dxDBGridColumn9: TdxDBGridColumn;
|
|
|
dxDBGridColumn10: TdxDBGridColumn;
|
|
|
dxDBGrid10Column8: TdxDBGridColumn;
|
|
|
bsSkinPanel20: TbsSkinPanel;
|
|
|
bsSkinPanel22: TbsSkinPanel;
|
|
|
bsSkinButton45: TbsSkinButton;
|
|
|
bsSkinButton47: TbsSkinButton;
|
|
|
bsSkinButton48: TbsSkinButton;
|
|
|
bsSkinButton49: TbsSkinButton;
|
|
|
bsSkinButton50: TbsSkinButton;
|
|
|
bsSkinPanel23: TbsSkinPanel;
|
|
|
Label110: TLabel;
|
|
|
DBEdit79: TDBEdit;
|
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
|
Label121: TLabel;
|
|
|
Label122: TLabel;
|
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
Label109: TLabel;
|
|
|
DBMemo11: TDBMemo;
|
|
|
Label111: TLabel;
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
Label123: TLabel;
|
|
|
Label124: TLabel;
|
|
|
RxDBLookupCombo5: TRxDBLookupCombo;
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure Panel2Resize(Sender: TObject);
|
|
|
procedure bsSkinButton12Click(Sender: TObject);
|
|
|
procedure t_crm_clientAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_clientBeforePost(DataSet: TDataSet);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
|
procedure t_crm_clientAfterScroll(DataSet: TDataSet);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
procedure bsSkinButton11Click(Sender: TObject);
|
|
|
procedure bsSkinButton13Click(Sender: TObject);
|
|
|
procedure t_crm_client_linkmanAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_linkmanBeforePost(DataSet: TDataSet);
|
|
|
procedure bsSkinButton14Click(Sender: TObject);
|
|
|
procedure bsSkinButton15Click(Sender: TObject);
|
|
|
procedure bsSkinButton16Click(Sender: TObject);
|
|
|
procedure bsSkinButton17Click(Sender: TObject);
|
|
|
procedure t_crm_client_linkAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_linkBeforePost(DataSet: TDataSet);
|
|
|
procedure t_crm_client_linkmanBeforeInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_clientBeforeDelete(DataSet: TDataSet);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure t_crm_clientBeforeEdit(DataSet: TDataSet);
|
|
|
procedure DBEdit4KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit5KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit2KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit6KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit7KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit10KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit9KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit8KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit17KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit3KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit12KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit11KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit13KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit14KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit16KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit15KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox8KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox2KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox5KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox4KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox3KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox7KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox6KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox12KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox13KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox15KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox14KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure RxDBLookupCombo11KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit20KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit22KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit21KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit25KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox5KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit24KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit19KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit30KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit23KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit26KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit27KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox9KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox10KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure bsSkinDBCheckRadioBox11KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
procedure DBEdit28KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit29KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit31KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit32KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit33KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit34KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit35KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox2KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit37KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit38KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit39KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit36KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit40KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit41KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit42KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit43KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit44KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBDateTimePicker1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBDateTimePicker4KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit46KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox3KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit47KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBDateTimePicker5KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo8KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit49KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure wwDBComboBox4KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure t_crm_clientPostError(DataSet: TDataSet; E: EDatabaseError;
|
|
|
var Action: TDataAction);
|
|
|
procedure t_crm_clientDeleteError(DataSet: TDataSet; E: EDatabaseError;
|
|
|
var Action: TDataAction);
|
|
|
procedure dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
procedure DBEdit45KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit18KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure RxDBLookupCombo14KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure DBEdit48Change(Sender: TObject);
|
|
|
procedure dxDBGrid1DblClick(Sender: TObject);
|
|
|
procedure N10Click(Sender: TObject);
|
|
|
procedure N14Click(Sender: TObject);
|
|
|
procedure N12Click(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
procedure N7Click(Sender: TObject);
|
|
|
procedure N1Click(Sender: TObject);
|
|
|
procedure N3Click(Sender: TObject);
|
|
|
procedure N5Click(Sender: TObject);
|
|
|
procedure bsSkinButton8Click(Sender: TObject);
|
|
|
procedure wwDBComboBox10KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure bsSkinButton18Click(Sender: TObject);
|
|
|
procedure bsSkinButton19Click(Sender: TObject);
|
|
|
procedure bsSkinButton20Click(Sender: TObject);
|
|
|
procedure bsSkinButton21Click(Sender: TObject);
|
|
|
procedure t_crm_client_salesAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_salesBeforePost(DataSet: TDataSet);
|
|
|
procedure t_crm_client_salesBeforeDelete(DataSet: TDataSet);
|
|
|
procedure NMSMTP1Connect(Sender: TObject);
|
|
|
procedure ds_crm_client_sales1DataChange(Sender: TObject;
|
|
|
Field: TField);
|
|
|
procedure bsSkinButton22Click(Sender: TObject);
|
|
|
procedure N8Click(Sender: TObject);
|
|
|
procedure N17Click(Sender: TObject);
|
|
|
procedure N19Click(Sender: TObject);
|
|
|
procedure N21Click(Sender: TObject);
|
|
|
procedure N23Click(Sender: TObject);
|
|
|
procedure N25Click(Sender: TObject);
|
|
|
procedure t_crm_client1DataChange(Sender: TObject; Field: TField);
|
|
|
procedure N26Click(Sender: TObject);
|
|
|
procedure bsSkinButton23Click(Sender: TObject);
|
|
|
procedure N29Click(Sender: TObject);
|
|
|
procedure t_crm_client_tyAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_tyBeforeEdit(DataSet: TDataSet);
|
|
|
procedure bsSkinButton24Click(Sender: TObject);
|
|
|
procedure bsSkinButton25Click(Sender: TObject);
|
|
|
procedure bsSkinButton26Click(Sender: TObject);
|
|
|
procedure bsSkinButton27Click(Sender: TObject);
|
|
|
procedure bsSkinButton36Click(Sender: TObject);
|
|
|
procedure bsSkinButton32Click(Sender: TObject);
|
|
|
procedure N33Click(Sender: TObject);
|
|
|
procedure N31Click(Sender: TObject);
|
|
|
procedure t_crm_client_tyBeforeInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_tmpaccAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_tmpaccBeforeDelete(DataSet: TDataSet);
|
|
|
procedure t_crm_client_tmpaccBeforeInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_tmpaccBeforePost(DataSet: TDataSet);
|
|
|
procedure bsSkinButton28Click(Sender: TObject);
|
|
|
procedure bsSkinButton29Click(Sender: TObject);
|
|
|
procedure bsSkinButton30Click(Sender: TObject);
|
|
|
procedure bsSkinButton31Click(Sender: TObject);
|
|
|
procedure t_crm_client_limitamtAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_limitamtBeforeDelete(DataSet: TDataSet);
|
|
|
procedure t_crm_client_limitamtBeforeInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_limitamtBeforePost(DataSet: TDataSet);
|
|
|
procedure bsSkinButton33Click(Sender: TObject);
|
|
|
procedure bsSkinButton34Click(Sender: TObject);
|
|
|
procedure bsSkinButton35Click(Sender: TObject);
|
|
|
procedure bsSkinButton37Click(Sender: TObject);
|
|
|
procedure bsSkinButton38Click(Sender: TObject);
|
|
|
procedure t_crm_client_unlockAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_unlockBeforeDelete(DataSet: TDataSet);
|
|
|
procedure t_crm_client_unlockBeforeInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_unlockBeforePost(DataSet: TDataSet);
|
|
|
procedure bsSkinButton39Click(Sender: TObject);
|
|
|
procedure bsSkinButton40Click(Sender: TObject);
|
|
|
procedure bsSkinButton41Click(Sender: TObject);
|
|
|
procedure bsSkinButton42Click(Sender: TObject);
|
|
|
procedure bsSkinButton43Click(Sender: TObject);
|
|
|
procedure t_crm_client_unlockitemsAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_unlockitemsBeforeDelete(DataSet: TDataSet);
|
|
|
procedure t_crm_client_unlockitemsBeforeInsert(DataSet: TDataSet);
|
|
|
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure bsSkinButton44Click(Sender: TObject);
|
|
|
procedure bsSkinButton46Click(Sender: TObject);
|
|
|
procedure bsSkinButton45Click(Sender: TObject);
|
|
|
procedure bsSkinButton47Click(Sender: TObject);
|
|
|
procedure bsSkinButton48Click(Sender: TObject);
|
|
|
procedure bsSkinButton49Click(Sender: TObject);
|
|
|
procedure bsSkinButton50Click(Sender: TObject);
|
|
|
procedure t_crm_client_classAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_classBeforeDelete(DataSet: TDataSet);
|
|
|
procedure t_crm_client_classBeforeInsert(DataSet: TDataSet);
|
|
|
procedure t_crm_client_classBeforePost(DataSet: TDataSet);
|
|
|
procedure t_crm_client_salesAfterPost(DataSet: TDataSet);
|
|
|
private
|
|
|
function issavecustclass:Boolean;
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_crm_client_sales: Tfrm_crm_client_sales;
|
|
|
rp_crm_client_str:WideString;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function, u_data_share, my_sys_chat;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
loadreggrid(dxdbgrid1,false,caption);
|
|
|
t_crm_client.SQL.clear;
|
|
|
t_crm_client.sql.add('select * from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client_sales where '+open_data('0008','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no','no')+' ) or ((<28>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in ('+''''+'Ŀ<><C4BF>'+''''+','+''''+'ϵͳ'+''''+')');
|
|
|
t_crm_client.sql.add(' or ί<>е<EFBFBD>λ=1)');
|
|
|
t_crm_client.SQL.Add(' and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27>ͷ<EFBFBD>Ա','no','no','no')
|
|
|
+') order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
// t_crm_client.SQL.SaveToFile('d:\1.txt');
|
|
|
t_crm_client.open;
|
|
|
v_all_client.open;
|
|
|
t_crm_client_linkman.open;
|
|
|
t_crm_client_link.open;
|
|
|
t_crm_client_contract.open;
|
|
|
t_sys_emply.Open;
|
|
|
t_crm_client_sales.Open;
|
|
|
t_crm_client_tmpacc.Open;
|
|
|
t_crm_client_limitamt.Open;
|
|
|
t_code_custclass.Open;
|
|
|
t_crm_client_unlock.Open;
|
|
|
t_crm_client_class.Open;
|
|
|
|
|
|
t_crm_client_unlockitems.Open;
|
|
|
|
|
|
t_crm_client_ty.close;
|
|
|
t_crm_client_ty.sql.clear;
|
|
|
t_crm_client_ty.sql.Add('select * from t_crm_client_ty');
|
|
|
t_crm_client_ty.sql.Add('where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and '+open_data('3113','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no'));
|
|
|
t_crm_client_ty.open;
|
|
|
|
|
|
dxDBGrid1.FullExpand;
|
|
|
if not if_open('250') then
|
|
|
begin
|
|
|
bsSkinTabSheet8.TabVisible:=false;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
t_sys_emply.Close;
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
frm_crm_client_sales.Hide;
|
|
|
frm_crm_client_sales.ManualFloat(frm_crm_client_sales.BoundsRect );
|
|
|
frm_main.freeTabs('frm_crm_client_sales');
|
|
|
action:=cafree;
|
|
|
frm_crm_client_sales:=nil;
|
|
|
with frm_data_share do
|
|
|
begin
|
|
|
t_crm_client.requery;
|
|
|
t_crm_client_all.requery;
|
|
|
t_crm_client_ship.requery;
|
|
|
t_crm_client_changzhan.requery;
|
|
|
t_crm_client_truck.requery;
|
|
|
t_crm_client_hangkong.requery;
|
|
|
t_crm_client_baoguan.requery;
|
|
|
t_crm_client_weituo.requery;
|
|
|
t_crm_client_daili.requery;
|
|
|
t_crm_client_huodai.requery;
|
|
|
t_crm_client_shiper.requery;
|
|
|
t_crm_client_shouhuo.requery;
|
|
|
t_crm_client_tongzhi.requery;
|
|
|
t_crm_client_other.requery;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.Panel2Resize(Sender: TObject);
|
|
|
var
|
|
|
i:integer;
|
|
|
begin
|
|
|
i:=round(Panel2.width/9);
|
|
|
bsSkinButton9.width:=i;
|
|
|
bsSkinButton12.width:=i;
|
|
|
bsSkinButton10.width:=i;
|
|
|
bsSkinButton1.width:=i;
|
|
|
bsSkinButton2.width:=i;
|
|
|
bsSkinButton4.width:=i;
|
|
|
bsSkinButton3.width:=i;
|
|
|
bsSkinButton8.width:=i;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton12Click(Sender: TObject);
|
|
|
begin
|
|
|
if bsSkinButton12.Caption='<27>ͻ<EFBFBD>չ<EFBFBD><D5B9>' then
|
|
|
begin
|
|
|
dxdbgrid1.FullExpand;
|
|
|
bsSkinButton12.Caption:='<27>ͻ<EFBFBD><CDBB>ϲ<EFBFBD>';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
dxdbgrid1.FullCollapse;
|
|
|
bsSkinButton12.Caption:='<27>ͻ<EFBFBD>չ<EFBFBD><D5B9>';
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_clientAfterInsert(DataSet: TDataSet);
|
|
|
begin
|
|
|
t_crm_client['<27>ͻ<EFBFBD>״̬']:='<27><>ȷ<EFBFBD><C8B7>';
|
|
|
t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD>ֵ']:='<27>ȴ<EFBFBD><C8B4><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:='Ŀ<><C4BF>';
|
|
|
t_crm_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_crm_client['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_crm_client['ί<>е<EFBFBD>λ']:=1;
|
|
|
t_crm_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='Լ<><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_clientBeforePost(DataSet: TDataSet);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
t_crm_client['<27>ͻ<EFBFBD>״̬']:=t_crm_client['<27>ͻ<EFBFBD>״̬'];
|
|
|
table_before_post(t_crm_client,'<27><><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_crm_client,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_crm_client,'<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>');
|
|
|
if pos(' ',t_crm_client.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString)>0 then
|
|
|
begin
|
|
|
showmessage('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD><EFBFBD>пո<D5B8><F1A3ACB2>ܱ<EFBFBD><DCB1>棡');
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('select * from t_crm_client where (<28>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_crm_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+''') and clientid<>'''+t_crm_client.fieldbyname('CLIENTID').AsString+'''');
|
|
|
Open;
|
|
|
if not IsEmpty then begin
|
|
|
ShowMessage('ϵͳ<CFB5><CDB3><EFBFBD>Ѵ<EFBFBD><D1B4>ڴ˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD><EFBFBD>룺'+fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+';<3B><><EFBFBD>ƣ<EFBFBD>'+fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('select * from t_crm_client where (<28><><EFBFBD><EFBFBD>='''+t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+''') and clientid<>'''+t_crm_client.fieldbyname('CLIENTID').AsString+'''');
|
|
|
Open;
|
|
|
if not IsEmpty then begin
|
|
|
ShowMessage('ϵͳ<CFB5><CDB3><EFBFBD>Ѵ<EFBFBD><D1B4>ڴ˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD>룬<EFBFBD><EBA3AC><EFBFBD>룺'+fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+';<3B><><EFBFBD>ƣ<EFBFBD>'+fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client.append;
|
|
|
bsSkinTabSheet1.Show;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_crm_client);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client.Edit;
|
|
|
t_crm_client.FieldByName('isdelete').AsString:='1';
|
|
|
t_crm_client.Post;
|
|
|
table_delete(t_crm_client);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton3Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_crm_client);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.FormCloseQuery(Sender: TObject;
|
|
|
var CanClose: Boolean);
|
|
|
begin
|
|
|
CanClose:=frm_close_query(t_crm_client_ty);
|
|
|
CanClose:=frm_close_query(t_crm_client);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_clientAfterScroll(DataSet: TDataSet);
|
|
|
begin
|
|
|
if v_all_client.IsEmpty then
|
|
|
begin
|
|
|
DBEdit5.ReadOnly:=false;
|
|
|
DBEdit4.ReadOnly:=false;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
DBEdit5.ReadOnly:=true;
|
|
|
DBEdit4.ReadOnly:=true;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client_linkman.insert;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton7Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_crm_client_linkman);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton11Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_crm_client_linkman);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton13Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_crm_client_linkman);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_linkmanAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_crm_client_linkman['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_linkman['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_crm_client_linkman['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_linkmanBeforePost(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
table_before_post(t_crm_client_linkman,'<27><><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_crm_client_linkman,'<27>Ա<EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton14Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client_link.insert;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton15Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_crm_client_link);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton16Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_crm_client_link);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton17Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_crm_client_link);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_linkAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_crm_client_link['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_link['<27>Ӵ<EFBFBD><D3B4><EFBFBD>']:=employee;
|
|
|
t_crm_client_link['<27>Ӵ<EFBFBD><D3B4><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
t_crm_client_link['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_crm_client_link['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_linkBeforePost(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
table_before_post(t_crm_client_link,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_crm_client_link,'<27>Ӵ<EFBFBD><D3B4><EFBFBD>ʽ');
|
|
|
table_before_post(t_crm_client_link,'<27>Ӵ<EFBFBD>Ŀ<EFBFBD><C4BF>');
|
|
|
table_before_post(t_crm_client_link,'<27>ͻ<EFBFBD><CDBB><EFBFBD>Ա');
|
|
|
table_before_post(t_crm_client_link,'<27>Ӵ<EFBFBD><D3B4><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_crm_client_link,'ҵ<><D2B5>Ч<EFBFBD><D0A7>');
|
|
|
table_before_post(t_crm_client_link,'ҵ<><D2B5><EFBFBD>ܽ<EFBFBD>');
|
|
|
table_before_post(t_crm_client_link,'<27>Ӵ<EFBFBD><D3B4><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_linkmanBeforeInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(86,'true')) then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
if (t_crm_client.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString='') then begin
|
|
|
ShowMessage('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
table_post(t_crm_client);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_clientBeforeDelete(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
IF (t_crm_client.fieldbyname('<27>ͻ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>')
|
|
|
or (t_crm_client.fieldbyname('<27>ͻ<EFBFBD>״̬').asstring='<27><>ʧ<EFBFBD>ͻ<EFBFBD>') then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
if not v_all_client.IsEmpty then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD><CDBB>Ѿ<EFBFBD>ʹ<EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
table_before_delete(t_crm_client_linkman,'<27><>ϵ<EFBFBD><CFB5>');
|
|
|
table_before_delete(t_crm_client_link,'ҵ<><D2B5><EFBFBD>Ӵ<EFBFBD>');
|
|
|
if do_data('0008',t_crm_client.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><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_crm_client_sales.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
// sys_print('<27><><EFBFBD>ۿͻ<DBBF><CDBB><EFBFBD>ӡ',2,t_crm_client1,t_crm_client_link1,nil,nil,t_crm_client_linkman1,nil,nil,nil,nil,nil,nil);
|
|
|
|
|
|
v_crm_client.SQL.clear;
|
|
|
v_crm_client.sql.add('select * from v_crm_client_sales ');
|
|
|
v_crm_client.SQL.Add(rp_crm_client_str
|
|
|
+'order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
v_crm_client.open;
|
|
|
|
|
|
sys_print('<27><><EFBFBD>ۿͻ<DBBF><CDBB><EFBFBD>ӡ',2,nil,nil,nil,nil,v_crm_client1,nil,nil,nil,nil,nil,nil);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
query_client(1,'0008');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_clientBeforeEdit(DataSet: TDataSet);
|
|
|
begin
|
|
|
if do_data('0008',t_crm_client.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,t_crm_client.fieldbyname('<27>ͷ<EFBFBD>Ա').asstring,'','','') or (do_data('0008',t_crm_client_sales.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'','','','','')) then
|
|
|
begin
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit4KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit45);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit5KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit2KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit6);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit6KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit7);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit7KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit10);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit10KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit9);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit9KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit8);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit8KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit17);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit17KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit18);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit3);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit3KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit12);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit12KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit11);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit11KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit13);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit13KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit14);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit14KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit16);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit16KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit15);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit15KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox8);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox8KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox2KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox5);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox5KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox4);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox4KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox1KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox3);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox3KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox7);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox7KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox6);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox6KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox12);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox12KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox13);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox13KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox15);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox15KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox14);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox14KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo4);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.RxDBLookupCombo11KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit20);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit20KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit22);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit22KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit21);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit21KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
if wwDBComboBox7.Visible then
|
|
|
key_wwDBComboBox(Key,wwDBComboBox7);
|
|
|
if wwDBComboBox10.Visible then
|
|
|
key_wwDBComboBox(Key,wwDBComboBox10);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit25KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox5);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox5KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit24);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit24KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit19);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit19KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit30);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit30KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit23);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit23KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit26);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit26KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit27);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit27KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox9);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox9KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox10);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox10KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox11);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinDBCheckRadioBox11KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit28);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit28KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit29);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit29KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit31);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit31KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit32);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit32KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit33);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit33KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit34);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit34KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit35KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox2KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit37);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit37KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit38);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit38KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit39);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit39KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit36);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit36KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit40);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit40KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit41);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit41KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit42);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit42KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit43);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit43KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit44);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit44KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBDateTimePicker(Key,wwDBDateTimePicker1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBDateTimePicker1KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_wwDBDateTimePicker(Key,wwDBDateTimePicker2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBDateTimePicker4KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo2);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit46KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox3);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox3KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit47);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit47KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBDateTimePicker(Key,wwDBDateTimePicker5);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBDateTimePicker5KeyPress(
|
|
|
Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo8);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.RxDBLookupCombo8KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit49);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit49KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox4);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox4KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBMemo(Key,DBMemo3);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_clientPostError(DataSet: TDataSet;
|
|
|
E: EDatabaseError; var Action: TDataAction);
|
|
|
var
|
|
|
aQuery:TAdoQuery;
|
|
|
begin
|
|
|
if (pos('<27><><EFBFBD><EFBFBD>',UpperCase(E.Message))<>0) then
|
|
|
begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('select * from t_crm_client where <20><><EFBFBD><EFBFBD>='''+t_crm_client['<27><><EFBFBD><EFBFBD>']+''' OR <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']+'''');
|
|
|
Open;
|
|
|
if not IsEmpty then begin
|
|
|
ShowMessage('ϵͳ<CFB5><CDB3><EFBFBD>Ѵ<EFBFBD><D1B4>ڴ˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD><EFBFBD>룺'+fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+';<3B><><EFBFBD>ƣ<EFBFBD>'+fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
abort;
|
|
|
end;
|
|
|
if (pos('PRIMARY KEY',UpperCase(E.Message))<>0) then
|
|
|
begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('select * from t_crm_client where <20><><EFBFBD><EFBFBD>='''+t_crm_client['<27><><EFBFBD><EFBFBD>']+''' OR <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']+'''');
|
|
|
Open;
|
|
|
if not IsEmpty then begin
|
|
|
ShowMessage('ϵͳ<CFB5><CDB3><EFBFBD>Ѵ<EFBFBD><D1B4>ڴ˿ͻ<CBBF><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD><EFBFBD>룺'+fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+';<3B><><EFBFBD>ƣ<EFBFBD>'+fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_clientDeleteError(DataSet: TDataSet;
|
|
|
E: EDatabaseError; var Action: TDataAction);
|
|
|
begin
|
|
|
showmessage('<27>ͻ<EFBFBD><CDBB>Ѿ<EFBFBD>ʹ<EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
begin
|
|
|
Column_sort(Column,t_crm_client,'<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit45KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit5);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.RxDBLookupCombo1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_DBEdit(Key,DBEdit1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit18KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo14);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.RxDBLookupCombo14KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.DBEdit48Change(Sender: TObject);
|
|
|
begin
|
|
|
if DBEdit48.text='Ŀ<><C4BF>' then
|
|
|
begin
|
|
|
DBEdit4.ReadOnly:=false;
|
|
|
DBEdit5.ReadOnly:=false;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
DBEdit4.ReadOnly:=true;
|
|
|
DBEdit5.ReadOnly:=true;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.dxDBGrid1DblClick(Sender: TObject);
|
|
|
begin
|
|
|
bsSkinTabSheet1.Show;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N10Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_no(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N14Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid_view_all(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N12Click(Sender: TObject);
|
|
|
begin
|
|
|
update_grid(dxdbgrid1,49);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N7Click(Sender: TObject);
|
|
|
var
|
|
|
aQuery:TAdoQuery;
|
|
|
str,emp,mail:String;
|
|
|
begin
|
|
|
if t_crm_client.IsEmpty then
|
|
|
exit;
|
|
|
if (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'Ŀ<><C4BF><EFBFBD>ͻ<EFBFBD>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><>ȷ<EFBFBD><C8B7>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'DZ<>ڿͻ<DABF>')then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
t_crm_client.edit;
|
|
|
t_crm_client['<27>ͻ<EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>';
|
|
|
t_crm_client.post;
|
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
aQuery.Close;
|
|
|
aQuery.SQL.Clear;
|
|
|
aQuery.SQL.Add('Select * from t_sys_awoke where <20><><EFBFBD><EFBFBD>״̬=''<><D7BC>ִ<EFBFBD><D6B4>'' AND <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27>¿ͻ<C2BF><CDBB><EFBFBD><EFBFBD><EFBFBD>'' AND <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><='''+FormatDateTime('YYYY-MM-DD',NOW)+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='''+FormatDateTime('YYYY-MM-DD',NOW)+'''');
|
|
|
aQuery.Open;
|
|
|
if not aQuery.IsEmpty then begin
|
|
|
str:=Trim(aQuery.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
|
|
|
emp:=Copy(str,6,pos(',',str)-6);
|
|
|
mail:=GetEmail(emp);
|
|
|
if mail<>'' then begin
|
|
|
SMTP1.AuthType := satDefault; //(satNone, satDefault, satSASL);
|
|
|
|
|
|
// SMTP1.AuthenticationType := atLogin;
|
|
|
|
|
|
SMTP1.username:= frm_data_share.t_sys_company.FieldByName('<27><>¼<EFBFBD>û<EFBFBD><C3BB><EFBFBD>').AsString;
|
|
|
SMTP1.Password :=frm_data_share.t_sys_company.FieldByName('<27><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
|
SMTP1.Host :=frm_data_share.t_sys_company.FieldByName('SMTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ').AsString;
|
|
|
SMTP1.Port :=Strtointdef(Trim(frm_data_share.t_sys_company.FieldByName('SMTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD>').AsString),25);
|
|
|
try
|
|
|
SMTP1.Connect;
|
|
|
except
|
|
|
Showmessage('<27><><EFBFBD><EFBFBD>SMTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>!');
|
|
|
Exit;
|
|
|
end;
|
|
|
try
|
|
|
with IdMsg do
|
|
|
begin
|
|
|
body.Clear;
|
|
|
Body.Text :='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>:'+t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>';
|
|
|
From.address :=frm_data_share.t_sys_company.FieldByName('SMTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
Recipients.EMailAddresses :=mail;
|
|
|
Subject:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>:'+t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>';
|
|
|
end;
|
|
|
SMTP1.Send(IdMsg);
|
|
|
finally
|
|
|
// showmessage(t_sys_awoke_emp.FieldByName('<27><>Ա').asstring+'<27><><EFBFBD>ż<EFBFBD><C5BC>ѳɹ<D1B3><C9B9><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
SMTP1.Disconnect;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
NMSMTP1.Host:=frm_data_share.t_sys_company.FieldByName('SMTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ').AsString;
|
|
|
NMSMTP1.Port:=Strtointdef(Trim(frm_data_share.t_sys_company.FieldByName('SMTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD>').AsString),25);
|
|
|
if NMSMTP1.Connected then
|
|
|
begin
|
|
|
NMSMTP1.Disconnect;
|
|
|
end;
|
|
|
NMSMTP1.Connect;
|
|
|
NMSMTP1.PostMessage.FromAddress :=frm_data_share.t_sys_company.FieldByName('SMTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
NMSMTP1.PostMessage.FromName :='<27>ʼ<EFBFBD><CABC>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
NMSMTP1.PostMessage.ToAddress.Text :=mail;
|
|
|
NMSMTP1.PostMessage.Body.Text :='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>:'+t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>';
|
|
|
NMSMTP1.PostMessage.Subject :='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>:'+t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']+'<27><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>';
|
|
|
NMSMTP1.SendMail;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
|
|
|
|
|
|
Send_invocie_check_shen('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>:'+t_crm_client.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring,'092','45');
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N1Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_crm_client.IsEmpty then
|
|
|
exit;
|
|
|
if (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'Ŀ<><C4BF><EFBFBD>ͻ<EFBFBD>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><>ȷ<EFBFBD><C8B7>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'DZ<>ڿͻ<DABF>')then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD>ܸı䣡<C4B1><E4A3A1>');
|
|
|
exit;
|
|
|
end;
|
|
|
t_crm_client.edit;
|
|
|
t_crm_client['<27>ͻ<EFBFBD>״̬']:='<27><>ȷ<EFBFBD><C8B7>';
|
|
|
t_crm_client.post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N3Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_crm_client.IsEmpty then
|
|
|
exit;
|
|
|
if (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'Ŀ<><C4BF><EFBFBD>ͻ<EFBFBD>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><>ȷ<EFBFBD><C8B7>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'DZ<>ڿͻ<DABF>')then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD>ܸı䣡<C4B1><E4A3A1>');
|
|
|
exit;
|
|
|
end;
|
|
|
t_crm_client.edit;
|
|
|
t_crm_client['<27>ͻ<EFBFBD>״̬']:='DZ<>ڿͻ<DABF>';
|
|
|
t_crm_client.post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N5Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_crm_client.IsEmpty then
|
|
|
exit;
|
|
|
if (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'Ŀ<><C4BF><EFBFBD>ͻ<EFBFBD>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'<27><>ȷ<EFBFBD><C8B7>')
|
|
|
and (t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').asstring<>'DZ<>ڿͻ<DABF>')then
|
|
|
begin
|
|
|
showmessage('<27><>ǰ<EFBFBD>ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD>ܸı䣡<C4B1><E4A3A1>');
|
|
|
exit;
|
|
|
end;
|
|
|
t_crm_client.edit;
|
|
|
t_crm_client['<27>ͻ<EFBFBD>״̬']:='Ŀ<><C4BF><EFBFBD>ͻ<EFBFBD>';
|
|
|
t_crm_client.post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton8Click(Sender: TObject);
|
|
|
var
|
|
|
Pnt:Tpoint;
|
|
|
begin
|
|
|
Pnt:=bsSkinButton8.ClientToScreen(Point(0,bsSkinButton8.Height));
|
|
|
PopupMenu1.Popup(Pnt.x,Pnt.y);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.wwDBComboBox10KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
key_wwDBComboBox(Key,wwDBComboBox5);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton18Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client_sales.insert;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton19Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_crm_client_sales);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton20Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_crm_client_sales);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton21Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_crm_client_sales);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_salesAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_crm_client_sales['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_sales['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_sales['״̬']:='<27>½<EFBFBD>';
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_salesBeforePost(
|
|
|
DataSet: TDataSet);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
table_before_post(t_crm_client_sales,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do
|
|
|
begin
|
|
|
close;sql.Clear;
|
|
|
sql.Add('select count(*) CT from t_op_seae where ί<>е<EFBFBD>λ='''+t_crm_client_sales.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_crm_client_sales.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+'''');
|
|
|
sql.Add(' and Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>'''+t_crm_client_sales.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+'''');
|
|
|
open;
|
|
|
if not IsEmpty then begin
|
|
|
if (FieldByName('CT').AsInteger<>0) then begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>ҵ<EFBFBD><D2B5>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
|
|
|
if not DataSet.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>').AsBoolean then begin
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD>ģʽ<C4A3><CABD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if DataSet.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').IsNull then begin
|
|
|
ShowMessage('<27><>ʼ<EFBFBD><CABC><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
if (DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime<DataSet.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').AsDateTime) then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>С<EFBFBD>ڿ<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD>ڣ<EFBFBD>');
|
|
|
Abort;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='Լ<><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then begin
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger=0 then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
end;
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='Լ<><D4BC>ʱ<EFBFBD><CAB1>' then begin
|
|
|
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD>ģʽ').AsString=' ' then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
if DataSet.FieldByName('<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>').AsFloat=0 then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='<27>ֽθ<D7B6><CEB8><EFBFBD>' then begin
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD>ģʽ').AsString=' ' then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
if DataSet.FieldByName('<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>').AsInteger=0 then begin
|
|
|
ShowMessage('<27>ֽθ<D7B6><CEB8>Ѳ<EFBFBD><D1B2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_salesBeforeDelete(
|
|
|
DataSet: TDataSet);
|
|
|
var
|
|
|
aQuery:TAdoQuery;
|
|
|
begin
|
|
|
if trim(t_crm_client_sales.FieldByName('״̬').AsString)='<27><><EFBFBD><EFBFBD>' then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
if not strtobool(get_parameters_value(86,'true')) then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
if (do_data('0008',t_crm_client.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'','','','','')) or (do_data('0008',t_crm_client_sales.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'','','','','')) then
|
|
|
begin
|
|
|
end else begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
|
|
|
abort;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.NMSMTP1Connect(Sender: TObject);
|
|
|
var
|
|
|
StrUserName,strPassword:String;
|
|
|
begin
|
|
|
{
|
|
|
strUserName:=EncodeString(frm_data_share.t_sys_company.FieldByName('<27><>¼<EFBFBD>û<EFBFBD><C3BB><EFBFBD>').AsString);
|
|
|
strPassword:=EncodeString(frm_data_share.t_sys_company.FieldByName('<27><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>').AsString);
|
|
|
nmsmtp1.Transaction('EHLO') ;
|
|
|
nmsmtp1.Transaction('AUTH LOGIN');
|
|
|
nmsmtp1.Transaction(strUserName);
|
|
|
nmsmtp1.Transaction(strPassword);
|
|
|
}
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.ds_crm_client_sales1DataChange(
|
|
|
Sender: TObject; Field: TField);
|
|
|
begin
|
|
|
bsSkinGroupBox11.Visible:=(Trim(t_crm_client_sales.FieldByName('״̬').AsString)='<27><><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton22Click(Sender: TObject);
|
|
|
var
|
|
|
Pnt:Tpoint;
|
|
|
begin
|
|
|
Pnt:=bsSkinButton22.ClientToScreen(Point(0,bsSkinButton22.Height));
|
|
|
PopupMenu3.Popup(Pnt.x,Pnt.y);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N8Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client.SQL.clear;
|
|
|
t_crm_client.sql.add('select * from t_crm_client where (<28>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in ('+''''+'Ŀ<><C4BF>'+''''+','+''''+'ϵͳ'+''''+')');
|
|
|
t_crm_client.sql.add(' or ί<>е<EFBFBD>λ=1)');
|
|
|
t_crm_client.SQL.Add(' and <20>ͻ<EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>'+''''+')');
|
|
|
t_crm_client.SQL.Add(' and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no')
|
|
|
+'order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_crm_client.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N17Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client.SQL.clear;
|
|
|
t_crm_client.sql.add('select * from t_crm_client where (<28>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in ('+''''+'Ŀ<><C4BF>'+''''+','+''''+'ϵͳ'+''''+')');
|
|
|
t_crm_client.sql.add(' or ί<>е<EFBFBD>λ=1)');
|
|
|
t_crm_client.SQL.Add(' and <20>ͻ<EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+')');
|
|
|
t_crm_client.SQL.Add(' and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no')
|
|
|
+'order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_crm_client.open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N19Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client.SQL.clear;
|
|
|
t_crm_client.sql.add('select * from t_crm_client where (<28>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in ('+''''+'Ŀ<><C4BF>'+''''+','+''''+'ϵͳ'+''''+')');
|
|
|
t_crm_client.sql.add(' or ί<>е<EFBFBD>λ=1)');
|
|
|
t_crm_client.SQL.Add(' and <20>ͻ<EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''+')');
|
|
|
t_crm_client.SQL.Add(' and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no')
|
|
|
+'order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_crm_client.open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N21Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client.SQL.clear;
|
|
|
t_crm_client.sql.add('select * from t_crm_client where (<28>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in ('+''''+'Ŀ<><C4BF>'+''''+','+''''+'ϵͳ'+''''+')');
|
|
|
t_crm_client.sql.add(' or ί<>е<EFBFBD>λ=1)');
|
|
|
t_crm_client.SQL.Add(' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client_sales where ״̬ in ('+''''+'<27>½<EFBFBD>'+''''+'))');
|
|
|
t_crm_client.SQL.Add(' and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no')
|
|
|
+'order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_crm_client.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N23Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client.SQL.clear;
|
|
|
t_crm_client.sql.add('select * from t_crm_client where (<28>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in ('+''''+'Ŀ<><C4BF>'+''''+','+''''+'ϵͳ'+''''+')');
|
|
|
t_crm_client.sql.add(' or ί<>е<EFBFBD>λ=1)');
|
|
|
t_crm_client.SQL.Add(' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client_sales where ״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>'+''''+'))');
|
|
|
t_crm_client.SQL.Add(' and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no')
|
|
|
+'order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_crm_client.open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N25Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client.SQL.clear;
|
|
|
t_crm_client.sql.add('select * from t_crm_client where (<28>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in ('+''''+'Ŀ<><C4BF>'+''''+','+''''+'ϵͳ'+''''+')');
|
|
|
t_crm_client.sql.add(' or ί<>е<EFBFBD>λ=1)');
|
|
|
t_crm_client.SQL.Add(' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client_sales where ״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>'+''''+'))');
|
|
|
t_crm_client.SQL.Add(' and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no')
|
|
|
+'order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_crm_client.open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client1DataChange(Sender: TObject;
|
|
|
Field: TField);
|
|
|
begin
|
|
|
bsSkinGroupBox14.Visible:=(Trim(t_crm_client.FieldByName('<27>ͻ<EFBFBD>״̬').AsString)='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N26Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client.SQL.clear;
|
|
|
t_crm_client.sql.add('select * from t_crm_client where (<28>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in ('+''''+'Ŀ<><C4BF>'+''''+','+''''+'ϵͳ'+''''+')');
|
|
|
t_crm_client.sql.add(' or ί<>е<EFBFBD>λ=1)');
|
|
|
t_crm_client.SQL.Add(' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client_sales where ״̬ in ('+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''+'))');
|
|
|
t_crm_client.SQL.Add(' and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no')
|
|
|
+'order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_crm_client.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton23Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_crm_client.IsEmpty then
|
|
|
exit;
|
|
|
if t_crm_client_sales.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
t_crm_client_sales.Edit;
|
|
|
t_crm_client_sales.FieldByName('״̬').AsString:='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
|
|
|
t_crm_client_sales.Post;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N29Click(Sender: TObject);
|
|
|
begin
|
|
|
|
|
|
t_crm_client.SQL.clear;
|
|
|
t_crm_client.sql.add('select * from t_crm_client where (<28>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in ('+''''+'Ŀ<><C4BF>'+''''+','+''''+'ϵͳ'+''''+')');
|
|
|
t_crm_client.sql.add(' or ί<>е<EFBFBD>λ=1)');
|
|
|
t_crm_client.SQL.Add(' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client_sales where ״̬ in ('+''''+'<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>'+''''+'))');
|
|
|
t_crm_client.SQL.Add(' and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no')
|
|
|
+'order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_crm_client.open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_tyAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_crm_client_ty['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_ty['<27><>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>']:=t_crm_client['<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>'];
|
|
|
t_crm_client_ty['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_ty['״̬']:='¼<><C2BC>״̬';
|
|
|
t_crm_client_ty['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_crm_client_ty['<27><><EFBFBD><EFBFBD>']:=date;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_tyBeforeEdit(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if not modify_all then
|
|
|
begin
|
|
|
if t_crm_client_ty.FieldByName('״̬').asstring='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
|
|
|
begin
|
|
|
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
if do_data('3113',t_crm_client_ty.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_crm_client_sales.bsSkinButton24Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_crm_client_ty.IsEmpty then
|
|
|
t_crm_client_ty.insert;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton25Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_crm_client_ty);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton26Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_crm_client_ty);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton27Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_crm_client_ty);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton36Click(Sender: TObject);
|
|
|
begin
|
|
|
if not modify_all then
|
|
|
begin
|
|
|
if t_crm_client_ty.FieldByName('״̬').asstring='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then
|
|
|
begin
|
|
|
showmessage('<27><>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
if do_data('3113',t_crm_client_ty.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;
|
|
|
t_crm_client_ty.edit;
|
|
|
t_crm_client_ty['״̬']:='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
|
|
|
t_crm_client_ty.post;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N33Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client.SQL.clear;
|
|
|
t_crm_client.sql.add('select * from t_crm_client where (<28>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in ('+''''+'Ŀ<><C4BF>'+''''+','+''''+'ϵͳ'+''''+')');
|
|
|
t_crm_client.sql.add(' or ί<>е<EFBFBD>λ=1)');
|
|
|
t_crm_client.SQL.Add(' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client_ty where ״̬ in ('+''''+'<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>'+''''+'))');
|
|
|
t_crm_client.SQL.Add(' and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no')
|
|
|
+'order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_crm_client.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.N31Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client.SQL.clear;
|
|
|
t_crm_client.sql.add('select * from t_crm_client where (<28>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in ('+''''+'Ŀ<><C4BF>'+''''+','+''''+'ϵͳ'+''''+')');
|
|
|
t_crm_client.sql.add(' or ί<>е<EFBFBD>λ=1)');
|
|
|
t_crm_client.SQL.Add(' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client_ty where ״̬ in ('+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''+'))');
|
|
|
t_crm_client.SQL.Add(' and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','no','no','no')
|
|
|
+'order by <20>ͻ<EFBFBD>״̬,<2C>ͻ<EFBFBD><CDBB><EFBFBD>ֵ,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_crm_client.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_tyBeforeInsert(
|
|
|
DataSet: TDataSet);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
if t_crm_client.State in [dsedit,dsinsert] then t_crm_client.Post;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('select * from t_crm_client_ty where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']+'''');
|
|
|
Open;
|
|
|
if Recordset.RecordCount<>0 then begin
|
|
|
showmessage('<27>˿ͻ<CBBF><CDBB>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_tmpaccAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_crm_client_tmpacc['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_tmpacc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_tmpacc['״̬']:='<27>½<EFBFBD>';
|
|
|
t_crm_client_tmpacc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
t_crm_client_tmpacc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_crm_client_tmpacc.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger
|
|
|
:=getAppCount(t_crm_client_tmpacc['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'],'t_crm_client_tmpacc',t_crm_client_tmpacc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'])
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_tmpaccBeforeDelete(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if (trim(t_crm_client_tmpacc.FieldByName('״̬').AsString)='<27><><EFBFBD><EFBFBD>')
|
|
|
or (trim(t_crm_client_tmpacc.FieldByName('״̬').AsString)='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
if not strtobool(get_parameters_value(86,'true')) then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
if (do_data('0008',t_crm_client.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'','','','','')) or (do_data('0008',t_crm_client_tmpacc.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'','','','','')) then
|
|
|
begin
|
|
|
end else begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
|
|
|
abort;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_tmpaccBeforeInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(86,'true')) then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
table_post(t_crm_client);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_tmpaccBeforePost(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
table_before_post(t_crm_client_tmpacc,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
table_before_post(t_crm_client_tmpacc,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
|
|
|
t_crm_client_tmpacc['<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>']:=getProtocolAmt(t_crm_client_tmpacc['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'],t_crm_client_tmpacc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
|
|
|
|
|
|
if not DataSet.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>').AsBoolean then begin
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD>ģʽ<C4A3><CABD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
if DataSet.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').IsNull then begin
|
|
|
ShowMessage('<27><>ʼ<EFBFBD><CABC><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
if (Yearof(DataSet.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').AsDateTime)=Yearof(Date))
|
|
|
and (Monthof(DataSet.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').AsDateTime)=Monthof(Date))
|
|
|
then
|
|
|
begin
|
|
|
ShowMessage('<27><><EFBFBD>²<EFBFBD><C2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>ڣ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='Լ<><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then begin
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger=0 then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
end;
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='Լ<><D4BC>ʱ<EFBFBD><CAB1>' then
|
|
|
begin
|
|
|
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD>ģʽ').AsString=' ' then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
if DataSet.FieldByName('<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>').AsFloat=0 then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='<27>ֽθ<D7B6><CEB8><EFBFBD>' then begin
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD>ģʽ').AsString=' ' then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
if DataSet.FieldByName('<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>').AsInteger=0 then begin
|
|
|
ShowMessage('<27>ֽθ<D7B6><CEB8>Ѳ<EFBFBD><D1B2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton28Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client_tmpacc.insert;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton29Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_crm_client_tmpacc);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton30Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_crm_client_tmpacc);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton31Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_crm_client_tmpacc);
|
|
|
|
|
|
end;
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton32Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_crm_client_tmpacc.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
t_crm_client_tmpacc.Edit;
|
|
|
t_crm_client_tmpacc.FieldByName('״̬').AsString:='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
|
|
|
t_crm_client_tmpacc.Post;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_limitamtAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_crm_client_limitamt['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_limitamt['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_limitamt['״̬']:='<27>½<EFBFBD>';
|
|
|
t_crm_client_limitamt['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_crm_client_limitamt['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
|
|
|
t_crm_client_limitamt.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger
|
|
|
:=getAppCount(t_crm_client_limitamt['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'],'t_crm_client_limitamt',t_crm_client_limitamt['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'])
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_limitamtBeforeDelete(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
|
|
|
if (trim(t_crm_client_limitamt.FieldByName('״̬').AsString)='<27><><EFBFBD><EFBFBD>')
|
|
|
or (trim(t_crm_client_limitamt.FieldByName('״̬').AsString)='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
if not strtobool(get_parameters_value(86,'true')) then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
if (do_data('0008',t_crm_client.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'','','','','')) or (do_data('0008',t_crm_client_limitamt.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'','','','','')) then
|
|
|
begin
|
|
|
end else begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
|
|
|
abort;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_limitamtBeforeInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(86,'true')) then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
table_post(t_crm_client_limitamt);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_limitamtBeforePost(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_crm_client_limitamt['ԭ<><D4AD><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>']:=getProtocolAmt(t_crm_client_limitamt['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'],t_crm_client_limitamt['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
|
|
|
|
|
|
table_before_post(t_crm_client_limitamt,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_crm_client_limitamt,'<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton33Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client_limitamt.insert;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton34Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_crm_client_limitamt);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton35Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_crm_client_limitamt);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton37Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_crm_client_limitamt);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton38Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_crm_client_limitamt.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
t_crm_client_limitamt.Edit;
|
|
|
t_crm_client_limitamt.FieldByName('״̬').AsString:='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
|
|
|
t_crm_client_limitamt.Post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_unlockAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_crm_client_unlock['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_unlock['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_unlock['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
t_crm_client_unlock['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_crm_client_unlock['״̬']:='<27>½<EFBFBD>';
|
|
|
|
|
|
t_crm_client_unlock.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsInteger
|
|
|
:=getAppCount(t_crm_client_unlock['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'],'t_crm_client_unlock',t_crm_client_unlock['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'])
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_unlockBeforeDelete(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if (trim(t_crm_client_unlock.FieldByName('״̬').AsString)='<27><><EFBFBD><EFBFBD>')
|
|
|
or (trim(t_crm_client_unlock.FieldByName('״̬').AsString)='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') then begin
|
|
|
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
if not strtobool(get_parameters_value(86,'true')) then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
if (do_data('0008',t_crm_client.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'','','','','')) or (do_data('0008',t_crm_client_unlock.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'','','','','')) then
|
|
|
begin
|
|
|
end else begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
|
|
|
abort;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_unlockBeforeInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(86,'true')) then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
table_post(t_crm_client);
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_unlockBeforePost(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
table_before_post(t_crm_client_unlock,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_crm_client_unlock,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton39Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client_unlock.insert;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton40Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_crm_client_unlock);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton41Click(Sender: TObject);
|
|
|
begin
|
|
|
if not t_crm_client_unlockitems.IsEmpty then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>ϸ');
|
|
|
Exit;
|
|
|
end;
|
|
|
table_delete(t_crm_client_unlock);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton42Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_crm_client_unlock);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton43Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_crm_client_unlock.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
t_crm_client_unlock.Edit;
|
|
|
t_crm_client_unlock.FieldByName('״̬').AsString:='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
|
|
|
t_crm_client_unlock.Post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_unlockitemsAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_crm_client_unlockitems['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_unlockitems['ID']:=t_crm_client_unlock['ID'];
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_unlockitemsBeforeDelete(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if trim(t_crm_client_unlock.FieldByName('״̬').AsString)='<27><><EFBFBD><EFBFBD>' then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
if not strtobool(get_parameters_value(86,'true')) then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
if (do_data('0008',t_crm_client.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'','','','','')) or (do_data('0008',t_crm_client_unlock.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'','','','','')) then
|
|
|
begin
|
|
|
end else begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
|
|
|
abort;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_unlockitemsBeforeInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(86,'true')) then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
table_post(t_crm_client);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.Edit1KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
if key=#13 then
|
|
|
begin
|
|
|
key:=#0;
|
|
|
bsSkinButton44Click(Sender);
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton44Click(Sender: TObject);
|
|
|
var aAdoQuery:TAdoQuery;
|
|
|
begin
|
|
|
if trim(Edit1.Text)='' then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᵥ<EFBFBD><E1B5A5>');
|
|
|
Exit;
|
|
|
end;
|
|
|
if t_crm_client_unlock.IsEmpty then
|
|
|
begin
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᵥ');
|
|
|
Exit;
|
|
|
end;
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
try
|
|
|
close;sql.Clear;
|
|
|
sql.Add('Select <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_op_seae');
|
|
|
sql.Add('where <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>=:<3A><><EFBFBD>ᵥ<EFBFBD><E1B5A5> and ί<>е<EFBFBD>λ=:ί<>е<EFBFBD>λ and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> in (''Լ<><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'',''Լ<><D4BC>ʱ<EFBFBD><CAB1>'')');
|
|
|
Parameters.ParamByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').value:=trim(Edit1.Text);
|
|
|
Parameters.ParamByName('ί<>е<EFBFBD>λ').value:=t_crm_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
open;First;
|
|
|
if not isempty then
|
|
|
begin
|
|
|
t_crm_client_unlockitems.Insert;
|
|
|
t_crm_client_unlockitems.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString:=FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
t_crm_client_unlockitems.FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=FieldByName('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
|
|
|
t_crm_client_unlockitems.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
|
|
|
//t_crm_client_unlockitems.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
t_crm_client_unlockitems.Post;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
showmessage('ί<>е<EFBFBD>λ:'+t_crm_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring+' û<>и<EFBFBD><D0B8>ᵥ<EFBFBD><E1B5A5>:'+trim(Edit1.Text));
|
|
|
end;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton46Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_crm_client_unlockitems);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton45Click(Sender: TObject);
|
|
|
begin
|
|
|
t_crm_client_class.Insert;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton47Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_crm_client_class);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton48Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_crm_client_class);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton49Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_crm_client_class);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.bsSkinButton50Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_crm_client.IsEmpty then
|
|
|
exit;
|
|
|
if t_crm_client_class.IsEmpty then
|
|
|
exit;
|
|
|
|
|
|
t_crm_client_class.Edit;
|
|
|
t_crm_client_class.FieldByName('״̬').AsString:='<27>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
|
|
|
t_crm_client_class.Post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_classAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_crm_client_class['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_class['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_crm_client_class['״̬']:='<27>½<EFBFBD>';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_classBeforeDelete(
|
|
|
DataSet: TDataSet);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
if trim(t_crm_client_class.FieldByName('״̬').AsString)='<27><><EFBFBD><EFBFBD>' then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
|
|
|
if (do_data('0008',t_crm_client.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'','','','','')) or (do_data('0008',t_crm_client_class.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'','','','','')) then
|
|
|
begin
|
|
|
end else begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
|
|
|
abort;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_classBeforeInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if not strtobool(get_parameters_value(86,'true')) then begin
|
|
|
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD>˷<EFBFBD><CBB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
if (t_crm_client.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString='') then begin
|
|
|
ShowMessage('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
table_post(t_crm_client);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_classBeforePost(
|
|
|
DataSet: TDataSet);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
table_before_post(t_crm_client_class,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_crm_client_class,'<27>ͻ<EFBFBD><CDBB>ȼ<EFBFBD>');
|
|
|
|
|
|
|
|
|
if DataSet.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').IsNull then begin
|
|
|
ShowMessage('<27><>ʼ<EFBFBD><CABC><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
if DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>');
|
|
|
Abort;
|
|
|
end;
|
|
|
if (DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime<DataSet.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').AsDateTime) then begin
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>С<EFBFBD>ڿ<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD>ڣ<EFBFBD>');
|
|
|
Abort;
|
|
|
|
|
|
end;
|
|
|
|
|
|
if not issavecustclass then begin
|
|
|
ShowMessage('<27><>ʼ<EFBFBD><CABC><EFBFBD>ںͽ<DABA><CDBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڽ<EFBFBD><DABD>棡');
|
|
|
Abort;
|
|
|
end;
|
|
|
|
|
|
|
|
|
if (t_crm_client_class.State in [dsinsert]) then begin
|
|
|
|
|
|
end else begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
with aQuery do
|
|
|
begin
|
|
|
close;sql.Clear;
|
|
|
sql.Add('select count(*) CT from t_op_seae where ί<>е<EFBFBD>λ='''+t_crm_client_class.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').asstring+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_crm_client_class.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+'''');
|
|
|
sql.Add(' and Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>'''+t_crm_client_class.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring+' 23:59:59''');
|
|
|
open;
|
|
|
if not IsEmpty then begin
|
|
|
if (FieldByName('CT').AsInteger<>0) then begin
|
|
|
showmessage('<27><><EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
function Tfrm_crm_client_sales.issavecustclass: Boolean;
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
Result:=True;
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
With aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('select * from t_crm_client_class where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_crm_client_class.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+'''');
|
|
|
SQL.Add(' and ( (<28><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><='''+t_crm_client_class.fieldbyname('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='''+t_crm_client_class.fieldbyname('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').AsString+''') ');
|
|
|
SQL.Add(' or (<28><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><='''+t_crm_client_class.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+''' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='''+t_crm_client_class.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+''')) ');
|
|
|
if (t_crm_client_class.fieldbyname('ID').AsString<>'') then begin
|
|
|
SQL.Add(' and ID<>'+t_crm_client_class.fieldbyname('ID').AsString);
|
|
|
end;
|
|
|
open;
|
|
|
if not IsEmpty then begin
|
|
|
Result:=False;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_crm_client_sales.t_crm_client_salesAfterPost(
|
|
|
DataSet: TDataSet);
|
|
|
var
|
|
|
aQuery:TADOQuery;
|
|
|
begin
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
try
|
|
|
With aQuery do begin
|
|
|
Close;SQL.Clear;
|
|
|
SQL.Add('UPDATE t_crm_client SET <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='''+t_crm_client_sales.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asstring+'''');
|
|
|
SQL.Add(' WHERE <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_crm_client_sales.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Asstring+'''');
|
|
|
ExecSQL;
|
|
|
end;
|
|
|
finally
|
|
|
FreeAndNil(aQuery);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end.
|