📄 windiploma.~pas
字号:
unit Windiploma;
//****************************************************************
//*公司名:华夏数码有限公司
//*系统名:考勤管理系统
//*程序名:WinDiploma
//*
//*--------------------------------------------------------------
//* [年月日] [制造者]
//*--------------------------------------------------------------
//* 2005/12/11 徐二芳
//*
//****************************************************************
interface
uses
System.Drawing, System.Collections, System.ComponentModel,
System.Windows.Forms, System.Data, System.Resources,clsmain,
system.Data.OleDb,borland.Vcl.SysUtils;
type
TWindiploma = 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;
tbndel: System.Windows.Forms.ToolBarButton;
ToolBarButton1: System.Windows.Forms.ToolBarButton;
tbnexit: System.Windows.Forms.ToolBarButton;
Label2: System.Windows.Forms.Label;
Label3: System.Windows.Forms.Label;
Textname: System.Windows.Forms.TextBox;
Textmemo: System.Windows.Forms.TextBox;
Label6: System.Windows.Forms.Label;
Cmbxl: System.Windows.Forms.ComboBox;
DataGrid1: System.Windows.Forms.DataGrid;
Butfind: 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 TabControl1_SelectedIndexChanged(sender: System.Object; e: System.EventArgs);
procedure TWindiploma_Load(sender: System.Object; e: System.EventArgs);
procedure TWindiploma_Closed(sender: System.Object; e: System.EventArgs);
procedure TWindiploma_KeyDown(sender: System.Object; e: System.Windows.Forms.KeyEventArgs);
procedure TWindiploma_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 DataGrid1_CurrentCellChanged(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 item_check: boolean;
function item_checkF: boolean;
function check_textname: boolean;
function check_cmbxl: boolean;
function data_ent: boolean;
function data_upd: boolean;
function data_del: boolean;
function data_get: boolean;
procedure RefreshEnabled(NThis, NOther: Boolean);
{ Private Declarations }
public
constructor Create;
end;
[assembly: RuntimeRequiredAttribute(TypeOf(TWindiploma))]
implementation
var
MyDs:DataSet;
DGDs:DataSet;
Flg:string;
{$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 TWindiploma.InitializeComponent;
type
TSystem_Windows_Forms_ToolBarButtonArray = array of System.Windows.Forms.ToolBarButton;
TSystem_ObjectArray = array of System.Object;
var
resources: System.Resources.ResourceManager;
begin
Self.components := System.ComponentModel.Container.Create;
resources := System.Resources.ResourceManager.Create(TypeOf(TWindiploma));
Self.TabControl1 := System.Windows.Forms.TabControl.Create;
Self.TabPage1 := System.Windows.Forms.TabPage.Create;
Self.Textmemo := System.Windows.Forms.TextBox.Create;
Self.Textname := System.Windows.Forms.TextBox.Create;
Self.Label3 := System.Windows.Forms.Label.Create;
Self.Label2 := 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.tbndel := System.Windows.Forms.ToolBarButton.Create;
Self.ToolBarButton1 := 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.Butfind := System.Windows.Forms.Button.Create;
Self.DataGrid1 := System.Windows.Forms.DataGrid.Create;
Self.Cmbxl := System.Windows.Forms.ComboBox.Create;
Self.Label6 := 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.ImageList := Self.ImageList1;
Self.TabControl1.Location := System.Drawing.Point.Create(0, 0);
Self.TabControl1.Name := 'TabControl1';
Self.TabControl1.SelectedIndex := 0;
Self.TabControl1.Size := System.Drawing.Size.Create(312, 272);
Self.TabControl1.TabIndex := 0;
Include(Self.TabControl1.SelectedIndexChanged, Self.TabControl1_SelectedIndexChanged);
//
// TabPage1
//
Self.TabPage1.Controls.Add(Self.Textmemo);
Self.TabPage1.Controls.Add(Self.Textname);
Self.TabPage1.Controls.Add(Self.Label3);
Self.TabPage1.Controls.Add(Self.Label2);
Self.TabPage1.Controls.Add(Self.ToolBar1);
Self.TabPage1.Location := System.Drawing.Point.Create(4, 23);
Self.TabPage1.Name := 'TabPage1';
Self.TabPage1.Size := System.Drawing.Size.Create(304, 245);
Self.TabPage1.TabIndex := 0;
Self.TabPage1.Text := '维护信息';
//
// Textmemo
//
Self.Textmemo.AutoSize := False;
Self.Textmemo.Location := System.Drawing.Point.Create(80, 96);
Self.Textmemo.Name := 'Textmemo';
Self.Textmemo.Size := System.Drawing.Size.Create(192, 56);
Self.Textmemo.TabIndex := 2;
Self.Textmemo.Text := ' ';
//
// Textname
//
Self.Textname.Location := System.Drawing.Point.Create(80, 56);
Self.Textname.Name := 'Textname';
Self.Textname.TabIndex := 1;
Self.Textname.Text := ' ';
//
// Label3
//
Self.Label3.Location := System.Drawing.Point.Create(8, 96);
Self.Label3.Name := 'Label3';
Self.Label3.TabIndex := 3;
Self.Label3.Text := '备 注:';
//
// Label2
//
Self.Label2.Location := System.Drawing.Point.Create(8, 56);
Self.Label2.Name := 'Label2';
Self.Label2.TabIndex := 2;
Self.Label2.Text := '学历名称:';
//
// ToolBar1
//
Self.ToolBar1.Buttons.AddRange(TSystem_Windows_Forms_ToolBarButtonArray.Create(Self.tbnadd,
Self.tbnedit, Self.tbnsave, Self.tbndel, Self.ToolBarButton1, Self.tbnexit));
Self.ToolBar1.DropDownArrows := True;
Self.ToolBar1.ImageList := Self.ImageList1;
Self.ToolBar1.Location := System.Drawing.Point.Create(0, 0);
Self.ToolBar1.Name := 'ToolBar1';
Self.ToolBar1.ShowToolTips := True;
Self.ToolBar1.Size := System.Drawing.Size.Create(304, 41);
Self.ToolBar1.TabIndex := 0;
Include(Self.ToolBar1.ButtonClick, Self.ToolBar1_ButtonClick);
//
// tbnadd
//
Self.tbnadd.ImageIndex := 4;
Self.tbnadd.Tag := '1';
Self.tbnadd.Text := '添加';
Self.tbnadd.ToolTipText := '添加';
//
// tbnedit
//
Self.tbnedit.ImageIndex := 2;
Self.tbnedit.Tag := '2';
Self.tbnedit.Text := '修改';
Self.tbnedit.ToolTipText := '修改';
//
// tbnsave
//
Self.tbnsave.ImageIndex := 8;
Self.tbnsave.Tag := '3';
Self.tbnsave.Text := '保存';
Self.tbnsave.ToolTipText := '保存';
//
// tbndel
//
Self.tbndel.ImageIndex := 10;
Self.tbndel.Tag := '4';
Self.tbndel.Text := '删除';
Self.tbndel.ToolTipText := '删除';
//
// ToolBarButton1
//
Self.ToolBarButton1.Style := System.Windows.Forms.ToolBarButtonStyle.Separator;
Self.ToolBarButton1.Tag := '';
//
// tbnexit
//
Self.tbnexit.ImageIndex := 3;
Self.tbnexit.Tag := '5';
Self.tbnexit.Text := '退出';
Self.tbnexit.ToolTipText := '退出';
//
// ImageList1
//
Self.ImageList1.ImageSize := System.Drawing.Size.Create(16, 16);
Self.ImageList1.ImageStream := (System.Windows.Forms.ImageListStreamer(resources.GetObject('ImageList1.ImageStream')));
Self.ImageList1.TransparentColor := System.Drawing.Color.Transparent;
//
// TabPage2
//
Self.TabPage2.Controls.Add(Self.Butfind);
Self.TabPage2.Controls.Add(Self.DataGrid1);
Self.TabPage2.Controls.Add(Self.Cmbxl);
Self.TabPage2.Controls.Add(Self.Label6);
Self.TabPage2.Location := System.Drawing.Point.Create(4, 23);
Self.TabPage2.Name := 'TabPage2';
Self.TabPage2.Size := System.Drawing.Size.Create(304, 245);
Self.TabPage2.TabIndex := 1;
Self.TabPage2.Text := '信息查询';
//
// Butfind
//
Self.Butfind.Location := System.Drawing.Point.Create(208, 16);
Self.Butfind.Name := 'Butfind';
Self.Butfind.TabIndex := 7;
Self.Butfind.Text := '查询';
Include(Self.Butfind.Click, Self.Butfind_Click);
//
// DataGrid1
//
Self.DataGrid1.AllowSorting := False;
Self.DataGrid1.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.DataGrid1.CaptionText := ' 学历查询';
Self.DataGrid1.DataMember := '';
Self.DataGrid1.HeaderForeColor := System.Drawing.SystemColors.ControlText;
Self.DataGrid1.Location := System.Drawing.Point.Create(0, 64);
Self.DataGrid1.Name := 'DataGrid1';
Self.DataGrid1.ReadOnly := True;
Self.DataGrid1.Size := System.Drawing.Size.Create(304, 176);
Self.DataGrid1.TabIndex := 6;
Include(Self.DataGrid1.CurrentCellChanged, Self.DataGrid1_CurrentCellChanged);
//
// Cmbxl
//
Self.Cmbxl.Items.AddRange(TSystem_ObjectArray.Create('', '博士', '硕士', '本科',
'专科', '高中', '研究生'));
Self.Cmbxl.Location := System.Drawing.Point.Create(80, 16);
Self.Cmbxl.Name := 'Cmbxl';
Self.Cmbxl.Size := System.Drawing.Size.Create(104, 20);
Self.Cmbxl.TabIndex := 3;
Self.Cmbxl.Text := ' ';
//
// Label6
//
Self.Label6.Location := System.Drawing.Point.Create(8, 24);
Self.Label6.Name := 'Label6';
Self.Label6.Size := System.Drawing.Size.Create(96, 16);
Self.Label6.TabIndex := 2;
Self.Label6.Text := '学历名称:';
//
// TWindiploma
//
Self.AutoScaleBaseSize := System.Drawing.Size.Create(6, 14);
Self.ClientSize := System.Drawing.Size.Create(312, 273);
Self.Controls.Add(Self.TabControl1);
Self.FormBorderStyle := System.Windows.Forms.FormBorderStyle.FixedSingle;
Self.Icon := (System.Drawing.Icon(resources.GetObject('$this.Icon')));
Self.KeyPreview := True;
Self.Name := 'TWindiploma';
Self.Text := '学历管理';
Include(Self.KeyDown, Self.TWindiploma_KeyDown);
Include(Self.KeyPress, Self.TWindiploma_KeyPress);
Include(Self.Load, Self.TWindiploma_Load);
Include(Self.Closed, Self.TWindiploma_Closed);
Self.TabControl1.ResumeLayout(False);
Self.TabPage1.ResumeLayout(False);
Self.TabPage2.ResumeLayout(False);
(System.ComponentModel.ISupportInitialize(Self.DataGrid1)).EndInit;
Self.ResumeLayout(False);
end;
{$ENDREGION}
procedure TWindiploma.Dispose(Disposing: Boolean);
begin
if Disposing then
begin
if Components <> nil then
Components.Dispose();
end;
inherited Dispose(Disposing);
end;
constructor TWindiploma.Create;
begin
inherited Create;
//
// Required for Windows Form Designer support
//
InitializeComponent;
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -