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.

59 lines
1.4 KiB
Plaintext

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);
private
{ Private declarations }
public
{ Public declarations }
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('请输入新的会计期间!!');
exit;
end;
DataSource1.DataSet.edit;
if strtobool(get_parameters_value(12,'false')) then
begin
DataSource1.DataSet['业务编号']:=get_no_change(wwDBDateTimePicker1.date,DataSource1.DataSet['业务编号'])
end;
DataSource1.DataSet['会计期间']:=wwDBDateTimePicker1.date;
DataSource1.DataSet['周次']:=WeekofYear(wwDBDateTimePicker1.date);
DataSource1.DataSet.post;
showmessage('会计期间更改成功!!');
close;
end;
end.