☆☆ 资源说明:☆☆
☆ 系统功能:☆
灵活的录入数据,使信息传递更快捷;
系统采用人机对话方式,界面美观友好,信息查询灵活、方便,数据存储安全可靠;
实现员工奖罚信息管理;
实现员工工资自动计算;
实现员工考评调动管理;
对用户输入的数据,进行严格的数据检验,尽可能避免人为错误;
系统最大限度地实现了易安装性、易维护性和易操作性;
代码片段和文件信息
using System;
using System.Windows.Forms;
using PMS.PMSClass;
namespace PMS
{
public partial class frmAddDep : Form
{
private readonly DBOperate operate = new DBOperate();
public frmAddDep()
{
InitializeComponent();
}
private void button2_Click(object sender EventArgs e)
{
Close();
}
private void button1_Click(object sender EventArgs e)
{
if (txtDepName.Text.Trim() == ““)
{
MessageBox.Show(“请输入部门名称“ “提示“ MessageBoxButtons.OK MessageBoxIcon.Information);
return;
}
else
{
string str = “select count(*) from tb_department where DepName=‘“ + txtDepName.Text.Trim() + “‘“;
int i = operate.HumanNum(str);
if (i > 0)
{
MessageBox.Show(“该部门已经存在“ “提示“ MessageBoxButtons.OK MessageBoxIcon.Information);
return;
}
else
{
string Addsql = “insert into tb_department(DepName) values(‘“ + txtDepName.Text.Trim() + “‘)“;
if (operate.OperateData(Addsql) > 0)
{
MessageBox.Show(“添加成功“ “提示“ MessageBoxButtons.OK MessageBoxIcon.Information);
}
}
}
}
private void frmAddDep_Load(object sender EventArgs e)
{
}
}
}
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)