pas_inputtimes.~pas

来自「比较详细的功能」· ~PAS 代码 · 共 81 行

~PAS
81
字号
unit pas_inputtimes;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, Buttons;

type
  TForm_inputtime = class(TForm)
    dtp_time: TDateTimePicker;
    Label4: TLabel;
    Label1: TLabel;
    Label2: TLabel;
    qd: TSpeedButton;
    Edit_days: TEdit;
    Label3: TLabel;
    procedure qdClick(Sender: TObject);
    procedure iiii();
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form_inputtime: TForm_inputtime;

implementation
      uses pas_houserent,pas_dm;
{$R *.dfm}

var
  i:integer;
  i2:integer;

procedure TForm_inputtime.iiii;
begin 
  i:=strtoint(pas_houserent.Form_constract.Edit_times.text);
  i2:=i;
end;

procedure TForm_inputtime.qdClick(Sender: TObject);
begin
   with dm.AQ1 do
   begin
     try
        begin
          close;
          sql.Clear;
          sql.Add('insert into hint(hi_cno,hi_fktime,hi_times,hi_fkorno,hi_days)'+
                  ' values('''+trim(pas_houserent.Form_constract.edit_contractNo.Text)+''','''+
                  datetostr(dtp_time.DateTime)+''','''+inttostr(i2-i+1)+''',0,'''+trim(edit_days.Text)+''' )');
            
          execsql;
        end;
       except
       end;
      i:=i-1;
      label1.Caption:=inttostr(i2-i+1);
     end;
       if (i=0) then
      begin
        showmessage('输入完毕,谢谢');
        i:=0;

        Form_inputtime.Close;
      end;
       label1.Caption:=inttostr(i2-i+1);
end;

procedure TForm_inputtime.FormShow(Sender: TObject);
begin
  iiii;
  dtp_time.DateTime:=now();
  form_inputtime.Label1.Caption:=inttostr(1);
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?