CheckForm.cs
(开头部分) 12KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
//文件名:CheckForm.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using Microsoft.Office.Interop.Excel;
using System.Reflection;
using Microsoft.Office.Core;
namespace MyPersonnel
{
public partial class CheckForm : Form
{
public CheckForm()
{
InitializeComponent();
}
public string MyCompany;
private void 考勤记录BindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
this.Validate();
this.考勤记录BindingSource.EndEdit();
this.考勤记录TableAdapter.Update(this.myPersonnelDataSet.考勤记录);
}
private void CheckForm_Load(object sender, EventArgs e)
{
// TODO: 这行代码将数据加载到表“myPersonnelDataSet.考勤记录”中。您可以根据需要移动或移除它。
this.考勤记录TableAdapter.Fill(this.myPersonnelDataSet.考勤记录);
this.myPersonnelDataSet.考勤记录.Rows.Clear();
for (int i = 2006; i < 2100; i++)
{
this.考勤年份ToolStripComboBox.Items.Add(i.ToString());
}
for (int i = 1; i < 13; i++)
{
this.月份ToolStripComboBox.Items.Add(i.ToString());
}
//获取公司的部门信息
String MySQLConnectionString = global::MyPersonnel.Properties.Settings.Default.MyPersonnelConnectionString;
SqlConnection MyConnection = new SqlConnection(MySQLConnectionString);
MyConnection.Open();
System.Data.DataTable MyDepartmentTable = new System.Data.DataTable();
string MySQL = "Select 部门名称 From 公司部门";
SqlDataAdapter MyAdapter = new SqlDataAdapter(MySQL, MyConnection);
MyAdapter.Fill(MyDepartmentTable);
foreach(DataRow MyRow in MyDepartmentTable.Rows)
{
this.部门ToolStripComboBox.Items.Add(MyRow[0].ToString());
}
if (MyConnection.State == ConnectionState.Open)
{
MyConnection.Close();
}
}
后面还有 211 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
