📄 vacationmanagement.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 BlueHill_Win_
{
public partial class VacationManagement : Form
{
public VacationManagement()
{
InitializeComponent();
}
private void btnOK_Click(object sender, EventArgs e)
{
//this.Hide();
//Main M = new Main();
//M.Show();
this.Close();
}
private void btnDeleteVacation_Click(object sender, EventArgs e)
{
string ss = grdLeaveList[grdLeaveList.CurrentCell].ToString();
SqlConnection con = DB.connection();
con.Open();
SqlCommand cmd = new SqlCommand("delete from 员工请假表 where 请假申请编号='" + ss + "'", con);
int count = Convert.ToInt32(cmd.ExecuteNonQuery());
if (count > 0)
{
DialogResult = MessageBox.Show("删除成功!", "提示");
//grdEmployee.EditItemIndex = -1;
this.Hide();
VacationManagement VM = new VacationManagement();
VM.Show();
}
else
DialogResult = MessageBox.Show("操作失败!", "提示");
con.Close();
}
private void btnCancelVacation_Click(object sender, EventArgs e)
{
}
private void btnByGroup_Click(object sender, EventArgs e)
{
}
private void btnQueryEmp_Click(object sender, EventArgs e)
{
}
private void BtnVacationSetting_Click(object sender, EventArgs e)
{
this.Hide();
VacationSetting VS = new VacationSetting();
VS.Show();
}
private void VacationManagement_Load(object sender, EventArgs e)
{
// TODO: 这行代码将数据加载到表“blueHillManagementDataSet2.员工请假表”中。您可以根据需要移动或移除它。
this.员工请假表TableAdapter.Fill(this.blueHillManagementDataSet2.员工请假表);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -