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

📄 员工考勤.cs

📁 独立完成考勤管理软件加打卡系统(C#) 是打卡加管理系统软件 
💻 CS
📖 第 1 页 / 共 4 页
字号:
			this.kaStatus.Cursor = System.Windows.Forms.Cursors.AppStarting;
			this.kaStatus.Dock = System.Windows.Forms.DockStyle.None;
			this.kaStatus.Location = new System.Drawing.Point(0, 456);
			this.kaStatus.Name = "kaStatus";
			this.kaStatus.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
																						this.kaoqinyuan,
																						this.kaoqinriqi,
																						this.kaoqinshijian,
																						this.kaoqintongji,
																						this.kaoqinzhuangtai});
			this.kaStatus.ShowPanels = true;
			this.kaStatus.Size = new System.Drawing.Size(866, 32);
			this.kaStatus.TabIndex = 2;
			// 
			// kaoqinyuan
			// 
			this.kaoqinyuan.BorderStyle = System.Windows.Forms.StatusBarPanelBorderStyle.None;
			this.kaoqinyuan.Icon = ((System.Drawing.Icon)(resources.GetObject("kaoqinyuan.Icon")));
			this.kaoqinyuan.Text = "操作员:";
			this.kaoqinyuan.Width = 150;
			// 
			// kaoqinriqi
			// 
			this.kaoqinriqi.BorderStyle = System.Windows.Forms.StatusBarPanelBorderStyle.None;
			this.kaoqinriqi.Icon = ((System.Drawing.Icon)(resources.GetObject("kaoqinriqi.Icon")));
			this.kaoqinriqi.Text = "日期:";
			this.kaoqinriqi.Width = 200;
			// 
			// kaoqinshijian
			// 
			this.kaoqinshijian.BorderStyle = System.Windows.Forms.StatusBarPanelBorderStyle.None;
			this.kaoqinshijian.Icon = ((System.Drawing.Icon)(resources.GetObject("kaoqinshijian.Icon")));
			this.kaoqinshijian.Text = "时间;";
			this.kaoqinshijian.Width = 200;
			// 
			// kaoqintongji
			// 
			this.kaoqintongji.BorderStyle = System.Windows.Forms.StatusBarPanelBorderStyle.None;
			this.kaoqintongji.Icon = ((System.Drawing.Icon)(resources.GetObject("kaoqintongji.Icon")));
			this.kaoqintongji.Text = "统计:";
			this.kaoqintongji.Width = 120;
			// 
			// kaoqinzhuangtai
			// 
			this.kaoqinzhuangtai.BorderStyle = System.Windows.Forms.StatusBarPanelBorderStyle.None;
			this.kaoqinzhuangtai.Icon = ((System.Drawing.Icon)(resources.GetObject("kaoqinzhuangtai.Icon")));
			this.kaoqinzhuangtai.Text = "状态:";
			this.kaoqinzhuangtai.Width = 150;
			// 
			// timerStart
			// 
			this.timerStart.Interval = 1000;
			// 
			// currentTimer
			// 
			this.currentTimer.Enabled = true;
			this.currentTimer.Interval = 1000;
			this.currentTimer.Tick += new System.EventHandler(this.currentTimer_Tick);
			// 
			// tool
			// 
			this.tool.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
			this.tool.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
																					this.toolTimeDesign,
																					this.toolShuaKa,
																					this.toolTongJi,
																					this.toolBarButton1,
																					this.toolTime,
																					this.toolBarButton3});
			this.tool.ButtonSize = new System.Drawing.Size(55, 40);
			this.tool.Cursor = System.Windows.Forms.Cursors.Hand;
			this.tool.DropDownArrows = true;
			this.tool.ImageList = this.image;
			this.tool.Location = new System.Drawing.Point(0, 0);
			this.tool.Name = "tool";
			this.tool.ShowToolTips = true;
			this.tool.Size = new System.Drawing.Size(866, 41);
			this.tool.TabIndex = 3;
			this.tool.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.tool_ButtonClick);
			// 
			// toolTimeDesign
			// 
			this.toolTimeDesign.DropDownMenu = this.contextMenu;
			this.toolTimeDesign.ImageIndex = 0;
			this.toolTimeDesign.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton;
			this.toolTimeDesign.Text = "考勤设置";
			// 
			// contextMenu
			// 
			this.contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																						this.menuReason,
																						this.menuBrush});
			// 
			// menuReason
			// 
			this.menuReason.Index = 0;
			this.menuReason.Text = "请假原因(&Q)";
			this.menuReason.Click += new System.EventHandler(this.menuReason_Click);
			// 
			// menuBrush
			// 
			this.menuBrush.Index = 1;
			this.menuBrush.Text = "时间设置(&B)";
			this.menuBrush.Click += new System.EventHandler(this.menuBrush_Click);
			// 
			// toolShuaKa
			// 
			this.toolShuaKa.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
			// 
			// toolTongJi
			// 
			this.toolTongJi.ImageIndex = 1;
			this.toolTongJi.Text = "考勤统计";
			// 
			// toolBarButton1
			// 
			this.toolBarButton1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
			// 
			// toolTime
			// 
			this.toolTime.ImageIndex = 2;
			this.toolTime.Text = "打印月考勤";
			// 
			// toolBarButton3
			// 
			this.toolBarButton3.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
			// 
			// 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_BrushID", 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("下午下班", "下午下班"),
																																																					new System.Data.Common.DataColumnMapping("状态", "状态")})});
			this.sqlDataAdapter.UpdateCommand = this.sqlUpdateCommand1;
			// 
			// sqlDeleteCommand1
			// 
			this.sqlDeleteCommand1.CommandText = @"DELETE FROM Emp_BrushID 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) 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));
			this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_状态", System.Data.SqlDbType.VarChar, 10, 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_BrushID(职工名称, 上午上班, 上午下班, 下午上班, 下午下班, 状态) VALUES (@职工名称, @上午上班, @" +
				"上午下班, @下午上班, @下午下班, @状态); SELECT 编号, 职工名称, 上午上班, 上午下班, 下午上班, 下午下班, 状态 FROM Emp_B" +
				"rushID 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("@上午下班", 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("@下午下班", System.Data.SqlDbType.VarChar, 50, "下午下班"));
			this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@状态", System.Data.SqlDbType.VarChar, 10, "状态"));
			// 
			// sqlSelectCommand1
			// 
			this.sqlSelectCommand1.CommandText = "SELECT 编号, 职工名称, 上午上班, 上午下班, 下午上班, 下午下班, 状态 FROM Emp_BrushID";
			this.sqlSelectCommand1.Connection = this.sqlConnection;
			// 
			// sqlUpdateCommand1
			// 
			this.sqlUpdateCommand1.CommandText = @"UPDATE Emp_BrushID SET 职工名称 = @职工名称, 上午上班 = @上午上班, 上午下班 = @上午下班, 下午上班 = @下午上班, 下午下班 = @下午下班, 状态 = @状态 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) AND (职工名称 = @Original_职工名称 OR @Original_职工名称 IS NULL AND 职工名称 IS NULL); SELECT 编号, 职工名称, 上午上班, 上午下班, 下午上班, 下午下班, 状态 FROM Emp_BrushID WHERE (编号 = @编号)";
			this.sqlUpdateCommand1.Connection = this.sqlConnection;
			this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@职工名称", System.Data.SqlDbType.VarChar, 50, "职工名称"));
			this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@上午上班", System.Data.SqlDbType.VarChar, 50, "上午上班"));
			this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@上午下班", System.Data.SqlDbType.VarChar, 50, "上午下班"));
			this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@下午上班", System.Data.SqlDbType.VarChar, 50, "下午上班"));
			this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@下午下班", System.Data.SqlDbType.VarChar, 50, "下午下班"));
			this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@状态", System.Data.SqlDbType.VarChar, 10, "状态"));
			this.sqlUpdateCommand1.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.sqlUpdateCommand1.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.sqlUpdateCommand1.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.sqlUpdateCommand1.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.sqlUpdateCommand1.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.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_状态", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "状态", System.Data.DataRowVersion.Original, null));
			this.sqlUpdateCommand1.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.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@编号", System.Data.SqlDbType.Int, 4, "编号"));
			// 
			// emp_BrushFrameIDSet
			// 
			this.emp_BrushFrameIDSet.DataSetName = "Emp_BrushFrameIDSet";
			this.emp_BrushFrameIDSet.Locale = new System.Globalization.CultureInfo("zh-CN");
			// 
			// searchKaoQinManager
			// 
			this.searchKaoQinManager.SelectCommand = this.sqlSelectCommand2;
			this.searchKaoQinManager.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
																										  new System.Data.Common.DataTableMapping("Table", "Emp_BrushID", 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("下午上班", "下午上班"),
																																																						 new System.Data.Common.DataColumnMapping("下午下班", "下午下班"),
																																																						 new System.Data.Common.DataColumnMapping("状态", "状态")})});
			// 
			// sqlSelectCommand2
			// 
			this.sqlSelectCommand2.CommandText = "SELECT 编号, 日期, 职工名称, 上午上班, 上午下班, 下午上班, 下午下班, 状态 FROM Emp_BrushID WHERE (日期 LIKE @" +
				"Param3) AND (职工名称 LIKE @Param4)";
			this.sqlSelectCommand2.Connection = this.sqlConn;
			this.sqlSelectCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Param3", System.Data.SqlDbType.VarChar, 50, "日期"));
			this.sqlSelectCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Param4", System.Data.SqlDbType.VarChar, 50, "职工名称"));
			// 
			// sqlConn
			// 
			this.sqlConn.ConnectionString = "workstation id=localhost;integrated security=SSPI;database=SystemODBC";
			// 
			// 员工考勤
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(255)));
			this.ClientSize = new System.Drawing.Size(866, 487);
			this.Controls.Add(this.tool);
			this.Controls.Add(this.kaStatus);
			this.Controls.Add(this.groupBox1);
			this.Controls.Add(this.groupBox2);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "员工考勤";
			this.ShowInTaskbar = false;
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "Emp_KaoQinFrame";
			this.Load += new System.EventHandler(this.员工考勤_Load);
			this.groupBox2.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.dataGrid)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.kaoqinyuan)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.kaoqinriqi)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.kaoqinshijian)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.kaoqintongji)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.kaoqinzhuangtai)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.emp_BrushFrameIDSet)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion
		#region 事件初始化...
		private void 员工考勤_Load(object sender, System.EventArgs e)
		{
			try
			{
				insertBrushID();
				#region 工具栏上显示字符串
				this.kaoqinyuan.Text="操作员:"+landFrame.strName;
				this.kaoqintongji.Text="今天刷卡:"+selectCount().Trim()+"人";
				this.kaoqinriqi.Text="日期:"+System.DateTime.Now.ToLongDateString();
				#endregion
				#region 填充下拉表框
                DataTable tempTable=new DataTable();
				tempTable=returnEmployeeName();
				for(int k=0;k<tempTable.Rows.Count;k++)
				{
					EmployeeCombox.Items.Add(tempTable.Rows[k][0].ToString().Trim());
				}
				EmployeeCombox.SelectedIndex=0;
				this.kaoqinzhuangtai.Text="选中为:"+EmployeeCombox.Text.ToString();
				#endregion
                #region 初始化TreeView控件...
                DataTable emp_NameTable=new DataTable();
				emp_NameTable=returnEmployeeID();
				for(int j=0;j<emp_NameTable.Rows.Count;j++)
				{
					rootNode.Nodes.Add(emp_NameTable.Rows[j][0].ToString().Trim());
				}
				#endregion
				#region 初始化 Emp_Name控件
				DataTable emp_nameTable=new DataTable();
                          emp_nameTable=returnEmp_Name();
				for(int r=0;r<emp_nameTable.Rows.Count;r++)
				{
					this.emp_Name.Items.Add(emp_nameTable.Rows[r][0].ToString().Trim());
				}

⌨️ 快捷键说明

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