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.

114 lines
3.0 KiB
Plaintext

unit u_info_plan_over;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, StdCtrls, wwdbdatetimepicker, BusinessSkinForm, bsSkinCtrls,
ADODB, DBCtrls, RxLookup, wwdbedit, Wwdotdot, Wwdbcomb, Mask;
type
Tfrm_info_plan_over = class(TForm)
DataSource1: TDataSource;
bsBusinessSkinForm1: TbsBusinessSkinForm;
t_crm_client_link: TADOQuery;
t_crm_client_link1: TDataSource;
bsSkinPanel1: TbsSkinPanel;
Label1: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinGroupBox1: TbsSkinGroupBox;
Memo1: TMemo;
bsSkinPanel2: TbsSkinPanel;
Label55: TLabel;
Label54: TLabel;
Label57: TLabel;
Label56: TLabel;
Label60: TLabel;
Label58: TLabel;
Label61: TLabel;
Label59: TLabel;
Label9: TLabel;
DBEdit46: TDBEdit;
wwDBComboBox3: TwwDBComboBox;
wwDBDateTimePicker5: TwwDBDateTimePicker;
DBEdit47: TDBEdit;
RxDBLookupCombo8: TRxDBLookupCombo;
DBEdit49: TDBEdit;
wwDBComboBox4: TwwDBComboBox;
DBMemo3: TDBMemo;
RxDBLookupCombo2: TRxDBLookupCombo;
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure t_crm_client_linkAfterInsert(DataSet: TDataSet);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_info_plan_over: Tfrm_info_plan_over;
implementation
uses u_main, my_sys_function;
{$R *.dfm}
procedure Tfrm_info_plan_over.bsSkinButton2Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_info_plan_over.bsSkinButton1Click(Sender: TObject);
begin
if wwDBDateTimePicker1.Text='' then
begin
showmessage('完成日期不能为空!!');
exit;
end;
if wwDBDateTimePicker1.Date<DataSource1.DataSet.FieldByName('执行日期').asdatetime then
begin
showmessage('完成日期不能小于执行日期!!');
exit;
end;
if bsSkinPanel2.Visible then
begin
table_before_post(t_crm_client_link,'客户简称');
table_before_post(t_crm_client_link,'接触方式');
table_before_post(t_crm_client_link,'接触目的');
table_before_post(t_crm_client_link,'客户人员');
table_before_post(t_crm_client_link,'接触日期');
table_before_post(t_crm_client_link,'业务效果');
table_before_post(t_crm_client_link,'业务总结');
table_before_post(t_crm_client_link,'接触人');
t_crm_client_link.post;
end;
DataSource1.DataSet.Edit;
DataSource1.DataSet['是否完成']:=1;
DataSource1.DataSet['完成日期']:=wwDBDateTimePicker1.DateTime;
DataSource1.DataSet['完成总结']:=Memo1.Lines.Text;
DataSource1.DataSet.post;
DataSource1.DataSet.Refresh;
close;
end;
procedure Tfrm_info_plan_over.FormShow(Sender: TObject);
begin
wwDBDateTimePicker1.DateTime:=now;
end;
procedure Tfrm_info_plan_over.t_crm_client_linkAfterInsert(
DataSet: TDataSet);
begin
t_crm_client_link['接触人']:=employee;
t_crm_client_link['接触日期']:=date;
t_crm_client_link['录入人']:=employee;
t_crm_client_link['录入日期']:=date;
end;
end.