using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using UAS_MES_NEW.DataOperate; using UAS_MES_NEW.Entity; namespace UAS_MES_NEW.Employee { public partial class Employee_NewGroup : CustomControl.BaseForm.BaseForm { DataHelper dh; public Employee_NewGroup() { InitializeComponent(); } private void SaveGroup_Click(object sender, EventArgs e) { if (ug_code.Text != "" && ug_name.Text != "") { if (dh.CheckExist("cs$usergroup", "ug_code='" + ug_code.Text + "'")) MessageBox.Show("分组编号已存在"); else if (dh.CheckExist("cs$usergroup", "ug_name='" + ug_name.Text + "'")) MessageBox.Show("分组名称已存在"); else { dh.ExecuteSql("insert into cs$usergroup (ug_id,ug_code,ug_name,ug_inman,ug_indate) values(cs$usergroup_seq.nextval,'" + ug_code.Text + "','" + ug_name.Text + "','" + User.UserName + "',sysdate)", "insert"); MessageBox.Show("新增分组成功"); Close(); } } else MessageBox.Show("请填写完整信息"); } private void 新增分组_Load(object sender, EventArgs e) { dh = SystemInf.dh; } } }