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

📄 leavefreamsearch.cs

📁 独立完成考勤管理软件加打卡系统(C#) 是打卡加管理系统软件 
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;using System.Collections;using System.ComponentModel;using System.Drawing;using System.Windows.Forms;using System.Data;using System.Data.SqlClient;using System.Drawing.Text;namespace WindowsApplication{	public class LeaveFreamSearch : WindowsApplication.EmployeeLeaveManager.ParentFrame	{		#region Control Collection		private System.ComponentModel.IContainer components = null;
		private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter;
		private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
		private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
		private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
		private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
		private System.Data.SqlClient.SqlConnection sqlConnection1;
		private WindowsApplication.LeaveTableSet leaveTableSet;		private ConnectionData conn=new ConnectionData();
		private System.Data.SqlClient.SqlDataAdapter searchLeaveDataAdapter;
		private System.Data.SqlClient.SqlCommand sqlSelectCommand2;
		private System.Data.SqlClient.SqlConnection sqlConnection2;		public  static int intLeave=0;		#endregion		#region Contruction Define		public LeaveFreamSearch()		{			// 该调用是 Windows 窗体设计器所必需的。			InitializeComponent();			// TODO: 在 InitializeComponent 调用后添加任何初始化		}		/// <summary>		/// 清理所有正在使用的资源。		/// </summary>		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(LeaveFreamSearch));
			this.sqlDataAdapter = new System.Data.SqlClient.SqlDataAdapter();
			this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlConnection1 = 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.leaveTableSet = new WindowsApplication.LeaveTableSet();
			this.searchLeaveDataAdapter = new System.Data.SqlClient.SqlDataAdapter();
			this.sqlSelectCommand2 = new System.Data.SqlClient.SqlCommand();
			this.sqlConnection2 = 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.leaveTableSet)).BeginInit();
			// 
			// 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.Location = new System.Drawing.Point(88, 96);
			this.textSearchA.Name = "textSearchA";
			// 
			// TextCheckBox
			// 
			this.TextCheckBox.Location = new System.Drawing.Point(200, 96);
			this.TextCheckBox.Name = "TextCheckBox";
			this.TextCheckBox.Size = new System.Drawing.Size(88, 24);
			this.TextCheckBox.Text = "职工名称:";
			// 
			// textSearchB
			// 
			this.textSearchB.Name = "textSearchB";
			// 
			// label4
			// 
			this.label4.Name = "label4";
			this.label4.Text = "日期:";
			// 
			// btnSearch
			// 
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
			// 
			// textSearchC
			// 
			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", "Employee_LeaveTable", 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("请假原因", "请假原因"),
																																																							new System.Data.Common.DataColumnMapping("请假次数", "请假次数")})});
			this.sqlDataAdapter.UpdateCommand = this.sqlUpdateCommand1;
			// 
			// sqlDeleteCommand1
			// 
			this.sqlDeleteCommand1.CommandText = @"DELETE FROM Employee_LeaveTable 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) AND (请假次数 = @Original_请假次数 OR @Original_请假次数 IS NULL AND 请假次数 IS NULL)";
			this.sqlDeleteCommand1.Connection = this.sqlConnection1;
			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));
			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));
			// 
			// sqlConnection1
			// 
			this.sqlConnection1.ConnectionString = "workstation id=localhost;integrated security=SSPI;database=SystemODBC";
			// 
			// sqlInsertCommand1
			// 

⌨️ 快捷键说明

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