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.

70 lines
1.7 KiB
Plaintext

11 months ago
unit u_op_date_change;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, wwdbdatetimepicker, bsSkinCtrls, BusinessSkinForm, DB;
type
Tfrm_op_date_change = class(TForm)
Label1: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinButton1: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
DataSource1: TDataSource;
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
BSTYPE:string;
end;
var
frm_op_date_change: Tfrm_op_date_change;
implementation
uses my_sys_function;
{$R *.dfm}
procedure Tfrm_op_date_change.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_date_change.bsSkinButton1Click(Sender: TObject);
begin
if wwDBDateTimePicker1.text='' then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µĻ<C2B5><C4BB><EFBFBD><EFBFBD>ڼ䣡<DABC><E4A3A1>');
exit;
end;
DataSource1.DataSet.edit;
if strtobool(get_parameters_value(12,'false')) then
begin
DataSource1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no_change(wwDBDateTimePicker1.date,DataSource1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'])
end;
DataSource1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=wwDBDateTimePicker1.date;
if (strtoint(get_parameters_value(158,'0'))=1) and (Trim(DataSource1.dataset.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><><EFBFBD>ĵ<EFBFBD>') then
AmendAccDate(BSTYPE,DataSource1);
DataSource1.DataSet['<27>ܴ<EFBFBD>']:=WeekofYear(wwDBDateTimePicker1.date);
DataSource1.DataSet.post;
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD>ijɹ<C4B3><C9B9><EFBFBD><EFBFBD><EFBFBD>');
close;
end;
procedure Tfrm_op_date_change.FormShow(Sender: TObject);
begin
wwDBDateTimePicker1.MinDate:=Logininfo.endday+1;
end;
end.