frmworker.cs
来自「小区物业管理:管理小区的费用、小区工作人员的编排和工资管理、小区的运作、对住户资」· CS 代码 · 共 1,005 行 · 第 1/3 页
CS
1,005 行
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data .SqlClient ;
namespace WindowsApplication1
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class frmworker : System.Windows.Forms.Form
{
private System.Windows.Forms.Label lblfind1;
private System.Windows.Forms.Label lblfind2;
private System.Windows.Forms.ComboBox cbofind1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox cbofind2;
private System.Windows.Forms.Button btnEbter;
private System.Windows.Forms.Button btnRu;
private System.Windows.Forms.TextBox txtfind1;
private System.Windows.Forms.Button btnAdd;
private System.Windows.Forms.GroupBox grpfind;
private System.Windows.Forms.DataGrid dbgworker;
private System.Windows.Forms.Button btnExit;
private SqlDataAdapter objSqlDataAdapter;
private SqlConnection objSqlConnection;
private SqlParameter objParam;
private SqlCommand objSqlCommand;
private SqlDataReader objSqlDataReader;
private DataSet objDataSet;
private DialogResult objDialogResult;
private System.Windows.Forms.Button btnPrint;
private System.Windows.Forms.Button btnPrintprv;
private System.Windows.Forms.PrintPreviewDialog ppdlgworker;
private System.Drawing.Printing.PrintDocument pdocworker;
private System.Windows.Forms.PrintDialog printworker;
private System.Windows.Forms.PageSetupDialog pageSetupDialog1;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.Button btn;
private System.Windows.Forms.Button btnRe;
private System.Windows.Forms.Button btnaddwo;
private System.Windows.Forms.Label lbltime;
private System.Windows.Forms.TextBox txtaddress;
private System.Windows.Forms.Label lbladdress;
private System.Windows.Forms.TextBox txtIDcard;
private System.Windows.Forms.Label lblIDcard;
private System.Windows.Forms.ComboBox cbocarcor;
private System.Windows.Forms.Label lblcarcor;
private System.Windows.Forms.TextBox txtname;
private System.Windows.Forms.Label lblname;
private System.Windows.Forms.TextBox txtID;
private System.Windows.Forms.Label lblID;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.Label lblDID;
private System.Windows.Forms.TextBox txtDID;
private System.Windows.Forms.Button btnDel1;
private System.Windows.Forms.Button btnDEit;
private System.Windows.Forms.ComboBox cbotime;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public frmworker()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmworker));
this.grpfind = new System.Windows.Forms.GroupBox();
this.btnRu = new System.Windows.Forms.Button();
this.btnEbter = new System.Windows.Forms.Button();
this.cbofind2 = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.cbofind1 = new System.Windows.Forms.ComboBox();
this.lblfind2 = new System.Windows.Forms.Label();
this.txtfind1 = new System.Windows.Forms.TextBox();
this.lblfind1 = new System.Windows.Forms.Label();
this.dbgworker = new System.Windows.Forms.DataGrid();
this.btnAdd = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
this.btnPrint = new System.Windows.Forms.Button();
this.btnPrintprv = new System.Windows.Forms.Button();
this.ppdlgworker = new System.Windows.Forms.PrintPreviewDialog();
this.pdocworker = new System.Drawing.Printing.PrintDocument();
this.printworker = new System.Windows.Forms.PrintDialog();
this.pageSetupDialog1 = new System.Windows.Forms.PageSetupDialog();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.cbotime = new System.Windows.Forms.ComboBox();
this.btn = new System.Windows.Forms.Button();
this.btnRe = new System.Windows.Forms.Button();
this.btnaddwo = new System.Windows.Forms.Button();
this.lbltime = new System.Windows.Forms.Label();
this.txtaddress = new System.Windows.Forms.TextBox();
this.lbladdress = new System.Windows.Forms.Label();
this.txtIDcard = new System.Windows.Forms.TextBox();
this.lblIDcard = new System.Windows.Forms.Label();
this.cbocarcor = new System.Windows.Forms.ComboBox();
this.lblcarcor = new System.Windows.Forms.Label();
this.txtname = new System.Windows.Forms.TextBox();
this.lblname = new System.Windows.Forms.Label();
this.txtID = new System.Windows.Forms.TextBox();
this.lblID = new System.Windows.Forms.Label();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.btnDEit = new System.Windows.Forms.Button();
this.btnDel1 = new System.Windows.Forms.Button();
this.txtDID = new System.Windows.Forms.TextBox();
this.lblDID = new System.Windows.Forms.Label();
this.grpfind.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dbgworker)).BeginInit();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.SuspendLayout();
//
// grpfind
//
this.grpfind.Controls.Add(this.btnRu);
this.grpfind.Controls.Add(this.btnEbter);
this.grpfind.Controls.Add(this.cbofind2);
this.grpfind.Controls.Add(this.label3);
this.grpfind.Controls.Add(this.cbofind1);
this.grpfind.Controls.Add(this.lblfind2);
this.grpfind.Controls.Add(this.txtfind1);
this.grpfind.Controls.Add(this.lblfind1);
this.grpfind.Location = new System.Drawing.Point(8, 8);
this.grpfind.Name = "grpfind";
this.grpfind.Size = new System.Drawing.Size(576, 80);
this.grpfind.TabIndex = 0;
this.grpfind.TabStop = false;
this.grpfind.Text = "搜索";
//
// btnRu
//
this.btnRu.Location = new System.Drawing.Point(496, 48);
this.btnRu.Name = "btnRu";
this.btnRu.Size = new System.Drawing.Size(66, 23);
this.btnRu.TabIndex = 7;
this.btnRu.Text = "还原";
this.btnRu.Click += new System.EventHandler(this.btnRu_Click);
//
// btnEbter
//
this.btnEbter.Location = new System.Drawing.Point(400, 48);
this.btnEbter.Name = "btnEbter";
this.btnEbter.Size = new System.Drawing.Size(66, 23);
this.btnEbter.TabIndex = 6;
this.btnEbter.Text = "确定";
this.btnEbter.Click += new System.EventHandler(this.btnEbter_Click);
//
// cbofind2
//
this.cbofind2.Items.AddRange(new object[] {
"员工姓名",
"员工编号",
"员工职位",
"工作时段",
"员工籍贯",
"员工身份证"});
this.cbofind2.Location = new System.Drawing.Point(472, 16);
this.cbofind2.Name = "cbofind2";
this.cbofind2.Size = new System.Drawing.Size(88, 20);
this.cbofind2.TabIndex = 5;
this.cbofind2.Text = "员工姓名";
//
// label3
//
this.label3.Location = new System.Drawing.Point(408, 16);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(48, 20);
this.label3.TabIndex = 4;
this.label3.Text = "类别:";
//
// cbofind1
//
this.cbofind1.Items.AddRange(new object[] {
"精确搜索",
"模糊搜索"});
this.cbofind1.Location = new System.Drawing.Point(304, 16);
this.cbofind1.Name = "cbofind1";
this.cbofind1.Size = new System.Drawing.Size(88, 20);
this.cbofind1.TabIndex = 3;
this.cbofind1.Text = "精确搜索";
//
// lblfind2
//
this.lblfind2.Location = new System.Drawing.Point(224, 16);
this.lblfind2.Name = "lblfind2";
this.lblfind2.Size = new System.Drawing.Size(68, 20);
this.lblfind2.TabIndex = 2;
this.lblfind2.Text = "搜索类型:";
//
// txtfind1
//
this.txtfind1.Location = new System.Drawing.Point(80, 16);
this.txtfind1.Name = "txtfind1";
this.txtfind1.Size = new System.Drawing.Size(136, 21);
this.txtfind1.TabIndex = 1;
this.txtfind1.Text = "";
//
// lblfind1
//
this.lblfind1.Location = new System.Drawing.Point(8, 16);
this.lblfind1.Name = "lblfind1";
this.lblfind1.Size = new System.Drawing.Size(72, 20);
this.lblfind1.TabIndex = 0;
this.lblfind1.Text = "搜索内容:";
//
// dbgworker
//
this.dbgworker.CaptionText = "员工详细资料";
this.dbgworker.DataMember = "";
this.dbgworker.Enabled = false;
this.dbgworker.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dbgworker.Location = new System.Drawing.Point(8, 96);
this.dbgworker.Name = "dbgworker";
this.dbgworker.RowHeaderWidth = 40;
this.dbgworker.Size = new System.Drawing.Size(576, 192);
this.dbgworker.TabIndex = 1;
//
// btnAdd
//
this.btnAdd.Location = new System.Drawing.Point(368, 296);
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(97, 23);
this.btnAdd.TabIndex = 2;
this.btnAdd.Text = "修改资料";
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// btnExit
//
this.btnExit.Location = new System.Drawing.Point(488, 296);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(97, 23);
this.btnExit.TabIndex = 3;
this.btnExit.Text = "退出(&E)";
this.btnExit.Click += new System.EventHandler(this.btnExid_Click);
//
// btnPrint
//
this.btnPrint.Location = new System.Drawing.Point(128, 296);
this.btnPrint.Name = "btnPrint";
this.btnPrint.Size = new System.Drawing.Size(97, 23);
this.btnPrint.TabIndex = 5;
this.btnPrint.Text = "打印(&P)";
this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
//
// btnPrintprv
//
this.btnPrintprv.Location = new System.Drawing.Point(248, 296);
this.btnPrintprv.Name = "btnPrintprv";
this.btnPrintprv.Size = new System.Drawing.Size(97, 23);
this.btnPrintprv.TabIndex = 6;
this.btnPrintprv.Text = "打印预览";
this.btnPrintprv.Click += new System.EventHandler(this.btnPrintprv_Click);
//
// ppdlgworker
//
this.ppdlgworker.AutoScrollMargin = new System.Drawing.Size(0, 0);
this.ppdlgworker.AutoScrollMinSize = new System.Drawing.Size(0, 0);
this.ppdlgworker.ClientSize = new System.Drawing.Size(400, 300);
this.ppdlgworker.Document = this.pdocworker;
this.ppdlgworker.Enabled = true;
this.ppdlgworker.Icon = ((System.Drawing.Icon)(resources.GetObject("ppdlgworker.Icon")));
this.ppdlgworker.Location = new System.Drawing.Point(149, 12);
this.ppdlgworker.MinimumSize = new System.Drawing.Size(375, 250);
this.ppdlgworker.Name = "ppdlgworker";
this.ppdlgworker.TransparencyKey = System.Drawing.Color.Empty;
this.ppdlgworker.Visible = false;
//
// pdocworker
//
this.pdocworker.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.pdocworker_PrintPage);
//
// printworker
//
this.printworker.Document = this.pdocworker;
//
// pageSetupDialog1
//
this.pageSetupDialog1.Document = this.pdocworker;
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.ItemSize = new System.Drawing.Size(88, 17);
this.tabControl1.Location = new System.Drawing.Point(8, 96);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(576, 192);
this.tabControl1.TabIndex = 8;
this.tabControl1.Visible = false;
//
// tabPage1
//
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?