📄 addzhiwei_form.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using BusinessLayer;
using Entity;
namespace rsMange
{
public partial class AddZhiWei_Form : Form
{
Operate_zhiweiTable op_zhiwei = new Operate_zhiweiTable();
Zhiwei zw = null;
public AddZhiWei_Form()
{
InitializeComponent();
}
public AddZhiWei_Form(Zhiwei zw)
{
InitializeComponent();
this.Text = "修改职位";
this.label2.Text = "新职位名称:";
this.txtZhiWei.Text = zw.ZhiWei;
this.zw = zw;
}
private void btnSave_Click(object sender, EventArgs e)
{
if (this.Text != "修改职位")
{
string Zhiwei = this.txtZhiWei.Text.Trim();
int c = op_zhiwei.InsertZhiWei(Zhiwei);
if (c > 0)
{
MessageBox.Show("添加成功!", "提示信息");
this.Close();
}
else
MessageBox.Show("添加失败!", "提示信息");
}
else
{
zw.ZhiWei = this.txtZhiWei.Text.Trim();
int c = op_zhiwei.UpdateZhiwei(zw);
if (c > 0)
{
MessageBox.Show("修改成功!", "提示信息");
this.Close();
}
else
MessageBox.Show("修改失败!", "提示信息");
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void AddZhiWei_Form_Load(object sender, EventArgs e)
{
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -