📄 winyuangong.~pas
字号:
unit WinYuanGong;
//****************************************************************
//*公司名:华夏数码有限公司
//*系统名:考勤管理系统
//*程序名:WinYuanGong
//*
//*--------------------------------------------------------------
//* [年月日] [制造者]
//*--------------------------------------------------------------
//* 2005/12/18 徐二芳
//*
//****************************************************************
interface
uses
System.Drawing, System.Collections, System.ComponentModel,
System.Windows.Forms, System.Data, System.Resources,clsmain,
borland.Vcl.SysUtils,system.Data.OleDb,dialogs;
type
TWinYuanGong = class(System.Windows.Forms.Form)
{$REGION 'Designer Managed Code'}
strict private
/// <summary>
/// Required designer variable.
/// </summary>
components: System.ComponentModel.IContainer;
tabcontrol1: System.Windows.Forms.TabControl;
ImageList1: System.Windows.Forms.ImageList;
TabPage1: System.Windows.Forms.TabPage;
TabPage2: System.Windows.Forms.TabPage;
ToolBar1: System.Windows.Forms.ToolBar;
Tbnadd: System.Windows.Forms.ToolBarButton;
tbnedit: System.Windows.Forms.ToolBarButton;
tbnsave: System.Windows.Forms.ToolBarButton;
tbncut: System.Windows.Forms.ToolBarButton;
tbnexit: System.Windows.Forms.ToolBarButton;
Label1: System.Windows.Forms.Label;
Label2: System.Windows.Forms.Label;
Label3: System.Windows.Forms.Label;
Label4: System.Windows.Forms.Label;
Label5: System.Windows.Forms.Label;
Label6: System.Windows.Forms.Label;
Label7: System.Windows.Forms.Label;
Label8: System.Windows.Forms.Label;
TextBianhao: System.Windows.Forms.TextBox;
Textname: System.Windows.Forms.TextBox;
Cmbdepart: System.Windows.Forms.ComboBox;
Cmbsex: System.Windows.Forms.ComboBox;
cmbxueli: System.Windows.Forms.ComboBox;
cmbpost: System.Windows.Forms.ComboBox;
DateTimePicker1: System.Windows.Forms.DateTimePicker;
Texttel: System.Windows.Forms.TextBox;
Label9: System.Windows.Forms.Label;
Textadress: System.Windows.Forms.TextBox;
Label10: System.Windows.Forms.Label;
Textbeizhu: System.Windows.Forms.TextBox;
textadressF: System.Windows.Forms.TextBox;
Label11: System.Windows.Forms.Label;
TexttelF: System.Windows.Forms.TextBox;
DateTimePicker2F: System.Windows.Forms.DateTimePicker;
cmbpostF: System.Windows.Forms.ComboBox;
cmbxueliF: System.Windows.Forms.ComboBox;
cmbsexF: System.Windows.Forms.ComboBox;
cmbdepartF: System.Windows.Forms.ComboBox;
textnameF: System.Windows.Forms.TextBox;
TextbianhaoF: System.Windows.Forms.TextBox;
Label12: System.Windows.Forms.Label;
Label13: System.Windows.Forms.Label;
Label14: System.Windows.Forms.Label;
Label15: System.Windows.Forms.Label;
Label16: System.Windows.Forms.Label;
Label17: System.Windows.Forms.Label;
Label18: System.Windows.Forms.Label;
Label19: System.Windows.Forms.Label;
Butfind: System.Windows.Forms.Button;
DataGrid1: System.Windows.Forms.DataGrid;
CheckBox1: System.Windows.Forms.CheckBox;
Label20: System.Windows.Forms.Label;
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
procedure InitializeComponent;
procedure TWinYuanGong_Load(sender: System.Object; e: System.EventArgs);
procedure TWinYuanGong_Closed(sender: System.Object; e: System.EventArgs);
procedure TWinYuanGong_KeyDown(sender: System.Object; e: System.Windows.Forms.KeyEventArgs);
procedure TWinYuanGong_KeyPress(sender: System.Object; e: System.Windows.Forms.KeyPressEventArgs);
procedure ToolBar1_ButtonClick(sender: System.Object; e: System.Windows.Forms.ToolBarButtonClickEventArgs);
procedure Butfind_Click(sender: System.Object; e: System.EventArgs);
procedure tabcontrol1_SelectedIndexChanged(sender: System.Object; e: System.EventArgs);
procedure DataGrid1_CurrentCellChanged(sender: System.Object; e: System.EventArgs);
procedure CheckBox1_CheckedChanged(sender: System.Object; e: System.EventArgs);
procedure textnameF_TextChanged(sender: System.Object; e: System.EventArgs);
// procedure DateTimePicker2F_ValueChanged(sender: System.Object; e: System.EventArgs);
{$ENDREGION}
strict protected
/// <summary>
/// Clean up any resources being used.
/// </summary>
procedure Dispose(Disposing: Boolean); override;
private
function Check_Cmbpost: Boolean;
function Check_CmbSex: Boolean;
function Check_Cmbdepart: Boolean;
function Check_TextAddress: Boolean;
function Check_TextAddressF: Boolean;
function Check_TextName: Boolean;
function Check_TextNameF: Boolean;
function Check_Textbeizhu: Boolean;
function Check_TextTel: Boolean;
function Check_TextTelF: Boolean;
function Check_Textbianhao: Boolean;
function Check_TextbianhaoF: Boolean;
procedure item_clear;
function item_check: boolean;
function item_checkF: boolean;
procedure RefreshEnabled(NThis, NOther: Boolean);
function Data_Ent: boolean;
function Data_Del: boolean;
function Data_Upd: boolean;
function Data_Get: boolean;
function textbianhao_load: string;
{ Private Declarations }
public
constructor Create;
end;
[assembly: RuntimeRequiredAttribute(TypeOf(TWinYuanGong))]
implementation
var
flg:string;
dgds:dataset;
myds: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 TWinYuanGong.InitializeComponent;
type
TSystem_ObjectArray = array of System.Object;
TSystem_Windows_Forms_ToolBarButtonArray = array of System.Windows.Forms.ToolBarButton;
var
resources: System.Resources.ResourceManager;
begin
Self.components := System.ComponentModel.Container.Create;
resources := System.Resources.ResourceManager.Create(TypeOf(TWinYuanGong));
Self.tabcontrol1 := System.Windows.Forms.TabControl.Create;
Self.TabPage1 := System.Windows.Forms.TabPage.Create;
Self.Textbeizhu := System.Windows.Forms.TextBox.Create;
Self.Label10 := System.Windows.Forms.Label.Create;
Self.Textadress := System.Windows.Forms.TextBox.Create;
Self.Label9 := System.Windows.Forms.Label.Create;
Self.Texttel := System.Windows.Forms.TextBox.Create;
Self.DateTimePicker1 := System.Windows.Forms.DateTimePicker.Create;
Self.cmbpost := System.Windows.Forms.ComboBox.Create;
Self.cmbxueli := System.Windows.Forms.ComboBox.Create;
Self.Cmbsex := System.Windows.Forms.ComboBox.Create;
Self.Cmbdepart := System.Windows.Forms.ComboBox.Create;
Self.Textname := System.Windows.Forms.TextBox.Create;
Self.TextBianhao := System.Windows.Forms.TextBox.Create;
Self.Label5 := System.Windows.Forms.Label.Create;
Self.Label6 := System.Windows.Forms.Label.Create;
Self.Label7 := System.Windows.Forms.Label.Create;
Self.Label8 := System.Windows.Forms.Label.Create;
Self.Label4 := System.Windows.Forms.Label.Create;
Self.Label3 := System.Windows.Forms.Label.Create;
Self.Label2 := System.Windows.Forms.Label.Create;
Self.Label1 := System.Windows.Forms.Label.Create;
Self.ToolBar1 := System.Windows.Forms.ToolBar.Create;
Self.Tbnadd := System.Windows.Forms.ToolBarButton.Create;
Self.tbnedit := System.Windows.Forms.ToolBarButton.Create;
Self.tbnsave := System.Windows.Forms.ToolBarButton.Create;
Self.tbncut := System.Windows.Forms.ToolBarButton.Create;
Self.tbnexit := System.Windows.Forms.ToolBarButton.Create;
Self.ImageList1 := System.Windows.Forms.ImageList.Create(Self.components);
Self.TabPage2 := System.Windows.Forms.TabPage.Create;
Self.Label20 := System.Windows.Forms.Label.Create;
Self.CheckBox1 := System.Windows.Forms.CheckBox.Create;
Self.DataGrid1 := System.Windows.Forms.DataGrid.Create;
Self.Butfind := System.Windows.Forms.Button.Create;
Self.textadressF := System.Windows.Forms.TextBox.Create;
Self.Label11 := System.Windows.Forms.Label.Create;
Self.TexttelF := System.Windows.Forms.TextBox.Create;
Self.DateTimePicker2F := System.Windows.Forms.DateTimePicker.Create;
Self.cmbpostF := System.Windows.Forms.ComboBox.Create;
Self.cmbxueliF := System.Windows.Forms.ComboBox.Create;
Self.cmbsexF := System.Windows.Forms.ComboBox.Create;
Self.cmbdepartF := System.Windows.Forms.ComboBox.Create;
Self.textnameF := System.Windows.Forms.TextBox.Create;
Self.TextbianhaoF := System.Windows.Forms.TextBox.Create;
Self.Label12 := System.Windows.Forms.Label.Create;
Self.Label13 := System.Windows.Forms.Label.Create;
Self.Label14 := System.Windows.Forms.Label.Create;
Self.Label15 := System.Windows.Forms.Label.Create;
Self.Label16 := System.Windows.Forms.Label.Create;
Self.Label17 := System.Windows.Forms.Label.Create;
Self.Label18 := System.Windows.Forms.Label.Create;
Self.Label19 := System.Windows.Forms.Label.Create;
Self.tabcontrol1.SuspendLayout;
Self.TabPage1.SuspendLayout;
Self.TabPage2.SuspendLayout;
(System.ComponentModel.ISupportInitialize(Self.DataGrid1)).BeginInit;
Self.SuspendLayout;
//
// tabcontrol1
//
Self.tabcontrol1.Anchor := (System.Windows.Forms.AnchorStyles((((System.Windows.Forms.AnchorStyles.Top
or System.Windows.Forms.AnchorStyles.Bottom) or System.Windows.Forms.AnchorStyles.Left)
or System.Windows.Forms.AnchorStyles.Right)));
Self.tabcontrol1.Controls.Add(Self.TabPage1);
Self.tabcontrol1.Controls.Add(Self.TabPage2);
Self.tabcontrol1.Location := System.Drawing.Point.Create(0, 0);
Self.tabcontrol1.Name := 'tabcontrol1';
Self.tabcontrol1.SelectedIndex := 0;
Self.tabcontrol1.Size := System.Drawing.Size.Create(480, 352);
Self.tabcontrol1.TabIndex := 0;
Include(Self.tabcontrol1.SelectedIndexChanged, Self.tabcontrol1_SelectedIndexChanged);
//
// TabPage1
//
Self.TabPage1.Controls.Add(Self.Textbeizhu);
Self.TabPage1.Controls.Add(Self.Label10);
Self.TabPage1.Controls.Add(Self.Textadress);
Self.TabPage1.Controls.Add(Self.Label9);
Self.TabPage1.Controls.Add(Self.Texttel);
Self.TabPage1.Controls.Add(Self.DateTimePicker1);
Self.TabPage1.Controls.Add(Self.cmbpost);
Self.TabPage1.Controls.Add(Self.cmbxueli);
Self.TabPage1.Controls.Add(Self.Cmbsex);
Self.TabPage1.Controls.Add(Self.Cmbdepart);
Self.TabPage1.Controls.Add(Self.Textname);
Self.TabPage1.Controls.Add(Self.TextBianhao);
Self.TabPage1.Controls.Add(Self.Label5);
Self.TabPage1.Controls.Add(Self.Label6);
Self.TabPage1.Controls.Add(Self.Label7);
Self.TabPage1.Controls.Add(Self.Label8);
Self.TabPage1.Controls.Add(Self.Label4);
Self.TabPage1.Controls.Add(Self.Label3);
Self.TabPage1.Controls.Add(Self.Label2);
Self.TabPage1.Controls.Add(Self.Label1);
Self.TabPage1.Controls.Add(Self.ToolBar1);
Self.TabPage1.Location := System.Drawing.Point.Create(4, 21);
Self.TabPage1.Name := 'TabPage1';
Self.TabPage1.Size := System.Drawing.Size.Create(472, 327);
Self.TabPage1.TabIndex := 0;
Self.TabPage1.Text := '信息维护';
//
// Textbeizhu
//
Self.Textbeizhu.AutoSize := False;
Self.Textbeizhu.Location := System.Drawing.Point.Create(72, 240);
Self.Textbeizhu.Name := 'Textbeizhu';
Self.Textbeizhu.Size := System.Drawing.Size.Create(336, 80);
Self.Textbeizhu.TabIndex := 10;
Self.Textbeizhu.Text := ' ';
//
// Label10
//
Self.Label10.Location := System.Drawing.Point.Create(8, 240);
Self.Label10.Name := 'Label10';
Self.Label10.TabIndex := 19;
Self.Label10.Text := '备 注:';
//
// Textadress
//
Self.Textadress.Location := System.Drawing.Point.Create(72, 192);
Self.Textadress.Name := 'Textadress';
Self.Textadress.Size := System.Drawing.Size.Create(336, 21);
Self.Textadress.TabIndex := 9;
Self.Textadress.Text := ' ';
//
// Label9
//
Self.Label9.Location := System.Drawing.Point.Create(8, 192);
Self.Label9.Name := 'Label9';
Self.Label9.TabIndex := 17;
Self.Label9.Text := '住 址:';
//
// Texttel
//
Self.Texttel.Location := System.Drawing.Point.Create(280, 152);
Self.Texttel.Name := 'Texttel';
Self.Texttel.Size := System.Drawing.Size.Create(128, 21);
Self.Texttel.TabIndex := 8;
Self.Texttel.Text := ' ';
//
// DateTimePicker1
//
Self.DateTimePicker1.CustomFormat := 'yyyy';
Self.DateTimePicker1.Format := System.Windows.Forms.DateTimePickerFormat.Custom;
Self.DateTimePicker1.Location := System.Drawing.Point.Create(280, 120);
Self.DateTimePicker1.Name := 'DateTimePicker1';
Self.DateTimePicker1.Size := System.Drawing.Size.Create(128, 21);
Self.DateTimePicker1.TabIndex := 6;
//
// cmbpost
//
Self.cmbpost.Items.AddRange(TSystem_ObjectArray.Create('', '经理', '文员', '会计'));
Self.cmbpost.Location := System.Drawing.Point.Create(280, 88);
Self.cmbpost.Name := 'cmbpost';
Self.cmbpost.Size := System.Drawing.Size.Create(128, 20);
Self.cmbpost.TabIndex := 4;
Self.cmbpost.Text := ' ';
//
// cmbxueli
//
Self.cmbxueli.Items.AddRange(TSystem_ObjectArray.Create('', '本科', '硕士', '专科',
'博士'));
Self.cmbxueli.Location := System.Drawing.Point.Create(72, 152);
Self.cmbxueli.Name := 'cmbxueli';
Self.cmbxueli.Size := System.Drawing.Size.Create(121, 20);
Self.cmbxueli.TabIndex := 7;
Self.cmbxueli.Text := ' ';
//
// Cmbsex
//
Self.Cmbsex.Items.AddRange(TSystem_ObjectArray.Create('', '男', '女'));
Self.Cmbsex.Location := System.Drawing.Point.Create(72, 120);
Self.Cmbsex.Name := 'Cmbsex';
Self.Cmbsex.Size := System.Drawing.Size.Create(121, 20);
Self.Cmbsex.TabIndex := 5;
Self.Cmbsex.Text := ' ';
//
// Cmbdepart
//
Self.Cmbdepart.Items.AddRange(TSystem_ObjectArray.Create('', '开发部', '测试部',
'后勤部'));
Self.Cmbdepart.Location := System.Drawing.Point.Create(72, 88);
Self.Cmbdepart.Name := 'Cmbdepart';
Self.Cmbdepart.Size := System.Drawing.Size.Create(121, 20);
Self.Cmbdepart.TabIndex := 3;
Self.Cmbdepart.Text := ' ';
//
// Textname
//
Self.Textname.Location := System.Drawing.Point.Create(280, 56);
Self.Textname.Name := 'Textname';
Self.Textname.Size := System.Drawing.Size.Create(128, 21);
Self.Textname.TabIndex := 2;
Self.Textname.Text := ' ';
//
// TextBianhao
//
Self.TextBianhao.Location := System.Drawing.Point.Create(72, 56);
Self.TextBianhao.Name := 'TextBianhao';
Self.TextBianhao.Size := System.Drawing.Size.Create(112, 21);
Self.TextBianhao.TabIndex := 1;
Self.TextBianhao.Text := ' ';
//
// Label5
//
Self.Label5.Location := System.Drawing.Point.Create(208, 152);
Self.Label5.Name := 'Label5';
Self.Label5.TabIndex := 8;
Self.Label5.Text := '联系电话:';
//
// Label6
//
Self.Label6.Location := System.Drawing.Point.Create(208, 120);
Self.Label6.Name := 'Label6';
Self.Label6.TabIndex := 7;
Self.Label6.Text := '出生年份:';
//
// Label7
//
Self.Label7.Location := System.Drawing.Point.Create(208, 88);
Self.Label7.Name := 'Label7';
Self.Label7.TabIndex := 6;
Self.Label7.Text := '职 务:';
//
// Label8
//
Self.Label8.Location := System.Drawing.Point.Create(208, 56);
Self.Label8.Name := 'Label8';
Self.Label8.TabIndex := 5;
Self.Label8.Text := '姓 名:';
//
// Label4
//
Self.Label4.Location := System.Drawing.Point.Create(8, 152);
Self.Label4.Name := 'Label4';
Self.Label4.TabIndex := 4;
Self.Label4.Text := '学 历:';
//
// Label3
//
Self.Label3.Location := System.Drawing.Point.Create(8, 120);
Self.Label3.Name := 'Label3';
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -