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

📄 zhaotuiframe.cs

📁 独立完成考勤管理软件加打卡系统(C#) 是打卡加管理系统软件 
💻 CS
📖 第 1 页 / 共 2 页
字号:
#region 导入引用类库...using System;using System.Collections;using System.ComponentModel;using System.Drawing;using System.Windows.Forms;using System.Data;using System.Data.SqlClient;#endregionnamespace WindowsApplication{	public class zhaoTuiFrame : WindowsApplication.EmployeeLeaveManager.ParentFrame	{		#region 控件集合...		private System.ComponentModel.IContainer components = null;
		private System.Data.SqlClient.SqlConnection sqlConnection1;
		private System.Data.SqlClient.SqlDataAdapter searchZhaoTuiDataAdapter;
		private System.Data.SqlClient.SqlCommand sqlSelectCommand2;		public static int intZhaoTui=0;		#endregion		#region 构造函数...		public zhaoTuiFrame()		{			// 该调用是 Windows 窗体设计器所必需的。			InitializeComponent();			// TODO: 在 InitializeComponent 调用后添加任何初始化		}		#endregion		#region 清理函数...		protected override void Dispose( bool disposing )		{			if( disposing )			{				if (components != null) 				{					components.Dispose();				}			}			base.Dispose( disposing );		}		#endregion		#region 设计器生成的代码		/// <summary>		/// 设计器支持所需的方法 - 不要使用代码编辑器修改		/// 此方法的内容。		/// </summary>		private void InitializeComponent()		{			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(zhaoTuiFrame));
			this.sqlDataAdapter = new System.Data.SqlClient.SqlDataAdapter();
			this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlConnection = new System.Data.SqlClient.SqlConnection();
			this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
			this.zhaoTuiTableSet = new WindowsApplication.zhaoTuiTableSet();
			this.searchZhaoTuiDataAdapter = new System.Data.SqlClient.SqlDataAdapter();
			this.sqlSelectCommand2 = new System.Data.SqlClient.SqlCommand();
			this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
			((System.ComponentModel.ISupportInitialize)(this.statusZhuangTai)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.ds)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.dataSet)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.statusText)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.zhaoTuiTableSet)).BeginInit();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Name = "label1";
			this.label1.Text = "早退管理";
			// 
			// tool
			// 
			this.tool.Name = "tool";
			// 
			// status
			// 
			this.status.Name = "status";
			// 
			// imageList
			// 
			this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
			// 
			// dataGrid
			// 
			this.dataGrid.Name = "dataGrid";
			// 
			// label2
			// 
			this.label2.Name = "label2";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(16, 96);
			this.label3.Name = "label3";
			this.label3.Text = "日期:";
			// 
			// textSearchA
			// 
			this.textSearchA.ForeColor = System.Drawing.Color.Black;
			this.textSearchA.Location = new System.Drawing.Point(88, 96);
			this.textSearchA.Name = "textSearchA";
			// 
			// TextCheckBox
			// 
			this.TextCheckBox.Location = new System.Drawing.Point(208, 96);
			this.TextCheckBox.Name = "TextCheckBox";
			this.TextCheckBox.Size = new System.Drawing.Size(88, 24);
			this.TextCheckBox.Text = "职工名称:";
			// 
			// textSearchB
			// 
			this.textSearchB.ForeColor = System.Drawing.Color.Black;
			this.textSearchB.Location = new System.Drawing.Point(304, 96);
			this.textSearchB.Name = "textSearchB";
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(424, 96);
			this.label4.Name = "label4";
			this.label4.Text = "状态:";
			// 
			// btnSearch
			// 
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
			// 
			// textSearchC
			// 
			this.textSearchC.ForeColor = System.Drawing.Color.Black;
			this.textSearchC.Location = new System.Drawing.Point(504, 96);
			this.textSearchC.Name = "textSearchC";
			// 
			// sqlDataAdapter
			// 
			this.sqlDataAdapter.DeleteCommand = this.sqlDeleteCommand1;
			this.sqlDataAdapter.InsertCommand = this.sqlInsertCommand1;
			this.sqlDataAdapter.SelectCommand = this.sqlSelectCommand1;
			this.sqlDataAdapter.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
																									 new System.Data.Common.DataTableMapping("Table", "Emp_ZhaoTui", new System.Data.Common.DataColumnMapping[] {
																																																					new System.Data.Common.DataColumnMapping("编号", "编号"),
																																																					new System.Data.Common.DataColumnMapping("职工名称", "职工名称"),
																																																					new System.Data.Common.DataColumnMapping("状态", "状态"),
																																																					new System.Data.Common.DataColumnMapping("上/下", "上/下"),
																																																					new System.Data.Common.DataColumnMapping("日期", "日期")})});
			this.sqlDataAdapter.UpdateCommand = this.sqlUpdateCommand1;
			// 
			// sqlDeleteCommand1
			// 
			this.sqlDeleteCommand1.CommandText = @"DELETE FROM Emp_ZhaoTui WHERE (编号 = @Original_编号) AND ([上/下] = @Original_上_下 OR @Original_上_下 IS NULL AND [上/下] IS NULL) AND (日期 = @Original_日期 OR @Original_日期 IS NULL AND 日期 IS NULL) AND (状态 = @Original_状态 OR @Original_状态 IS NULL AND 状态 IS NULL) AND (职工名称 = @Original_职工名称 OR @Original_职工名称 IS NULL AND 职工名称 IS NULL)";
			this.sqlDeleteCommand1.Connection = this.sqlConnection;
			this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_编号", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "编号", System.Data.DataRowVersion.Original, null));
			this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_上_下", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "上/下", System.Data.DataRowVersion.Original, null));
			this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_日期", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "日期", System.Data.DataRowVersion.Original, null));
			this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_状态", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "状态", System.Data.DataRowVersion.Original, null));
			this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_职工名称", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "职工名称", System.Data.DataRowVersion.Original, null));
			// 
			// sqlConnection
			// 
			this.sqlConnection.ConnectionString = "workstation id=localhost;integrated security=SSPI;database=SystemODBC;";
			// 
			// sqlInsertCommand1
			// 
			this.sqlInsertCommand1.CommandText = "INSERT INTO Emp_ZhaoTui(职工名称, 状态, [上/下], 日期) VALUES (@职工名称, @状态, @Param1, @日期); S" +
				"ELECT 编号, 职工名称, 状态, [上/下], 日期 FROM Emp_ZhaoTui WHERE (编号 = @@IDENTITY)";
			this.sqlInsertCommand1.Connection = this.sqlConnection;
			this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@职工名称", System.Data.SqlDbType.VarChar, 50, "职工名称"));
			this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@状态", System.Data.SqlDbType.VarChar, 50, "状态"));
			this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Param1", System.Data.SqlDbType.VarChar, 50, "上/下"));
			this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@日期", System.Data.SqlDbType.VarChar, 50, "日期"));
			// 
			// sqlSelectCommand1

⌨️ 快捷键说明

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