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.

103 lines
2.8 KiB
Plaintext

11 months ago
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;
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('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B9A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD>');
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]));
frm_op_railwayctn_shencode.t_op_railway.edit;
frm_op_railwayctn_shencode.t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring:='<27><EFBFBD><E1B9A9><EFBFBD><EFBFBD>';
frm_op_railwayctn_shencode.t_op_railway.fieldbyname('<27><EFBFBD><E1B9A9><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').asdatetime:=wwDBDateTimePicker1.date;
frm_op_railwayctn_shencode.t_op_railway.post;
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('<27><><EFBFBD><EFBFBD>״̬').asstring='<27><EFBFBD><E1B9A9><EFBFBD><EFBFBD>' then begin
frm_op_railwayctn_shencode.t_op_railway.edit;
frm_op_railwayctn_shencode.t_op_railway.fieldbyname('<27><><EFBFBD><EFBFBD>״̬').asstring:='<27><EFBFBD><E1B9A9><EFBFBD><EFBFBD>';
frm_op_railwayctn_shencode.t_op_railway['<27><EFBFBD><E1B9A9><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=null;
frm_op_railwayctn_shencode.t_op_railway.post;
end;
end;
finally
frm_op_railwayctn_shencode.t_op_railway.EnableControls;
end;
close;
end;
end.