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.

75 lines
1.9 KiB
Plaintext

unit u_info_plan;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, StdCtrls, ComCtrls, DBCtrls, Mask, dxTL, dxDBCtrl,
dxDBGrid, dxCntner, BusinessSkinForm, dxDBTLCl, dxGrClms, bsSkinCtrls,
bsdbctrls;
type
Tfrm_info_plan = class(TForm)
bsBusinessSkinForm1: TbsBusinessSkinForm;
Label1: TLabel;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
Label2: TLabel;
DBRichEdit1: TDBRichEdit;
dxDBGrid2: TdxDBGrid;
dxDBGrid2Column1: TdxDBGridMaskColumn;
dxDBGrid2Column2: TdxDBGridDateColumn;
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
Label3: TLabel;
DBEdit3: TDBEdit;
bsSkinButton2: TbsSkinButton;
procedure bsSkinButton2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_info_plan: Tfrm_info_plan;
implementation
uses u_main, u_info_plan_over;
{$R *.dfm}
procedure Tfrm_info_plan.bsSkinButton2Click(Sender: TObject);
begin
if frm_main.t_info_plan.IsEmpty then
exit;
if frm_main.t_info_plan.FieldByName('是否完成').AsBoolean then
begin
frm_main.t_info_plan.edit;
frm_main.t_info_plan['是否完成']:=0;
frm_main.t_info_plan['完成日期']:=null;
frm_main.t_info_plan.post;
end
else
begin
try
frm_info_plan_over:=tfrm_info_plan_over.Create (self);
if frm_main.t_info_plan.FieldByName('计划类型').asstring='客户计划'then
begin
frm_info_plan_over.t_crm_client_link.Open;
frm_info_plan_over.bsSkinPanel2.Visible:=true;
frm_info_plan_over.t_crm_client_link.insert;
frm_info_plan_over.t_crm_client_link['PD_ID']:=frm_main.t_info_plan['PD_ID'];
end;
frm_info_plan_over.DataSource1.Enabled:=false;
frm_info_plan_over.DataSource1.DataSet:=frm_main.t_info_plan;
frm_info_plan_over.DataSource1.Enabled:=true;
frm_info_plan_over.ShowModal;
finally
frm_info_plan_over.Free;
end;
end;
end;
end.