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

📄 leave.cs

📁 主要介绍了系统的需求分析
💻 CS
📖 第 1 页 / 共 4 页
字号:
			this.btnExcel.Click += new System.EventHandler(this.btnExcel_Click);
			// 
			// btnCancelSearch
			// 
			this.btnCancelSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnCancelSearch.Image = ((System.Drawing.Image)(resources.GetObject("btnCancelSearch.Image")));
			this.btnCancelSearch.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnCancelSearch.Location = new System.Drawing.Point(448, 64);
			this.btnCancelSearch.Name = "btnCancelSearch";
			this.btnCancelSearch.Size = new System.Drawing.Size(56, 24);
			this.btnCancelSearch.TabIndex = 124;
			this.btnCancelSearch.Text = "取消";
			this.btnCancelSearch.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.checkBox1);
			this.groupBox1.Controls.Add(this.textEmployeeID2);
			this.groupBox1.Controls.Add(this.dateTimePicker3);
			this.groupBox1.Controls.Add(this.dateTimePicker4);
			this.groupBox1.Controls.Add(this.comboLeaveType2);
			this.groupBox1.Controls.Add(this.label8);
			this.groupBox1.Controls.Add(this.label9);
			this.groupBox1.Controls.Add(this.label10);
			this.groupBox1.Controls.Add(this.label11);
			this.groupBox1.Location = new System.Drawing.Point(40, 8);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(288, 152);
			this.groupBox1.TabIndex = 123;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "事假病假";
			// 
			// checkBox1
			// 
			this.checkBox1.Location = new System.Drawing.Point(16, 112);
			this.checkBox1.Name = "checkBox1";
			this.checkBox1.Size = new System.Drawing.Size(64, 24);
			this.checkBox1.TabIndex = 10;
			this.checkBox1.Text = "按时间";
			this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
			// 
			// textEmployeeID2
			// 
			this.textEmployeeID2.Location = new System.Drawing.Point(40, 56);
			this.textEmployeeID2.Name = "textEmployeeID2";
			this.textEmployeeID2.Size = new System.Drawing.Size(80, 21);
			this.textEmployeeID2.TabIndex = 3;
			this.textEmployeeID2.Text = "";
			// 
			// dateTimePicker3
			// 
			this.dateTimePicker3.Enabled = false;
			this.dateTimePicker3.Format = System.Windows.Forms.DateTimePickerFormat.Short;
			this.dateTimePicker3.Location = new System.Drawing.Point(88, 112);
			this.dateTimePicker3.Name = "dateTimePicker3";
			this.dateTimePicker3.Size = new System.Drawing.Size(88, 21);
			this.dateTimePicker3.TabIndex = 2;
			this.dateTimePicker3.Value = new System.DateTime(2003, 12, 20, 0, 0, 0, 0);
			// 
			// dateTimePicker4
			// 
			this.dateTimePicker4.Enabled = false;
			this.dateTimePicker4.Format = System.Windows.Forms.DateTimePickerFormat.Short;
			this.dateTimePicker4.Location = new System.Drawing.Point(192, 112);
			this.dateTimePicker4.Name = "dateTimePicker4";
			this.dateTimePicker4.Size = new System.Drawing.Size(88, 21);
			this.dateTimePicker4.TabIndex = 1;
			this.dateTimePicker4.Value = new System.DateTime(2003, 12, 20, 0, 0, 0, 0);
			// 
			// comboLeaveType2
			// 
			this.comboLeaveType2.ItemHeight = 12;
			this.comboLeaveType2.Location = new System.Drawing.Point(152, 56);
			this.comboLeaveType2.Name = "comboLeaveType2";
			this.comboLeaveType2.Size = new System.Drawing.Size(88, 20);
			this.comboLeaveType2.TabIndex = 9;
			// 
			// label8
			// 
			this.label8.Location = new System.Drawing.Point(160, 24);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(64, 23);
			this.label8.TabIndex = 8;
			this.label8.Text = "请假类型";
			// 
			// label9
			// 
			this.label9.Location = new System.Drawing.Point(48, 24);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(48, 23);
			this.label9.TabIndex = 7;
			this.label9.Text = "职工号";
			// 
			// label10
			// 
			this.label10.Location = new System.Drawing.Point(208, 88);
			this.label10.Name = "label10";
			this.label10.Size = new System.Drawing.Size(56, 23);
			this.label10.TabIndex = 6;
			this.label10.Text = "截至日期";
			// 
			// label11
			// 
			this.label11.Location = new System.Drawing.Point(104, 88);
			this.label11.Name = "label11";
			this.label11.Size = new System.Drawing.Size(64, 23);
			this.label11.TabIndex = 5;
			this.label11.Text = "起始日期";
			// 
			// dataGrid2
			// 
			this.dataGrid2.AlternatingBackColor = System.Drawing.Color.GhostWhite;
			this.dataGrid2.BackColor = System.Drawing.Color.GhostWhite;
			this.dataGrid2.BackgroundColor = System.Drawing.Color.Lavender;
			this.dataGrid2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.dataGrid2.CaptionBackColor = System.Drawing.Color.RoyalBlue;
			this.dataGrid2.CaptionForeColor = System.Drawing.Color.White;
			this.dataGrid2.DataMember = "";
			this.dataGrid2.FlatMode = true;
			this.dataGrid2.Font = new System.Drawing.Font("Tahoma", 8F);
			this.dataGrid2.ForeColor = System.Drawing.Color.MidnightBlue;
			this.dataGrid2.GridLineColor = System.Drawing.Color.RoyalBlue;
			this.dataGrid2.HeaderBackColor = System.Drawing.Color.MidnightBlue;
			this.dataGrid2.HeaderFont = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
			this.dataGrid2.HeaderForeColor = System.Drawing.Color.Lavender;
			this.dataGrid2.LinkColor = System.Drawing.Color.Teal;
			this.dataGrid2.Location = new System.Drawing.Point(40, 184);
			this.dataGrid2.Name = "dataGrid2";
			this.dataGrid2.ParentRowsBackColor = System.Drawing.Color.Lavender;
			this.dataGrid2.ParentRowsForeColor = System.Drawing.Color.MidnightBlue;
			this.dataGrid2.ReadOnly = true;
			this.dataGrid2.SelectionBackColor = System.Drawing.Color.Teal;
			this.dataGrid2.SelectionForeColor = System.Drawing.Color.PaleGreen;
			this.dataGrid2.Size = new System.Drawing.Size(624, 312);
			this.dataGrid2.TabIndex = 117;
			this.dataGrid2.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] {
																								  this.dataGridTableStyle2});
			// 
			// dataGridTableStyle2
			// 
			this.dataGridTableStyle2.DataGrid = this.dataGrid2;
			this.dataGridTableStyle2.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] {
																												  this.dataGridTextBoxColumn12,
																												  this.dataGridTextBoxColumn7,
																												  this.dataGridTextBoxColumn8,
																												  this.dataGridTextBoxColumn14,
																												  this.dataGridTextBoxColumn9,
																												  this.dataGridTextBoxColumn10,
																												  this.dataGridTextBoxColumn11,
																												  this.dataGridTextBoxColumn13,
																												  this.dataGridTextBoxColumn15});
			this.dataGridTableStyle2.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGridTableStyle2.MappingName = "LeaveRecord";
			// 
			// dataGridTextBoxColumn12
			// 
			this.dataGridTextBoxColumn12.Format = "";
			this.dataGridTextBoxColumn12.FormatInfo = null;
			this.dataGridTextBoxColumn12.HeaderText = "职工号";
			this.dataGridTextBoxColumn12.MappingName = "EmployeeID";
			this.dataGridTextBoxColumn12.Width = 75;
			// 
			// dataGridTextBoxColumn7
			// 
			this.dataGridTextBoxColumn7.Format = "";
			this.dataGridTextBoxColumn7.FormatInfo = null;
			this.dataGridTextBoxColumn7.HeaderText = "姓名";
			this.dataGridTextBoxColumn7.MappingName = "EmployeeName";
			this.dataGridTextBoxColumn7.Width = 75;
			// 
			// dataGridTextBoxColumn8
			// 
			this.dataGridTextBoxColumn8.Format = "";
			this.dataGridTextBoxColumn8.FormatInfo = null;
			this.dataGridTextBoxColumn8.HeaderText = "部门";
			this.dataGridTextBoxColumn8.MappingName = "Department";
			this.dataGridTextBoxColumn8.Width = 75;
			// 
			// dataGridTextBoxColumn14
			// 
			this.dataGridTextBoxColumn14.Format = "";
			this.dataGridTextBoxColumn14.FormatInfo = null;
			this.dataGridTextBoxColumn14.HeaderText = "类型";
			this.dataGridTextBoxColumn14.MappingName = "LeaveType";
			this.dataGridTextBoxColumn14.Width = 75;
			// 
			// dataGridTextBoxColumn9
			// 
			this.dataGridTextBoxColumn9.Format = "";
			this.dataGridTextBoxColumn9.FormatInfo = null;
			this.dataGridTextBoxColumn9.HeaderText = "开始日期";
			this.dataGridTextBoxColumn9.MappingName = "BeginDate";
			this.dataGridTextBoxColumn9.Width = 75;
			// 
			// dataGridTextBoxColumn10
			// 
			this.dataGridTextBoxColumn10.Format = "";
			this.dataGridTextBoxColumn10.FormatInfo = null;
			this.dataGridTextBoxColumn10.HeaderText = "结束日期";
			this.dataGridTextBoxColumn10.MappingName = "EndDate";
			this.dataGridTextBoxColumn10.Width = 75;
			// 
			// dataGridTextBoxColumn11
			// 
			this.dataGridTextBoxColumn11.Format = "";
			this.dataGridTextBoxColumn11.FormatInfo = null;
			this.dataGridTextBoxColumn11.HeaderText = "天数";
			this.dataGridTextBoxColumn11.MappingName = "Days";
			this.dataGridTextBoxColumn11.Width = 75;
			// 
			// dataGridTextBoxColumn13
			// 
			this.dataGridTextBoxColumn13.Format = "";
			this.dataGridTextBoxColumn13.FormatInfo = null;
			this.dataGridTextBoxColumn13.HeaderText = "请假日期";
			this.dataGridTextBoxColumn13.MappingName = "Date";
			this.dataGridTextBoxColumn13.Width = 75;
			// 
			// dataGridTextBoxColumn15
			// 
			this.dataGridTextBoxColumn15.Format = "";
			this.dataGridTextBoxColumn15.FormatInfo = null;
			this.dataGridTextBoxColumn15.HeaderText = "备注";
			this.dataGridTextBoxColumn15.MappingName = "Remark";
			this.dataGridTextBoxColumn15.Width = 75;
			// 
			// btnExit
			// 
			this.btnExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.btnExit.Image = ((System.Drawing.Image)(resources.GetObject("btnExit.Image")));
			this.btnExit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnExit.Location = new System.Drawing.Point(752, 488);
			this.btnExit.Name = "btnExit";
			this.btnExit.Size = new System.Drawing.Size(56, 24);
			this.btnExit.TabIndex = 94;
			this.btnExit.Text = "退出";
			this.btnExit.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
			// 
			// Leave
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(824, 573);
			this.Controls.Add(this.btnExit);
			this.Controls.Add(this.tabControl1);
			this.ForeColor = System.Drawing.SystemColors.Desktop;
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.Name = "Leave";
			this.Text = "事假病假";
			this.Load += new System.EventHandler(this.Leave_Load);
			this.tabControl1.ResumeLayout(false);
			this.tabPage1.ResumeLayout(false);
			this.groupBox2.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
			this.groupBox3.ResumeLayout(false);
			this.tabPage2.ResumeLayout(false);
			this.groupBox1.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.dataGrid2)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		private void btnExit_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

		private void Leave_Load(object sender, System.EventArgs e)
		{
			
			this.DataSet_Binding();
			this.lblRecord_Change();
			this.Buttons_Control(false);	
			
		}

	
		private void DataSet_Binding()
		{
			try
			{
				this.Connection1.Open();
				this.dataAdapter1.Fill(this.DataSetLeaveRecord,"LeaveRecord");				
				
			}
			catch(Exception E)
			{
				MessageBox.Show(E.ToString());
			}
			finally
			{
				this.Connection1.Close();			
			}
			this.dataGrid1.DataSource=this.DataSetLeaveRecord;
			this.dataGrid1.DataMember="LeaveRecord";				
			this.textEmployeeID.DataBindings.Add("Text",this.DataSetLeaveRecord,"LeaveRecord.EmployeeID");
			this.comboLeaveType.DataBindings.Add("Text",this.DataSetLeaveRecord,"LeaveRecord.LeaveType");
			this.dateTimePicker1.DataBindings.Add("Text",this.DataSetLeaveRecord,"LeaveRecord.BeginDate");
			this.dateTimePicker2.DataBindings.Add("Text",this.DataSetLeaveRecord,"LeaveRecord.EndDate");	
			this.textRemark.DataBindings.Add("Text",this.DataSetLeaveRecord,"LeaveRecord.Remark");
			this.textDays.DataBindings.Add("Text",this.DataSetLeaveRecord,"LeaveRecord.Days");			
			this.Combo_Fill();

		}

		private void lblRecord_Change()
		{
			int position=this.BindingContext[this.DataSetLeaveRecord,"LeaveRecord"].Position+1;
			int count=this.BindingContext[this.DataSetLeaveRecord,"LeaveRecord"].Count;

⌨️ 快捷键说明

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