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.
108 lines
3.0 KiB
Plaintext
108 lines
3.0 KiB
Plaintext
unit u_op_givedate;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, StdCtrls, wwdbdatetimepicker, bsSkinCtrls, BusinessSkinForm, DB;
|
|
|
|
type
|
|
Tfrm_op_givedate = class(TForm)
|
|
Label1: TLabel;
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
bsSkinButton1: TbsSkinButton;
|
|
bsSkinButton5: TbsSkinButton;
|
|
DataSource1: TDataSource;
|
|
bsSkinButton2: TbsSkinButton;
|
|
Label2: TLabel;
|
|
Edit3: TEdit;
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
procedure FormShow(Sender: TObject);
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
private
|
|
{ Private declarations }
|
|
public
|
|
{ Public declarations }
|
|
BSTYPE:string;
|
|
end;
|
|
|
|
var
|
|
frm_op_givedate: Tfrm_op_givedate;
|
|
|
|
implementation
|
|
|
|
uses my_sys_function, u_op_railway_shencode;
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure Tfrm_op_givedate.bsSkinButton5Click(Sender: TObject);
|
|
begin
|
|
close;
|
|
end;
|
|
|
|
procedure Tfrm_op_givedate.bsSkinButton1Click(Sender: TObject);
|
|
var
|
|
i:Integer;
|
|
begin
|
|
if wwDBDateTimePicker1.text='' then
|
|
begin
|
|
showmessage('请输入提供代码日期!!');
|
|
exit;
|
|
end;
|
|
try
|
|
frm_op_railwayctn_shencode.t_op_railway.DisableControls;
|
|
|
|
for i:=0 to frm_op_railwayctn_shencode.dxDBGrid2.SelectedCount-1 do
|
|
begin
|
|
frm_op_railwayctn_shencode.t_op_railway.GotoBookmark(pointer(frm_op_railwayctn_shencode.dxDBGrid2.selectedrows[i]));
|
|
if frm_op_railwayctn_shencode.t_op_railway.fieldbyname('代码状态').asstring='受理申请' then begin
|
|
frm_op_railwayctn_shencode.t_op_railway.edit;
|
|
frm_op_railwayctn_shencode.t_op_railway.fieldbyname('代码状态').asstring:='提供代码';
|
|
frm_op_railwayctn_shencode.t_op_railway.fieldbyname('提供代码时间').asdatetime:=wwDBDateTimePicker1.date;
|
|
frm_op_railwayctn_shencode.t_op_railway.fieldbyname('发票号').asstring:=Edit3.text;
|
|
|
|
frm_op_railwayctn_shencode.t_op_railway.post;
|
|
end;
|
|
end;
|
|
finally
|
|
frm_op_railwayctn_shencode.t_op_railway.EnableControls;
|
|
end;
|
|
|
|
close;
|
|
end;
|
|
|
|
procedure Tfrm_op_givedate.FormShow(Sender: TObject);
|
|
begin
|
|
// wwDBDateTimePicker1.MinDate:=date;
|
|
end;
|
|
|
|
procedure Tfrm_op_givedate.bsSkinButton2Click(Sender: TObject);
|
|
var
|
|
i:Integer;
|
|
begin
|
|
|
|
try
|
|
frm_op_railwayctn_shencode.t_op_railway.DisableControls;
|
|
|
|
for i:=0 to frm_op_railwayctn_shencode.dxDBGrid2.SelectedCount-1 do
|
|
begin
|
|
frm_op_railwayctn_shencode.t_op_railway.GotoBookmark(pointer(frm_op_railwayctn_shencode.dxDBGrid2.selectedrows[i]));
|
|
if frm_op_railwayctn_shencode.t_op_railway.fieldbyname('代码状态').asstring='提供代码' then begin
|
|
frm_op_railwayctn_shencode.t_op_railway.edit;
|
|
frm_op_railwayctn_shencode.t_op_railway.fieldbyname('代码状态').asstring:='受理申请';
|
|
frm_op_railwayctn_shencode.t_op_railway['提供代码时间']:=null;
|
|
frm_op_railwayctn_shencode.t_op_railway.post;
|
|
end;
|
|
|
|
end;
|
|
finally
|
|
frm_op_railwayctn_shencode.t_op_railway.EnableControls;
|
|
end;
|
|
|
|
close;
|
|
end;
|
|
|
|
end.
|