You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1733 lines
54 KiB
Plaintext

11 months ago
{$INCLUDE t_main.inc}
unit u_crm_client;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid,
dxDBTLCl, dxGrClms, StdCtrls, DBCtrls, wwdblook, Mask, RxLookup,
bsdbctrls, BusinessSkinForm, DB, ADODB, ComCtrls, bsSkinTabs, ExtCtrls,
wwdbedit, Wwdotdot, Wwdbcomb, wwdbdatetimepicker, DBCtrlsEh, Grids,
Wwdbigrd, Wwdbgrid, bsSkinGrids, bsDBGrids,ComObj, cxStyles,DateUtil,
cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit,
cxDBData, cxNavigator, cxDBNavigator, cxGridLevel, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxClasses, cxControls,
cxGridCustomView, cxGrid;
type
Tfrm_crm_client = class(TForm)
bsSkinPanel2: TbsSkinPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinPanel1: TbsSkinPanel;
t_crm_client1: TDataSource;
t_crm_client: TADOQuery;
v_all_client: TADOQuery;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
bsSkinPanel3: TbsSkinPanel;
t_crm_client_limited: TADOQuery;
t_crm_client_limited1: TDataSource;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinGroupBox1: TbsSkinGroupBox;
Label14: TLabel;
wwDBComboBox1: TwwDBComboBox;
Label15: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Label16: TLabel;
Label17: TLabel;
Edit3: TEdit;
Label18: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
Label4: TLabel;
Label12: TLabel;
Label5: TLabel;
Label2: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label10: TLabel;
Label11: TLabel;
Label3: TLabel;
Label13: TLabel;
DBEdit4: TDBEdit;
DBEdit1: TDBEdit;
DBEdit5: TDBEdit;
DBEdit2: TDBEdit;
DBEdit6: TDBEdit;
DBEdit7: TDBEdit;
DBEdit8: TDBEdit;
DBEdit10: TDBEdit;
DBEdit9: TDBEdit;
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox3: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox4: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox11: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox9: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox8: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox7: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox6: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox5: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox12: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox10: TbsSkinDBCheckRadioBox;
bsSkinPageControl2: TbsSkinPageControl;
bsSkinTabSheet3: TbsSkinTabSheet;
Label9: TLabel;
DBMemo2: TDBMemo;
bsSkinTabSheet4: TbsSkinTabSheet;
bsSkinPanel4: TbsSkinPanel;
dxDBGrid2: TdxDBGrid;
dxDBGrid2Column1: TdxDBGridMaskColumn;
bsSkinPanel5: TbsSkinPanel;
bsSkinButton10: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
dxDBGrid3: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
bsSkinDBCheckRadioBox13: TbsSkinDBCheckRadioBox;
t_crm_client_linkman: TADOQuery;
t_crm_client_linkman1: TDataSource;
bsSkinPanel6: TbsSkinPanel;
Label36: TLabel;
Label37: TLabel;
Label38: TLabel;
Label40: TLabel;
Label39: TLabel;
Label41: TLabel;
Label42: TLabel;
Label43: TLabel;
Label44: TLabel;
Label47: TLabel;
Label48: TLabel;
Label49: TLabel;
Label50: TLabel;
Label52: TLabel;
Label51: TLabel;
Label53: TLabel;
dxDBGrid4: TdxDBGrid;
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
dxDBGrid2Column2: TdxDBGridMaskColumn;
dxDBGrid4Column4: TdxDBGridColumn;
dxDBGrid2Column3: TdxDBGridMaskColumn;
bsSkinButton7: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
bsSkinButton13: TbsSkinButton;
bsSkinButton14: TbsSkinButton;
DBEdit35: TDBEdit;
wwDBComboBox2: TwwDBComboBox;
DBEdit37: TDBEdit;
DBEdit39: TDBEdit;
DBEdit38: TDBEdit;
DBEdit36: TDBEdit;
DBEdit40: TDBEdit;
DBEdit41: TDBEdit;
DBEdit42: TDBEdit;
DBEdit43: TDBEdit;
DBEdit44: TDBEdit;
wwDBDateTimePicker1: TwwDBDateTimePicker;
wwDBDateTimePicker2: TwwDBDateTimePicker;
wwDBDateTimePicker4: TwwDBDateTimePicker;
wwDBDateTimePicker3: TwwDBDateTimePicker;
DBMemo3: TDBMemo;
bsSkinButton15: TbsSkinButton;
bsSkinPanel7: TbsSkinPanel;
bsSkinDBCheckRadioBox14: TbsSkinDBCheckRadioBox;
ds_crm_client_sales1: TDataSource;
crmsalse_sheet: TbsSkinTabSheet;
bsSkinPanel8: TbsSkinPanel;
bsSkinButton18: TbsSkinButton;
bsSkinButton19: TbsSkinButton;
bsSkinButton20: TbsSkinButton;
bsSkinButton21: TbsSkinButton;
bsSkinButton16: TbsSkinButton;
bsSkinButton17: TbsSkinButton;
t_crm_client_sales: TADOQuery;
Label27: TLabel;
DBEdit3: TDBEdit;
Label28: TLabel;
DBEdit11: TDBEdit;
DBEdit12: TDBEdit;
Label29: TLabel;
bsSkinPageControl3: TbsSkinPageControl;
bs1: TbsSkinTabSheet;
DBMemo1: TDBMemo;
bs2: TbsSkinTabSheet;
Label20: TLabel;
DBEdit13: TDBEdit;
Label30: TLabel;
DBEdit14: TDBEdit;
DBEdit15: TDBEdit;
Label31: TLabel;
Label32: TLabel;
DBEdit16: TDBEdit;
Label33: TLabel;
Label34: TLabel;
Label35: TLabel;
DBMemo4: TDBMemo;
DBEdit17: TDBEdit;
DBEdit18: TDBEdit;
DBEdit19: TDBEdit;
Label45: TLabel;
Label46: TLabel;
DBEdit20: TDBEdit;
Label54: TLabel;
Edit4: TEdit;
Label55: TLabel;
Edit5: TEdit;
bsSkinButton22: TbsSkinButton;
bsSkinPanel9: TbsSkinPanel;
bsSkinGroupBox3: TbsSkinGroupBox;
Label24: TLabel;
Label25: TLabel;
Label26: TLabel;
wwDBDateTimePicker6: TwwDBDateTimePicker;
wwDBDateTimePicker7: TwwDBDateTimePicker;
wwDBLookupCombo2: TwwDBLookupCombo;
bsSkinGroupBox2: TbsSkinGroupBox;
Label21: TLabel;
Label73: TLabel;
lbl1: TLabel;
Label22: TLabel;
wwDBComboBox13: TwwDBComboBox;
wwDBComboBox12: TwwDBComboBox;
bsSkinDBCheckRadioBox16: TbsSkinDBCheckRadioBox;
DBEdit55: TDBEdit;
bsSkinGroupBox12: TbsSkinGroupBox;
Label77: TLabel;
Label23: TLabel;
DBEdit59: TDBEdit;
bsSkinGroupBox13: TbsSkinGroupBox;
Label79: TLabel;
Label86: TLabel;
lblmonth: TLabel;
lbldate: TLabel;
Label91: TLabel;
wwDBComboBox14: TwwDBComboBox;
wwDBComboBox15: TwwDBComboBox;
DBEdit61: TDBEdit;
dxDBGrid5: TdxDBGrid;
dxDBGrid5ID: TdxDBGridMaskColumn;
dxDBGrid5Column2: TdxDBGridMaskColumn;
dxDBGrid5Column3: TdxDBGridMaskColumn;
dxDBGrid5Column4: TdxDBGridMaskColumn;
dxDBGrid5Column5: TdxDBGridMaskColumn;
dxDBGrid5Column6: TdxDBGridMaskColumn;
dxDBGrid5Column7: TdxDBGridMaskColumn;
dxDBGrid5Column8: TdxDBGridMaskColumn;
dxDBGrid5Column9: TdxDBGridCurrencyColumn;
dxDBGrid5Column10: TdxDBGridDateColumn;
dxDBGrid5Column11: TdxDBGridMaskColumn;
dxDBGrid5Column12: TdxDBGridMaskColumn;
dxDBGrid5Column13: TdxDBGridMaskColumn;
dxDBGrid5Column14: TdxDBGridMaskColumn;
dxDBGrid52: TdxDBGridMaskColumn;
dxDBGrid5Column16: TdxDBGridMaskColumn;
dxDBGrid5Column17: TdxDBGridMaskColumn;
dxDBGrid5Column18: TdxDBGridCheckColumn;
dxDBGrid5Column19: TdxDBGridMaskColumn;
dxDBGrid5Column20: TdxDBGridDateColumn;
dxDBGrid5Column21: TdxDBGridDateColumn;
btab4: TbsSkinTabSheet;
DBMemo5: TDBMemo;
Label56: TLabel;
DBMemo6: TDBMemo;
Label57: TLabel;
DBEdit23: TDBEdit;
Label58: TLabel;
Label60: TLabel;
DBEdit22: TDBEdit;
Label61: TLabel;
DBEdit24: TDBEdit;
Label62: TLabel;
DBEdit25: TDBEdit;
bsSkinDBCheckRadioBox15: TbsSkinDBCheckRadioBox;
dxDBGrid1Column4: TdxDBGridColumn;
Label19: TLabel;
wwDBDateTimePicker5: TwwDBDateTimePicker;
Label63: TLabel;
DBEdit26: TDBEdit;
bsSkinDBCheckRadioBox17: TbsSkinDBCheckRadioBox;
bsSkinTabSheet5: TbsSkinTabSheet;
bsSkinGroupBox4: TbsSkinGroupBox;
Label64: TLabel;
Label65: TLabel;
Label66: TLabel;
Label67: TLabel;
Label68: TLabel;
Label69: TLabel;
DBEdit27: TDBEdit;
DBEdit28: TDBEdit;
DBEdit29: TDBEdit;
DBEdit30: TDBEdit;
DBEdit50: TDBEdit;
DBEdit51: TDBEdit;
bsSkinGroupBox5: TbsSkinGroupBox;
Label59: TLabel;
DBEdit21: TDBEdit;
Label70: TLabel;
wwDBComboBox3: TwwDBComboBox;
bsSkinButton23: TbsSkinButton;
bsSkinDBCheckRadioBox18: TbsSkinDBCheckRadioBox;
dxDBGrid1Column5: TdxDBGridColumn;
dxDBGrid1Column6: TdxDBGridColumn;
Label71: TLabel;
DBComboBoxEh1: TDBComboBoxEh;
Label72: TLabel;
DBEdit31: TDBEdit;
bsSkinButton24: TbsSkinButton;
bsSkinButton25: TbsSkinButton;
bsSkinDBCheckRadioBox19: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox20: TbsSkinDBCheckRadioBox;
bsSkinButton26: TbsSkinButton;
bsSkinDBCheckRadioBox21: TbsSkinDBCheckRadioBox;
Label1: TLabel;
DBEdit32: TDBEdit;
bsSkinButton55: TbsSkinButton;
ADOQuerySub: TADOQuery;
Label75: TLabel;
RxDBLookupCombo31: TRxDBLookupCombo;
bsSkinTabSheet6: TbsSkinTabSheet;
bsSkinPanel10: TbsSkinPanel;
bsSkinButton27: TbsSkinButton;
bsSkinButton28: TbsSkinButton;
bsSkinButton29: TbsSkinButton;
bsSkinButton30: TbsSkinButton;
bsSkinButton31: TbsSkinButton;
bsSkinButton32: TbsSkinButton;
dxDBGrid6: TdxDBGrid;
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
dxDBGridDateColumn1: TdxDBGridDateColumn;
dxDBGridMaskColumn12: TdxDBGridMaskColumn;
t_crm_client_sales_tmp: TADOQuery;
ds_crm_client_sales_tmp1: TDataSource;
Label76: TLabel;
Label78: TLabel;
wwDBDateTimePicker8: TwwDBDateTimePicker;
wwDBDateTimePicker9: TwwDBDateTimePicker;
Label80: TLabel;
DBEdit33: TDBEdit;
Label81: TLabel;
DBEdit34: TDBEdit;
Label82: TLabel;
DBEdit45: TDBEdit;
Label83: TLabel;
DBEdit46: TDBEdit;
Label84: TLabel;
DBEdit47: TDBEdit;
Label85: TLabel;
DBEdit48: TDBEdit;
bsSkinButton33: TbsSkinButton;
OpenDialog1: TOpenDialog;
dbedt1: TDBEdit;
lbl2: TLabel;
Label87: TLabel;
DBEdit49: TDBEdit;
Label88: TLabel;
DBEdit52: TDBEdit;
Label89: TLabel;
DBComboBox1: TDBComboBox;
DBMemo7: TDBMemo;
Label90: TLabel;
bskndbchckrdbxd: TbsSkinDBCheckRadioBox;
Label92: TLabel;
DBEdit53: TDBEdit;
Label93: TLabel;
DBEdit54: TDBEdit;
RxDBLookupCombo14: TRxDBLookupCombo;
RxDBLookupCombo1: TRxDBLookupCombo;
Label94: TLabel;
DBEdit56: TDBEdit;
RxDBLookupCombo9: TRxDBLookupCombo;
wwDBComboBox16: TwwDBComboBox;
Label95: TLabel;
Label96: TLabel;
DBEdit57: TDBEdit;
Label97: TLabel;
Label98: TLabel;
DBEdit58: TDBEdit;
Label99: TLabel;
DBEdit60: TDBEdit;
bsSkinDBCheckRadioBox22: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox23: TbsSkinDBCheckRadioBox;
t_crm_client_Invoice1: TDataSource;
t_crm_client_Invoice: TADOQuery;
cxGrid1: TcxGrid;
cxGrid1DBTableView1: TcxGridDBTableView;
cxGrid1DBTableView1DBColumn1: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn2: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn3: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn4: TcxGridDBColumn;
cxGrid1DBTableView1DBColumn5: TcxGridDBColumn;
cxGrid1Level1: TcxGridLevel;
DBNumberEditEh1: TDBNumberEditEh;
Label74: TLabel;
cxDBNavigator1: TcxDBNavigator;
bsSkinDBCheckRadioBox24: TbsSkinDBCheckRadioBox;
cxGrid1DBTableView1DBColumn6: TcxGridDBColumn;
DBEdit62: TDBEdit;
Label100: TLabel;
dxDBGrid7: TdxDBGrid;
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
dxDBGrid7Column2: TdxDBGridColumn;
dxDBGrid7Column3: TdxDBGridColumn;
dxDBGrid7Column4: TdxDBGridColumn;
dxDBGrid7Column5: TdxDBGridColumn;
dxDBGrid7Column6: TdxDBGridPickColumn;
Label101: TLabel;
Edit6: TEdit;
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure client_filtered(str:string);
procedure bsSkinCheckRadioBox2Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure t_crm_clientAfterInsert(DataSet: TDataSet);
procedure t_crm_clientBeforePost(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 DBEdit8KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit10KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit9KeyPress(Sender: TObject; var Key: Char);
procedure bsSkinDBCheckRadioBox1KeyPress(Sender: TObject;
var Key: Char);
procedure bsSkinDBCheckRadioBox2KeyPress(Sender: TObject;
var Key: Char);
procedure bsSkinDBCheckRadioBox3KeyPress(Sender: TObject;
var Key: Char);
procedure bsSkinDBCheckRadioBox4KeyPress(Sender: TObject;
var Key: Char);
procedure bsSkinDBCheckRadioBox11KeyPress(Sender: TObject;
var Key: Char);
procedure bsSkinDBCheckRadioBox9KeyPress(Sender: TObject;
var Key: Char);
procedure bsSkinDBCheckRadioBox8KeyPress(Sender: TObject;
var Key: Char);
procedure bsSkinDBCheckRadioBox7KeyPress(Sender: TObject;
var Key: Char);
procedure bsSkinDBCheckRadioBox6KeyPress(Sender: TObject;
var Key: Char);
procedure bsSkinDBCheckRadioBox5KeyPress(Sender: TObject;
var Key: Char);
procedure bsSkinDBCheckRadioBox12KeyPress(Sender: TObject;
var Key: Char);
procedure bsSkinDBCheckRadioBox10KeyPress(Sender: TObject;
var Key: Char);
procedure t_crm_clientDeleteError(DataSet: TDataSet; E: EDatabaseError;
var Action: TDataAction);
procedure t_crm_clientPostError(DataSet: TDataSet; E: EDatabaseError;
var Action: TDataAction);
procedure t_crm_clientAfterScroll(DataSet: TDataSet);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure t_crm_clientBeforeDelete(DataSet: TDataSet);
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinPanel2Resize(Sender: TObject);
procedure t_crm_client_limitedAfterInsert(DataSet: TDataSet);
procedure t_crm_client_limitedBeforeInsert(DataSet: TDataSet);
procedure bsSkinDBCheckRadioBox13KeyPress(Sender: TObject;
var Key: Char);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure wwDBComboBox1KeyPress(Sender: TObject; var Key: Char);
procedure t_crm_clientAfterPost(DataSet: TDataSet);
procedure t_crm_clientBeforeCancel(DataSet: TDataSet);
procedure t_crm_clientBeforeEdit(DataSet: TDataSet);
procedure t_crm_clientBeforeInsert(DataSet: TDataSet);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure bsSkinButton15Click(Sender: TObject);
procedure wwDBDateTimePicker5KeyPress(Sender: TObject; var Key: Char);
procedure t_crm_client_salesAfterInsert(DataSet: TDataSet);
procedure bsSkinButton17Click(Sender: TObject);
procedure bsSkinButton16Click(Sender: TObject);
procedure bsSkinButton18Click(Sender: TObject);
procedure bsSkinButton19Click(Sender: TObject);
procedure bsSkinButton20Click(Sender: TObject);
procedure bsSkinButton21Click(Sender: TObject);
procedure t_crm_client_salesBeforePost(DataSet: TDataSet);
procedure t_crm_client_salesBeforeDelete(DataSet: TDataSet);
procedure t_crm_client_salesBeforeEdit(DataSet: TDataSet);
procedure t_crm_client_salesBeforeInsert(DataSet: TDataSet);
procedure bsSkinButton22Click(Sender: TObject);
procedure wwDBComboBox13Change(Sender: TObject);
procedure wwDBComboBox15Change(Sender: TObject);
procedure bsSkinButton23Click(Sender: TObject);
procedure bsSkinButton24Click(Sender: TObject);
procedure bsSkinButton25Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure t_crm_client_linkmanNewRecord(DataSet: TDataSet);
procedure t_crm_client_salesAfterPost(DataSet: TDataSet);
procedure bsSkinButton26Click(Sender: TObject);
procedure bsSkinButton55Click(Sender: TObject);
procedure bsSkinButton32Click(Sender: TObject);
procedure bsSkinButton31Click(Sender: TObject);
procedure bsSkinButton27Click(Sender: TObject);
procedure bsSkinButton28Click(Sender: TObject);
procedure bsSkinButton29Click(Sender: TObject);
procedure bsSkinButton30Click(Sender: TObject);
procedure t_crm_client_sales_tmpAfterInsert(DataSet: TDataSet);
procedure t_crm_client_sales_tmpBeforePost(DataSet: TDataSet);
procedure bsSkinButton33Click(Sender: TObject);
procedure dxDBGrid1ChangeNode(Sender: TObject; OldNode,
Node: TdxTreeListNode);
procedure dxDBGrid1Click(Sender: TObject);
procedure crmsalse_sheetShow(Sender: TObject);
procedure RxDBLookupCombo14KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo1Enter(Sender: TObject);
procedure RxDBLookupCombo1Exit(Sender: TObject);
procedure RxDBLookupCombo14Enter(Sender: TObject);
procedure RxDBLookupCombo14Exit(Sender: TObject);
procedure DBEdit4Exit(Sender: TObject);
procedure wwDBComboBox16DropDown(Sender: TObject);
private
{ Private declarations }
procedure dzhllrVisible();
public
{ Public declarations }
end;
var
frm_crm_client: Tfrm_crm_client;
frm_crm_client_num:integer;
implementation
uses u_main, my_sys_function, u_data_share, u_sys_progress;
{$R *.dfm}
procedure Tfrm_crm_client.client_filtered(str:string);
begin
t_crm_client.Filtered:=false;
t_crm_client.Filter:=str+'=1';
t_crm_client.Filtered:=true;
end;
procedure Tfrm_crm_client.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_crm_client.bsSkinButton1Click(Sender: TObject);
begin
t_crm_client.Insert;
end;
procedure Tfrm_crm_client.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_crm_client_Invoice);
table_post(t_crm_client);
end;
procedure Tfrm_crm_client.bsSkinButton4Click(Sender: TObject);
begin
table_delete(t_crm_client);
end;
procedure Tfrm_crm_client.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_crm_client);
end;
procedure Tfrm_crm_client.bsSkinCheckRadioBox2Click(Sender: TObject);
begin
t_crm_client.Filtered:=false;
end;
procedure Tfrm_crm_client.FormShow(Sender: TObject);
begin
{
if (wwDBComboBox15.text='<27>̶<EFBFBD>')and(bsSkinGroupBox13.Visible) then
DBEdit61.Visible:=true
else
DBEdit61.Visible:=false ;
lblmonth.Visible:=DBEdit61.Visible ;
lbldate.Visible:=DBEdit61.Visible ;
}
{
if not strtobool(get_parameters_value(4,'false')) then
begin
bsSkinTabSheet2.TabVisible:=false;
end
else
begin
}
bsSkinTabSheet2.TabVisible:=true;
t_crm_client_limited.open;
t_crm_client_Invoice.Open;
{$IFDEF KHJSXX}
{$ELSE}
crmsalse_sheet.tabvisible:=false;
{$ENDIF}
// end;
if trim(get_parameters_value(159,'false'))<>'' then bsSkinButton55.Visible:=True else bsSkinButton55.Visible:=false;
if (not if_open('283')) and (not if_open('202')) then
begin
bsSkinTabSheet6.TabVisible:=false;
bsSkinTabSheet5.TabVisible:=false;
btab4.TabVisible:=false;
crmsalse_sheet.TabVisible:=false;
bsSkinTabSheet2.TabVisible:=false;
end;
end;
procedure Tfrm_crm_client.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
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;
frm_crm_client.Hide;
frm_crm_client.ManualFloat(frm_crm_client.BoundsRect );
frm_main.freeTabs('frm_crm_client');
action:=cafree;
frm_crm_client:=nil;
end;
procedure Tfrm_crm_client.t_crm_clientAfterInsert(DataSet: TDataSet);
begin
t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
frm_crm_client_num:=1;
t_crm_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='Լ<><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_crm_client['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
end;
procedure Tfrm_crm_client.t_crm_clientBeforePost(DataSet: TDataSet);
var
aQuery:TAdoQuery;
begin
if t_crm_client.State=dsinsert then
begin
if Length(Trim(DBEdit4.Text))>6 then
begin
ShowMessage('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡');
abort;
end ;
end;
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 (t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asboolean=false)and
(t_crm_client.fieldbyname('<27><>վ').asboolean=false)and
(t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>').asboolean=false)and
(t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asboolean=false)and
(t_crm_client.fieldbyname('ί<>е<EFBFBD>λ').asboolean=false)and
(t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>').asboolean=false)and
(t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>').asboolean=false)and
(t_crm_client.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD>').asboolean=false)and
(t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asboolean=false)and
(t_crm_client.fieldbyname('֪ͨ<CDA8><D6AA>').asboolean=false)and
(t_crm_client.fieldbyname('<27><><EFBFBD>չ<EFBFBD>˾').asboolean=false)and
(t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>').asboolean=false)and
(t_crm_client.fieldbyname('<27><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>').asboolean=false)and
(t_crm_client.fieldbyname('<27>ֿ<EFBFBD>').asboolean=false)and
(t_crm_client.fieldbyname('<27><><EFBFBD>ݹ<EFBFBD>˾').asboolean=false)then
begin
showmessage('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>վ<EFBFBD><D5BE><EFBFBD><EFBFBD><EFBFBD>ӡ<EFBFBD><D3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD>ί<EFBFBD>е<EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ջ<EFBFBD><D5BB>ˡ<EFBFBD><CBA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˡ<EFBFBD>֪ͨ<CDA8>ˡ<EFBFBD><CBA1><EFBFBD><EFBFBD>չ<EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݹ<EFBFBD>˾,<2C>ֿ<EFBFBD><D6BF><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>');
abort;
end;
if t_crm_client.State=dsedit then
begin
if t_crm_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').OldValue<>t_crm_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString then
begin
frm_crm_client_num:=2;
end
else
frm_crm_client_num:=0;
end;
aQuery:=CreateAdoQuery;
try
with aQuery do begin
sql.Text:='select count(*) as ct from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><>'''+t_crm_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+''' and <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>='''+t_crm_client.fieldbyname('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').AsString+'''';
open;
if fieldbyname('ct').AsInteger<>0 then
showmessage('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>');
end;
finally
freeandnil(aQuery);
end;
end;
procedure Tfrm_crm_client.DBEdit4KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit1);
end;
procedure Tfrm_crm_client.DBEdit5KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit2);
end;
procedure Tfrm_crm_client.DBEdit2KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit6);
end;
procedure Tfrm_crm_client.DBEdit6KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit7);
end;
procedure Tfrm_crm_client.DBEdit7KeyPress(Sender: TObject; var Key: Char);
begin
key_wwDBDateTimePicker(key,wwDBDateTimePicker5);
end;
procedure Tfrm_crm_client.DBEdit8KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit10);
end;
procedure Tfrm_crm_client.DBEdit10KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit9);
end;
procedure Tfrm_crm_client.DBEdit9KeyPress(Sender: TObject; var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
end;
procedure Tfrm_crm_client.bsSkinDBCheckRadioBox1KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox2);
end;
procedure Tfrm_crm_client.bsSkinDBCheckRadioBox2KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox3);
end;
procedure Tfrm_crm_client.bsSkinDBCheckRadioBox3KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox4);
end;
procedure Tfrm_crm_client.bsSkinDBCheckRadioBox4KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox11);
end;
procedure Tfrm_crm_client.bsSkinDBCheckRadioBox11KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox9);
end;
procedure Tfrm_crm_client.bsSkinDBCheckRadioBox9KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox8);
end;
procedure Tfrm_crm_client.bsSkinDBCheckRadioBox8KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox7);
end;
procedure Tfrm_crm_client.bsSkinDBCheckRadioBox7KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox6);
end;
procedure Tfrm_crm_client.bsSkinDBCheckRadioBox6KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox5);
end;
procedure Tfrm_crm_client.bsSkinDBCheckRadioBox5KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox12);
end;
procedure Tfrm_crm_client.bsSkinDBCheckRadioBox12KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox10);
end;
procedure Tfrm_crm_client.bsSkinDBCheckRadioBox10KeyPress(Sender: TObject;
var Key: Char);
begin
key_bsSkinDBCheckRadioBox(Key,bsSkinDBCheckRadioBox13);
end;
procedure Tfrm_crm_client.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.t_crm_clientPostError(DataSet: TDataSet;
E: EDatabaseError; var Action: TDataAction);
begin
showmessage('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܱ<EFBFBD><DCB1>棡');
end;
procedure Tfrm_crm_client.t_crm_clientAfterScroll(DataSet: TDataSet);
begin
if v_all_client.IsEmpty then
begin
DBEdit4.ReadOnly:=false;
DBEdit5.ReadOnly:=false;
end
else
begin
DBEdit4.ReadOnly:=true;
DBEdit5.ReadOnly:=true;
end;
end;
procedure Tfrm_crm_client.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_crm_client,'<27><><EFBFBD><EFBFBD>');
end;
procedure Tfrm_crm_client.t_crm_clientBeforeDelete(DataSet: TDataSet);
begin
if not if_open('202') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
abort;
end;
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,'','','')=false then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
abort;
end;
v_all_client.Open;
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>');
v_all_client.Close;
abort;
end;
v_all_client.Close;
//if t_crm_client.State<>dsinsert then
//SendMsg_gonggao('54','');
end;
procedure Tfrm_crm_client.DBEdit1KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit5);
end;
procedure Tfrm_crm_client.RxDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo14);
end;
procedure Tfrm_crm_client.bsSkinButton6Click(Sender: TObject);
begin
table_post(t_crm_client);
IF t_crm_client.IsEmpty then
exit;
frm_data_share.t_sys_department.first;
while not frm_data_share.t_sys_department.eof do
begin
if not t_crm_client_limited.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',frm_data_share.t_sys_department.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[])then
begin
t_crm_client_limited.insert;
t_crm_client_limited['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_sys_department.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_crm_client_limited.post;
end;
frm_data_share.t_sys_department.next;
end;
end;
procedure Tfrm_crm_client.bsSkinButton10Click(Sender: TObject);
begin
table_post(t_crm_client);
IF t_crm_client.IsEmpty then
exit;
if not t_crm_client_limited.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',frm_data_share.t_sys_department.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,[])then
begin
t_crm_client_limited.insert;
t_crm_client_limited['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_sys_department.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
t_crm_client_limited.post;
end;
end;
procedure Tfrm_crm_client.bsSkinButton11Click(Sender: TObject);
begin
if t_crm_client_limited.IsEmpty then
exit;
t_crm_client_limited.Delete;
end;
procedure Tfrm_crm_client.bsSkinPanel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round(bsSkinPanel2.Width/8);
bsSkinButton1.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton8.Width:=i;
bsSkinButton9.Width:=i;
bsSkinButton15.Width:=i;
end;
procedure Tfrm_crm_client.t_crm_client_limitedAfterInsert(
DataSet: TDataSet);
begin
t_crm_client_limited['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
end;
procedure Tfrm_crm_client.t_crm_client_limitedBeforeInsert(
DataSet: TDataSet);
begin
table_post(t_crm_client);
end;
procedure Tfrm_crm_client.bsSkinDBCheckRadioBox13KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo1);
end;
procedure Tfrm_crm_client.bsSkinButton9Click(Sender: TObject);
begin
wwDBComboBox1.text:='';
Edit1.text:='';
Edit2.text:='';
Edit3.text:='';
RxDBLookupCombo2.ClearValue;
end;
procedure Tfrm_crm_client.bsSkinButton8Click(Sender: TObject);
var
str:widestring;
begin
str:='where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><>'+''''+'Ŀ<><C4BF>'+'''';
if wwDBComboBox1.text<>'' then
begin
str:=str+' and '+wwDBComboBox1.text+'=1';
end;
if Edit1.text<>''then
begin
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
end;
if Edit2.text<>''then
begin
str:=str+' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit2.text+'%'+'''';
end;
if Edit3.text<>''then
begin
str:=str+' and <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB> like '+''''+'%'+Edit3.text+'%'+'''';
end;
if RxDBLookupCombo2.DisplayValue<>''then
begin
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo2.DisplayValue+'''';
end;
if Edit4.text<>''then
begin
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit4.text+'%'+'''';
end;
if Edit5.text<>''then
begin
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit5.text+'%'+'''';
end;
if Edit6.text<>''then
begin
str:=str+' and EXISTS (select 1 from t_crm_client_Invoice WHERE t_crm_client_Invoice.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_crm_client.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> AND <20><>Ʊ̧ͷ like '+''''+'%'+Edit6.text+'%'+''')';
end;
t_crm_client.close;
t_crm_client.sql.clear;
t_crm_client.sql.add('select * from t_crm_client '+str+' and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27>ͷ<EFBFBD>Ա','no','no')+' order by <20><><EFBFBD><EFBFBD>');
t_crm_client.open;
dzhllrVisible();
end;
procedure Tfrm_crm_client.wwDBComboBox1KeyPress(Sender: TObject;
var Key: Char);
begin
IF key=#13 then
begin
key:=#0;
frm_crm_client.bsSkinButton8Click(Sender);
end;
end;
procedure Tfrm_crm_client.t_crm_clientAfterPost(DataSet: TDataSet);
begin
{
if frm_crm_client_num=1 then
SendMsg_gonggao('53','<27>¿ͻ<C2BF>:'+t_crm_client['<27><><EFBFBD><EFBFBD>']+','+t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']);
if frm_crm_client_num=2 then
SendMsg_gonggao('54','');
}
frm_data_share.t_crm_client.Requery;
frm_data_share.t_crm_client_all.Requery;
frm_crm_client_num:=0;
end;
procedure Tfrm_crm_client.t_crm_clientBeforeCancel(DataSet: TDataSet);
begin
frm_crm_client_num:=0;
end;
procedure Tfrm_crm_client.t_crm_clientBeforeEdit(DataSet: TDataSet);
begin
if not if_open('283') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
abort;
end;
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,'','','')=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.t_crm_clientBeforeInsert(DataSet: TDataSet);
begin
if not if_open('202') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
abort;
end;
end;
procedure Tfrm_crm_client.bsSkinButton7Click(Sender: TObject);
begin
t_crm_client_linkman.insert;
end;
procedure Tfrm_crm_client.bsSkinButton12Click(Sender: TObject);
begin
table_post(t_crm_client_linkman);
end;
procedure Tfrm_crm_client.bsSkinButton13Click(Sender: TObject);
begin
table_delete(t_crm_client_linkman);
end;
procedure Tfrm_crm_client.bsSkinButton14Click(Sender: TObject);
begin
table_cancel(t_crm_client_linkman);
end;
procedure Tfrm_crm_client.bsSkinButton15Click(Sender: TObject);
begin
if not if_open('202') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
abort;
end;
sys_print('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD>ϴ<EFBFBD>ӡ',2,nil,nil,nil,nil,t_crm_client1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_crm_client.wwDBDateTimePicker5KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit8);
end;
procedure Tfrm_crm_client.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>';
t_crm_client_sales['<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>']:=0;
t_crm_client_sales['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_crm_client_sales['<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>']:=0;
t_crm_client_sales['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_crm_client_sales['<27><><EFBFBD><EFBFBD>ģʽ']:='<27><><EFBFBD>̶<EFBFBD>';
end;
procedure Tfrm_crm_client.bsSkinButton17Click(Sender: TObject);
begin
t_crm_client_sales.Prior ;
end;
procedure Tfrm_crm_client.bsSkinButton16Click(Sender: TObject);
begin
t_crm_client_sales.Next ;
end;
procedure Tfrm_crm_client.bsSkinButton18Click(Sender: TObject);
begin
t_crm_client_sales.insert;
end;
procedure Tfrm_crm_client.bsSkinButton19Click(Sender: TObject);
begin
table_post(t_crm_client_sales);
end;
procedure Tfrm_crm_client.bsSkinButton20Click(Sender: TObject);
begin
table_delete(t_crm_client_sales);
end;
procedure Tfrm_crm_client.bsSkinButton21Click(Sender: TObject);
begin
table_cancel(t_crm_client_sales);
end;
procedure Tfrm_crm_client.t_crm_client_salesBeforePost(DataSet: TDataSet);
var
dstype,dsdsricp:string;
begin
table_before_post(t_crm_client_sales,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_crm_client_sales,'<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>');
table_before_post(t_crm_client_sales,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
if (MonthsBetween(DataSet.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').asDatetime,DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asDatetime)>18) then begin
if MessageDlg('<27>ÿͻ<C3BF><CDBB><EFBFBD><EFBFBD>ڳ<EFBFBD>18<31><38><EFBFBD>£<EFBFBD><C2A3><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD>Ƿ񱣴棿',mtWarning,[mbYes,mbNo],0)<>mrYes then begin
Abort;
end;
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><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>ģʽ').AsString='<27><><EFBFBD>̶<EFBFBD>' then
DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asinteger:=0 ;
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;
if (DataSet.State in [dsinsert]) then begin dstype:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dsdsricp:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>:'+t_crm_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+';';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+';';
dsdsricp:=dsdsricp+'<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>:'+DataSet.fieldbyname('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').AsString+';';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+';';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD>ģʽ:'+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+';';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+';';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>ģʽ').AsString+';';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD>ϰ<EFBFBD><CFB0>:'+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>ϰ<EFBFBD><CFB0>').AsString+';';
dsdsricp:=dsdsricp+'<27>ֽ׶θ<D7B6><CEB8><EFBFBD>:'+DataSet.fieldbyname('<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>').AsString+';';
dsdsricp:=dsdsricp+'<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>:'+DataSet.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>').AsString+';';
end else begin dstype:='<27>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>';
dsdsricp:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>:'+t_crm_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+';';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+VarToStrDef(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').NewValue,'')+'['+VarToStrDef(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OldValue,'')+']';
dsdsricp:=dsdsricp+'<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>:'+VarToStrDef(DataSet.fieldbyname('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').NewValue,'')+'['+VarToStrDef(DataSet.fieldbyname('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').OldValue,'')+']';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+VarToStrDef(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').NewValue,'')+'['+VarToStrDef(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OldValue,'')+']';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD>ģʽ:'+VarToStrDef(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').NewValue,'')+'['+VarToStrDef(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OldValue,'')+']';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+VarToStrDef(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').NewValue,'')+'['+VarToStrDef(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').OldValue,'')+']';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+VarToStrDef(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>ģʽ').NewValue,'')+'['+VarToStrDef(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>ģʽ').OldValue,'')+']';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD>ϰ<EFBFBD><CFB0>:'+VarToStrDef(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>ϰ<EFBFBD><CFB0>').NewValue,'')+'['+VarToStrDef(DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>ϰ<EFBFBD><CFB0>').OldValue,'')+']';
dsdsricp:=dsdsricp+'<27>ֽ׶θ<D7B6><CEB8><EFBFBD>:'+VarToStrDef(DataSet.fieldbyname('<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>').NewValue,'')+'['+VarToStrDef(DataSet.fieldbyname('<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>').OldValue,'')+']';
dsdsricp:=dsdsricp+'<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>:'+VarToStrDef(DataSet.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>').NewValue,'')+'['+VarToStrDef(DataSet.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>').OldValue,'')+']';
end;
InsertSysLog(dstype,dsdsricp);
end;
procedure Tfrm_crm_client.t_crm_client_salesBeforeDelete(
DataSet: TDataSet);
var
dstype,dsdsricp:string;
begin
if 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 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;
dstype:='ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dsdsricp:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>:'+t_crm_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+';';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+';';
dsdsricp:=dsdsricp+'<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>:'+DataSet.fieldbyname('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').AsString+';';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+';';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD>ģʽ:'+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+';';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+';';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>ģʽ').AsString+';';
dsdsricp:=dsdsricp+'<27><><EFBFBD><EFBFBD>ϰ<EFBFBD><CFB0>:'+DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>ϰ<EFBFBD><CFB0>').AsString+';';
dsdsricp:=dsdsricp+'<27>ֽ׶θ<D7B6><CEB8><EFBFBD>:'+DataSet.fieldbyname('<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>').AsString+';';
dsdsricp:=dsdsricp+'<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>:'+DataSet.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>').AsString+';';
InsertSysLog(dstype,dsdsricp);
end;
procedure Tfrm_crm_client.t_crm_client_salesBeforeEdit(DataSet: TDataSet);
begin
if 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 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.t_crm_client_salesBeforeInsert(
DataSet: TDataSet);
begin
table_post(t_crm_client);
end;
procedure Tfrm_crm_client.bsSkinButton22Click(Sender: TObject);
begin
frm_main.view_momo(t_crm_client1,'<27><>ע');
end;
procedure Tfrm_crm_client.wwDBComboBox13Change(Sender: TObject);
begin
if wwDBComboBox13.Text='Լ<><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
begin
bsSkinGroupBox12.Visible:=true ;
bsSkinGroupBox13.Visible:=false ;
end
else if wwDBComboBox13.Text='Լ<><D4BC>ʱ<EFBFBD><CAB1>' then
begin
bsSkinGroupBox12.Visible:=false ;
bsSkinGroupBox13.Visible:=true ;
end
else
begin //<2F>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
bsSkinGroupBox12.Visible:=false ;
bsSkinGroupBox13.Visible:=false ;
end
end;
procedure Tfrm_crm_client.wwDBComboBox15Change(Sender: TObject);
begin
{
if (wwDBComboBox15.text='<27>̶<EFBFBD>')and(bsSkinGroupBox13.Visible) then
DBEdit61.Visible:=true
else
DBEdit61.Visible:=false ;
lblmonth.Visible:=DBEdit61.Visible ;
lbldate.Visible:=DBEdit61.Visible ;
}
end;
procedure Tfrm_crm_client.bsSkinButton23Click(Sender: TObject);
var
i:Integer;
begin
if not if_open('283') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
abort;
end;
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,'','','')=false then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
abort;
end;
if strtobool(get_parameters_value(154,'false')) then begin
if t_crm_client.fieldbyname('<27><><EFBFBD>ϲ<EFBFBD>ѯ').AsBoolean then begin
frm_main.qryweb.close;
frm_main.qryweb.sql.clear;
frm_main.qryweb.sql.add('delete from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_crm_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+'''');
frm_main.qryweb.ExecSQL;
t_crm_client.Edit;
t_crm_client['<27><><EFBFBD>ϲ<EFBFBD>ѯ']:=0;
t_crm_client.post;
end else begin
frm_main.qryweb.close;
frm_main.qryweb.sql.clear;
frm_main.qryweb.sql.add('select * from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+t_crm_client.fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+'''');
frm_main.qryweb.open;
if frm_main.qryweb.IsEmpty then begin
frm_main.qryweb.Insert;
for i:=0 to frm_main.qryweb.FieldCount-1 do begin
if t_crm_client.FindField(frm_main.qryweb.Fields[i].fieldname)<>nil then
frm_main.qryweb.Fields[i].Value:=t_crm_client.fieldbyname(frm_main.qryweb.Fields[i].FieldName).Value;
end;
frm_main.qryweb.post;
end else begin
frm_main.qryweb.Edit;
for i:=0 to frm_main.qryweb.FieldCount-1 do begin
if t_crm_client.FindField(frm_main.qryweb.Fields[i].fieldname)<>nil then
frm_main.qryweb.Fields[i].Value:=t_crm_client.fieldbyname(frm_main.qryweb.Fields[i].FieldName).Value;
end;
frm_main.qryweb.post;
end;
t_crm_client.Edit;
t_crm_client['<27><><EFBFBD>ϲ<EFBFBD>ѯ']:=1;
t_crm_client.post;
end;
end;
end;
procedure Tfrm_crm_client.bsSkinButton24Click(Sender: TObject);
begin
t_crm_client.Edit;
DBMemo1.Clear;
DBMemo1.Lines.Add(t_crm_client.fieldbyname('Ӣ<><D3A2>ȫ<EFBFBD><C8AB>').asstring);
DBMemo1.Lines.Add('ADDR:'+t_crm_client.fieldbyname('Ӣ<>ĵ<EFBFBD>ַ').asstring);
DBMemo1.Lines.Add('TEL:'+t_crm_client.fieldbyname('<27>绰').asstring);
DBMemo1.Lines.Add('FAX:'+t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
DBMemo4.Clear;
DBMemo4.Lines.Add(t_crm_client.fieldbyname('Ӣ<><D3A2>ȫ<EFBFBD><C8AB>').asstring);
DBMemo4.Lines.Add('ADDR:'+t_crm_client.fieldbyname('Ӣ<>ĵ<EFBFBD>ַ').asstring);
DBMemo4.Lines.Add('TEL:'+t_crm_client.fieldbyname('<27>绰').asstring);
DBMemo4.Lines.Add('FAX:'+t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
t_crm_client.Post;
end;
procedure Tfrm_crm_client.bsSkinButton25Click(Sender: TObject);
begin
if trim(t_crm_client.fieldbyname('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').asstring)<>'' then
begin
t_crm_client.Edit;
t_crm_client.fieldbyname('<27><>Ʊ̧ͷ').asstring:=t_crm_client.fieldbyname('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').asstring;
t_crm_client.Post;
end;
end;
procedure Tfrm_crm_client.FormCreate(Sender: TObject);
begin
t_crm_client.close;
t_crm_client.sql.clear;
t_crm_client.sql.add('select top 50 * from t_crm_client where 1=1 and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27>ͷ<EFBFBD>Ա','no','no')+' order by <20><><EFBFBD><EFBFBD>');
t_crm_client.open;
// v_all_client.open;
// t_crm_client_linkman.Open;
t_crm_client_sales.Open;
t_crm_client_sales_tmp.Open ;
t_crm_client_linkman.Open;
// frm_data_share.t_sys_employee.Requery();
// frm_data_share.t_sys_department.Requery();
end;
procedure Tfrm_crm_client.t_crm_client_linkmanNewRecord(DataSet: TDataSet);
begin
t_crm_client_linkman.FieldByName('<27>Ա<EFBFBD>').AsString:='<27><>';
end;
procedure Tfrm_crm_client.t_crm_client_salesAfterPost(DataSet: TDataSet);
var aAdoQuery:TAdoQuery;
begin
if Trim(t_crm_client_sales.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)<>'' then
begin
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;sql.Clear;
sql.Add('Update t_op_seae set <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
sql.Add('where ί<>е<EFBFBD>λ=:ί<>е<EFBFBD>λ and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>=:Date1 and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><=:date2');
Parameters.ParamByName('ί<>е<EFBFBD>λ').Value:=Trim(t_crm_client_sales.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=Trim(t_crm_client_sales.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
Parameters.ParamByName('Date1').Value:=t_crm_client_sales.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').Value;
Parameters.ParamByName('Date2').Value:=t_crm_client_sales.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value;
ExecSQL;
finally
Free;
end;
end;
end;
procedure Tfrm_crm_client.bsSkinButton26Click(Sender: TObject);
var aAdoQuery,aAdoQuerySel:TAdoQuery;
begin
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;sql.Clear;
sql.Add('Update t_op_seae set <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD> ');
sql.Add('where ί<>е<EFBFBD>λ=:ί<>е<EFBFBD>λ and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>=:Date1 and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><=:date2');
finally
end;
aAdoQuerySel:=CreateAdoQuery;
with aAdoQuerySel do
try
Close;sql.Clear;
sql.Add('select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_crm_client_sales');
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>=:Date1 and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>''''');
Parameters.ParamByName('Date1').Value:='2012-08-25';
Open;First;
while not eof do
begin
aAdoQuery.Close;
aAdoQuery.Parameters.ParamByName('ί<>е<EFBFBD>λ').Value:=Trim(aAdoQuerySel.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString);
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=Trim(aAdoQuerySel.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString);
aAdoQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>').Value:=Trim(getzq(aAdoQuerySel.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString));
aAdoQuery.Parameters.ParamByName('Date1').Value:=aAdoQuerySel.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').Value;
aAdoQuery.Parameters.ParamByName('Date2').Value:=aAdoQuerySel.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value;
aAdoQuery.ExecSQL;
Next;
end;
finally
Free;
end;
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD>');
end;
procedure Tfrm_crm_client.bsSkinButton55Click(Sender: TObject);
var srcbsNo:string;
aQuery,aQuery2:TADOQuery;
aRate:double;
begin
with ADOQuerySub do
try
Close;sql.Clear;
sql.Add('select * from t_crm_client_sales');
sql.Add('where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:sname');
Parameters.ParamByName('sname').Value:=t_crm_client.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
Open;First;
if IsEmpty then
begin
ShowMessage('Aϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><EFBFBD>ڿͻ<DABF>Ϊ:'+t_crm_client.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString+'<27>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD><EFBFBD>Ϣ');
Exit;
end;
finally
end;
if t_crm_client_sales.RecordCount>=1 then
begin
ShowMessage('<27>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD><EFBFBD>Ϣ,<2C><>У<EFBFBD><D0A3>');
Exit;
end;
t_crm_client_sales.Insert;
t_crm_client_sales.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').Value:=ADOQuerySub.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').Value;
t_crm_client_sales.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=ADOQuerySub.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value;
t_crm_client_sales.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=ADOQuerySub.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value;
t_crm_client_sales.FieldByName('<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>').Value:=ADOQuerySub.FieldByName('<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>').Value;
t_crm_client_sales.FieldByName('<27><><EFBFBD><EFBFBD>ģʽ').Value:=ADOQuerySub.FieldByName('<27><><EFBFBD><EFBFBD>ģʽ').Value;
t_crm_client_sales.FieldByName('<27><><EFBFBD><EFBFBD>ģʽ').Value:=ADOQuerySub.FieldByName('<27><><EFBFBD><EFBFBD>ģʽ').Value;
t_crm_client_sales.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=ADOQuerySub.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value;
t_crm_client_sales.Post;
end;
procedure Tfrm_crm_client.bsSkinButton32Click(Sender: TObject);
begin
t_crm_client_sales_tmp.Prior ;
end;
procedure Tfrm_crm_client.bsSkinButton31Click(Sender: TObject);
begin
t_crm_client_sales_tmp.Next ;
end;
procedure Tfrm_crm_client.bsSkinButton27Click(Sender: TObject);
begin
t_crm_client_sales_tmp.insert;
end;
procedure Tfrm_crm_client.bsSkinButton28Click(Sender: TObject);
begin
table_post(t_crm_client_sales_tmp);
end;
procedure Tfrm_crm_client.bsSkinButton29Click(Sender: TObject);
begin
table_delete(t_crm_client_sales_tmp);
end;
procedure Tfrm_crm_client.bsSkinButton30Click(Sender: TObject);
begin
table_cancel(t_crm_client_sales_tmp);
end;
procedure Tfrm_crm_client.t_crm_client_sales_tmpAfterInsert(
DataSet: TDataSet);
begin
t_crm_client_sales_tmp['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
t_crm_client_sales_tmp['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_crm_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_crm_client_sales_tmp['״̬']:='<27>½<EFBFBD>';
t_crm_client_sales_tmp['<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>']:=0;
t_crm_client_sales_tmp['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_crm_client_sales_tmp['<27><><EFBFBD>ѽ<EFBFBD><D1BD><EFBFBD>']:=0;
t_crm_client_sales_tmp['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_crm_client_sales_tmp['<27><><EFBFBD><EFBFBD>ģʽ']:='<27><><EFBFBD>̶<EFBFBD>';
end;
procedure Tfrm_crm_client.t_crm_client_sales_tmpBeforePost(
DataSet: TDataSet);
begin
table_before_post(t_crm_client_sales_tmp,'<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>');
if t_crm_client_sales_tmp.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').IsNull then
begin
t_crm_client_sales_tmp.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=IncMonth(t_crm_client_sales_tmp.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').AsDateTime,1);
end;
// table_before_post(t_crm_client_sales_tmp,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_crm_client.bsSkinButton33Click(Sender: TObject);
var
Ext,sname,s:String;
ExcelTemplet:Variant;
i,j:integer;
imp:boolean;
aAdoQuery:TAdoQuery;
begin
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(application);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɺ<EFBFBD><C9BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ򡣡<C8BA><F2A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=300;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
try
aAdoQuery:=CreateAdoquery;
with aAdoQuery do
begin
Close;sql.Clear;
sql.Add('Update t_crm_client_sales set <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>˵绰=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>˵绰');
sql.Add('where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>');
end;
if OpenDialog1.Execute then
begin
Ext:=lowercase(ExtractFileExt(OpenDialog1.FileName));
if Ext='.xls' then
begin
ExcelTemplet:= CreateOleObject('Excel.Application');
try
ExcelTemplet.Workbooks.Open(OpenDialog1.FileName);
imp:=true;
if imp then
begin
I:=2;
//showmessage(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,2].Value));
while VartoStr(ExcelTemplet.ActiveSheet.Cells[I,2].Value)<>'' do
begin
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
s:=trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,2].Value));
// s:=trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,2].Value))+' '+trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,4].Value))+' '+trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,5].Value))+' '+trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,6].Value));
frm_sys_progress.bsSkinGauge1.ProgressText:=s;
with aAdoQuery do
begin
close;
Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,2].Value));
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').Value:=trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,4].Value));
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>˵绰').Value:=trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,5].Value));
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=trim(VartoStr(ExcelTemplet.ActiveSheet.Cells[I,6].Value));
ExecSQL;
end;
i:=i+1;
end;
end;
finally
ExcelTemplet.DisplayAlerts := false;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
ExcelTemplet.Quit;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>
end;
end;
end;
finally
aAdoQuery.Free;
frm_sys_progress.close;
frm_sys_progress:=nil;
end
end;
procedure Tfrm_crm_client.dxDBGrid1ChangeNode(Sender: TObject; OldNode,
Node: TdxTreeListNode);
begin
dzhllrVisible();
end;
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD>Ƿ<EFBFBD><C7B7>ɼ<EFBFBD>
/// </summary>
procedure Tfrm_crm_client.dzhllrVisible();
begin
bskndbchckrdbxd.Visible:=False;
if(t_crm_client.IsEmpty=False) and (t_crm_client.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString='<27><><EFBFBD>̺<EFBFBD>ӥ') then
begin
bskndbchckrdbxd.Visible:=True;
end;
end;
procedure Tfrm_crm_client.dxDBGrid1Click(Sender: TObject);
begin
dzhllrVisible();
end;
procedure Tfrm_crm_client.crmsalse_sheetShow(Sender: TObject);
begin
if not if_open('452') then
begin
bsSkinPanel8.Enabled:=false;
bsSkinGroupBox3.Enabled:=False;
bsSkinGroupBox2.Enabled:=False;
bsSkinGroupBox13.Enabled:=false;
dxDBGrid5.Enabled:=False;
end
else
begin
bsSkinPanel8.Enabled:=True;
bsSkinGroupBox3.Enabled:=True;
bsSkinGroupBox2.Enabled:=True;
bsSkinGroupBox13.Enabled:=True;
dxDBGrid5.Enabled:=True;
end;
end;
procedure Tfrm_crm_client.RxDBLookupCombo14KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit3);
end;
procedure Tfrm_crm_client.RxDBLookupCombo1Enter(Sender: TObject);
begin
TRxDBLookupCombo(Sender).LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD>';
end;
procedure Tfrm_crm_client.RxDBLookupCombo1Exit(Sender: TObject);
begin
TRxDBLookupCombo(Sender).LookupDisplay:='<27><><EFBFBD><EFBFBD>';
end;
procedure Tfrm_crm_client.RxDBLookupCombo14Enter(Sender: TObject);
begin
TRxDBLookupCombo(Sender).LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD>';
end;
procedure Tfrm_crm_client.RxDBLookupCombo14Exit(Sender: TObject);
begin
TRxDBLookupCombo(Sender).LookupDisplay:='<27><><EFBFBD><EFBFBD>'
end;
procedure Tfrm_crm_client.DBEdit4Exit(Sender: TObject);
begin
if t_crm_client.State=dsinsert then
begin
if Length(Trim(DBEdit4.Text))>6 then
begin
ShowMessage('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡');
DBEdit4.SetFocus;
end;
end;
end;
procedure Tfrm_crm_client.wwDBComboBox16DropDown(Sender: TObject);
var aAdoQuery:TAdoQuery;
begin
if RxDBLookupCombo9.Value='' then Exit;
aAdoQuery:=CreateAdoQuery;
wwDBComboBox16.Items.Clear;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('Select * from t_crm_client_linkman');
SQL.Add('where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:SNAME');
SQL.Add('Order by <20><><EFBFBD><EFBFBD>');
Parameters.ParamByName('SNAME').Value:=trim(RxDBLookupCombo9.Value);
Open;First;
while not Eof do
begin
wwDBComboBox16.Items.Add(Trim(FieldByName('<27><><EFBFBD><EFBFBD>').AsString));
Next;
end;
finally;
Free;
end;
end;
end.