⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 winworktime.pas

📁 考勤管理 考勤管理 考勤管理
💻 PAS
📖 第 1 页 / 共 2 页
字号:
unit Winworktime;
//****************************************************************
//*公司名:华夏数码有限公司
//*系统名:考勤管理系统
//*程序名:Winworktime
//*
//*--------------------------------------------------------------
//*  [年月日]     [制造者]
//*--------------------------------------------------------------
//*  2005/12/15    徐二芳
//*
//****************************************************************
interface

uses
  System.Drawing, System.Collections, System.ComponentModel,
  System.Windows.Forms, System.Data,clsmain,borland.Vcl.StrUtils, 
  System.Resources;

type
  TWinworktime = class(System.Windows.Forms.Form)
  {$REGION 'Designer Managed Code'}
  strict private
    /// <summary>
    /// Required designer variable.
    /// </summary>
    Components: System.ComponentModel.Container;
    GroupBox1: System.Windows.Forms.GroupBox;
    Label1: System.Windows.Forms.Label;
    Label2: System.Windows.Forms.Label;
    DateTimePicker1: System.Windows.Forms.DateTimePicker;
    DateTimePicker2: System.Windows.Forms.DateTimePicker;
    Label3: System.Windows.Forms.Label;
    Textbeizhu: System.Windows.Forms.TextBox;
    Butok: System.Windows.Forms.Button;
    Butcancel: System.Windows.Forms.Button;
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    procedure InitializeComponent;
    procedure Label2_Click(sender: System.Object; e: System.EventArgs);
    procedure TWinworktime_Load(sender: System.Object; e: System.EventArgs);
    procedure TWinworktime_Closed(sender: System.Object; e: System.EventArgs);
    procedure DateTimePicker1_KeyPress(sender: System.Object; e: System.Windows.Forms.KeyPressEventArgs);
    procedure DateTimePicker2_KeyPress(sender: System.Object; e: System.Windows.Forms.KeyPressEventArgs);
    procedure Textbeizhu_KeyPress(sender: System.Object; e: System.Windows.Forms.KeyPressEventArgs);
    procedure Butok_Click(sender: System.Object; e: System.EventArgs);
    procedure Butcancel_Click(sender: System.Object; e: System.EventArgs);
    procedure GroupBox1_Enter(sender: System.Object; e: System.EventArgs);

  {$ENDREGION}
  strict protected
    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    procedure Dispose(Disposing: Boolean); override;
  private
    procedure Item_Clear;
    function Data_Upd: boolean;
    function   data_get():boolean;
    { Private Declarations }
  public
    constructor Create;
  end;

  [assembly: RuntimeRequiredAttribute(TypeOf(TWinworktime))]

implementation
 var
  
  DGDs:DataSet;
{$REGION 'Windows Form Designer generated code'}
/// <summary>
/// Required method for Designer support -- do not modify
/// the contents of this method with the code editor.
/// </summary>
procedure TWinworktime.InitializeComponent;
var
  resources: System.Resources.ResourceManager;
begin
  resources := System.Resources.ResourceManager.Create(TypeOf(TWinworktime));
  Self.GroupBox1 := System.Windows.Forms.GroupBox.Create;
  Self.Textbeizhu := System.Windows.Forms.TextBox.Create;
  Self.Label3 := System.Windows.Forms.Label.Create;
  Self.DateTimePicker2 := System.Windows.Forms.DateTimePicker.Create;
  Self.DateTimePicker1 := System.Windows.Forms.DateTimePicker.Create;
  Self.Label2 := System.Windows.Forms.Label.Create;
  Self.Label1 := System.Windows.Forms.Label.Create;
  Self.Butok := System.Windows.Forms.Button.Create;
  Self.Butcancel := System.Windows.Forms.Button.Create;
  Self.GroupBox1.SuspendLayout;
  Self.SuspendLayout;
  // 
  // GroupBox1
  // 
  Self.GroupBox1.Controls.Add(Self.Textbeizhu);
  Self.GroupBox1.Controls.Add(Self.Label3);
  Self.GroupBox1.Controls.Add(Self.DateTimePicker2);
  Self.GroupBox1.Controls.Add(Self.DateTimePicker1);
  Self.GroupBox1.Controls.Add(Self.Label2);
  Self.GroupBox1.Controls.Add(Self.Label1);
  Self.GroupBox1.Location := System.Drawing.Point.Create(8, 0);
  Self.GroupBox1.Name := 'GroupBox1';
  Self.GroupBox1.Size := System.Drawing.Size.Create(248, 144);
  Self.GroupBox1.TabIndex := 0;
  Self.GroupBox1.TabStop := False;
  Self.GroupBox1.Text := ' ';
  Include(Self.GroupBox1.Enter, Self.GroupBox1_Enter);
  // 
  // Textbeizhu
  // 
  Self.Textbeizhu.AutoSize := False;
  Self.Textbeizhu.Location := System.Drawing.Point.Create(88, 80);
  Self.Textbeizhu.Name := 'Textbeizhu';
  Self.Textbeizhu.Size := System.Drawing.Size.Create(128, 48);
  Self.Textbeizhu.TabIndex := 3;
  Self.Textbeizhu.Text := ' ';
  Include(Self.Textbeizhu.KeyPress, Self.Textbeizhu_KeyPress);
  // 
  // Label3
  // 
  Self.Label3.Location := System.Drawing.Point.Create(16, 80);
  Self.Label3.Name := 'Label3';
  Self.Label3.TabIndex := 4;
  Self.Label3.Text := '备    注:';
  // 
  // DateTimePicker2
  // 
  Self.DateTimePicker2.CustomFormat := 'HH:mm';
  Self.DateTimePicker2.Format := System.Windows.Forms.DateTimePickerFormat.Custom;
  Self.DateTimePicker2.Location := System.Drawing.Point.Create(88, 48);
  Self.DateTimePicker2.Name := 'DateTimePicker2';
  Self.DateTimePicker2.ShowUpDown := True;
  Self.DateTimePicker2.Size := System.Drawing.Size.Create(128, 21);
  Self.DateTimePicker2.TabIndex := 2;
  Include(Self.DateTimePicker2.KeyPress, Self.DateTimePicker2_KeyPress);
  // 
  // DateTimePicker1
  // 
  Self.DateTimePicker1.CustomFormat := 'HH:mm';
  Self.DateTimePicker1.Format := System.Windows.Forms.DateTimePickerFormat.Custom;
  Self.DateTimePicker1.Location := System.Drawing.Point.Create(88, 16);
  Self.DateTimePicker1.Name := 'DateTimePicker1';
  Self.DateTimePicker1.ShowUpDown := True;
  Self.DateTimePicker1.Size := System.Drawing.Size.Create(128, 21);
  Self.DateTimePicker1.TabIndex := 1;
  Include(Self.DateTimePicker1.KeyPress, Self.DateTimePicker1_KeyPress);
  // 
  // Label2
  // 
  Self.Label2.Location := System.Drawing.Point.Create(16, 56);
  Self.Label2.Name := 'Label2';
  Self.Label2.TabIndex := 1;
  Self.Label2.Text := '下班时间:';
  Include(Self.Label2.Click, Self.Label2_Click);
  // 
  // Label1
  // 
  Self.Label1.Location := System.Drawing.Point.Create(16, 24);
  Self.Label1.Name := 'Label1';
  Self.Label1.TabIndex := 0;
  Self.Label1.Text := '上班时间:';
  // 
  // Butok
  // 
  Self.Butok.Location := System.Drawing.Point.Create(40, 160);
  Self.Butok.Name := 'Butok';
  Self.Butok.Size := System.Drawing.Size.Create(75, 32);
  Self.Butok.TabIndex := 4;
  Self.Butok.Text := '确  定';
  Include(Self.Butok.Click, Self.Butok_Click);
  // 
  // Butcancel
  // 
  Self.Butcancel.Location := System.Drawing.Point.Create(144, 160);
  Self.Butcancel.Name := 'Butcancel';
  Self.Butcancel.Size := System.Drawing.Size.Create(75, 32);
  Self.Butcancel.TabIndex := 5;
  Self.Butcancel.Text := '取  消';
  Include(Self.Butcancel.Click, Self.Butcancel_Click);
  // 
  // TWinworktime
  // 
  Self.AutoScaleBaseSize := System.Drawing.Size.Create(6, 14);
  Self.ClientSize := System.Drawing.Size.Create(272, 213);
  Self.Controls.Add(Self.Butcancel);
  Self.Controls.Add(Self.Butok);
  Self.Controls.Add(Self.GroupBox1);
  Self.Icon := (System.Drawing.Icon(resources.GetObject('$this.Icon')));
  Self.KeyPreview := True;
  Self.Name := 'TWinworktime';
  Self.Text := '工作时间管理';
  Include(Self.Load, Self.TWinworktime_Load);
  Include(Self.Closed, Self.TWinworktime_Closed);
  Self.GroupBox1.ResumeLayout(False);
  Self.ResumeLayout(False);
end;
{$ENDREGION}

procedure TWinworktime.Dispose(Disposing: Boolean);
begin
  if Disposing then
  begin
    if Components <> nil then
      Components.Dispose();
  end;
  inherited Dispose(Disposing);
end;

constructor TWinworktime.Create;
begin
  inherited Create;
  //
  // Required for Windows Form Designer support
  //
  InitializeComponent;
  //
  // TODO: Add any constructor code after InitializeComponent call
  //
end;

procedure TWinworktime.GroupBox1_Enter(sender: System.Object; e: System.EventArgs);
begin

end;

//****************************************************************
//*  窗体加载 [load]
//*
//*  [参数]
//*      1:系统参数
//*      2:系统参数
//*  [返回]
//*      无
//****************************************************************
procedure TWinworktime.TWinworktime_Load(sender: System.Object; e: System.EventArgs);
begin
  try
    clsmain.Winworktimeshowfla:=true;
    item_clear;
    data_get();
   except
    on  ex:exception do
    begin
      messagebox.Show('TWinworktime.TWinworktime_Load:(' + ex.Message + ')','考勤管理系统');
    end;
  end;
end;
//****************************************************************
//*  窗体卸载 [Closed]
//*
//*  [参数]
//*      1:系统参数
//*      2:系统参数
//*  [返回]
//*      无
//****************************************************************
procedure TWinworktime.TWinworktime_Closed(sender: System.Object; e: System.EventArgs);

⌨️ 快捷键说明

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