/// <summary> /// 新增人员管理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_add_Click(object sender, EventArgs e) { FrmUser frmU = new FrmUser(); frmU.operationType = Common.Enum.OperationType.Add; if (frmU.ShowDialog() == DialogResult.OK) { Query(); new PubUtils().ShowNoteOKMsg("新增成功"); } }
/// <summary> /// 修改人员管理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_edit_Click(object sender, EventArgs e) { if (dgv_user.CurrentRow == null || dgv_user.CurrentRow.Index == -1) { new PubUtils().ShowNoteNGMsg("请选中行", 1, grade.OrdinaryError); return; } FrmUser frmU = new FrmUser(); frmU.operationType = Common.Enum.OperationType.Edit; frmU.user = Common.Helper.PublicSetModel <SysDatUser> .GetTByDataGridViewRow(dgv_user.CurrentRow); frmU.Org = Common.Helper.PublicSetModel <SysdatOrg> .GetTByDataGridViewRow(dgv_user.CurrentRow); if (frmU.ShowDialog() == DialogResult.OK) { Query(); new PubUtils().ShowNoteOKMsg("新增成功"); } }