📄 formattendancemanagement.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;
namespace HumanResourceManagement
{
public partial class FormAttendanceManagement : Form
{
SqlConnection cnBlueHill_HRM;
DataSet dt1;
SqlDataAdapter dt2;
public FormAttendanceManagement()
{
InitializeComponent();
}
private const int CP_NOCLOSE_BUTTON = 0x200;
protected override CreateParams CreateParams
{
get
{
CreateParams myCp = base.CreateParams;
myCp.ClassStyle = myCp.ClassStyle | CP_NOCLOSE_BUTTON;
return myCp;
}
}
private void btnOK_Click(object sender, EventArgs e)
{
Main M = new Main();
M.Show();
this.Hide();
}
private void btnToday_Click(object sender, EventArgs e)
{
cnBlueHill_HRM = new SqlConnection("Data Source=.;Initial Catalog=BlueHill_HRM;integrated security=true;");
dt1 = new DataSet();
dt2 = new SqlDataAdapter();
SqlCommand cmSelect = new SqlCommand();
cmSelect.Connection = cnBlueHill_HRM;
cmSelect.CommandText = "select * from tblAttendance";
dt2.SelectCommand = cmSelect;
dt2.Fill(dt1, "Customers");
grdAttendance.DataSource = dt1.Tables["Customers"];
}
private void btnHistory_Click(object sender, EventArgs e)
{
FormhistoryQuery FHQ = new FormhistoryQuery();
FHQ.Show();
this.Hide();
}
private void btnSetting_Click(object sender, EventArgs e)
{
FormAttendanceSetting FAS = new FormAttendanceSetting();
FAS.Show();
this.Hide();
}
private void button4_Click(object sender, EventArgs e)
{
FormImport FI = new FormImport();
FI.Show();
this.Hide();
}
private void FormAttendanceManagement_Load(object sender, EventArgs e)
{
cnBlueHill_HRM = new SqlConnection("Data Source=.;Initial Catalog=BlueHill_HRM;integrated security=true;");
dt1 = new DataSet();
dt2 = new SqlDataAdapter();
SqlCommand cmSelect = new SqlCommand();
cmSelect.Connection = cnBlueHill_HRM;
cmSelect.CommandText = "select * from tblAttendance";
dt2.SelectCommand = cmSelect;
dt2.Fill(dt1, "Customers");
grdAttendance.DataSource = dt1.Tables["Customers"];
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -