/// <summary> /// 修改人员 /// </summary> public void ModifyEmployee() { try { if (this.tvDeptList1.SelectedNode.Level == 2) { if (this.neuSpread1_Sheet1.RowCount <= 0) { return; } Neusoft.HISFC.Models.Base.Department dept = this.tvDeptList1.SelectedNode.Tag as Neusoft.HISFC.Models.Base.Department; //获得当前结点科室ID string deptId = dept.ID; Neusoft.HISFC.Models.Base.Department department = departmentManager.GetDeptmentById(deptId); if (department == null) { MessageBox.Show("选择的科室信息不存在!"); return; } //获得激活行对应的人员编码 string personId = this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.ActiveRowIndex, 0].Text.Trim(); Neusoft.HISFC.Models.Base.Employee employee = personManager.GetPersonByID(personId); if (employee == null) { MessageBox.Show("选择的人员信息不存在!"); return; } ucEmployeeInfoPanel ucEmployeeInfo = new ucEmployeeInfoPanel(employee); ucEmployeeInfo.IsModify = true; //{3BAA59AB-14DE-496e-B77A-E7C298D3245B} ucEmployeeInfo.IsModifedlevelAndRemark = this.isModifedlevelAndRemark; Neusoft.FrameWork.WinForms.Classes.Function.PopForm.Text = "修改人员信息"; DialogResult dia = Neusoft.FrameWork.WinForms.Classes.Function.PopShowControl(ucEmployeeInfo); if (dia == DialogResult.OK) { //根据当前结点科室ID,获得该科室下的人员 LoadPersons(deptId); } } else { return; } } catch (Exception a) { MessageBox.Show(a.Message); } }
/// <summary> /// 添加人员 /// </summary> public void AddEmployee() { try { ucEmployeeInfoPanel employeeInfo = new ucEmployeeInfoPanel(); employeeInfo.IsModify = false; Neusoft.FrameWork.WinForms.Classes.Function.PopForm.Text = "添加人员"; DialogResult dia = Neusoft.FrameWork.WinForms.Classes.Function.PopShowControl(employeeInfo); if (dia == DialogResult.OK) { } else if (dia == DialogResult.Cancel) { if (employeeInfo.tr) { } } } catch (Exception a) { MessageBox.Show(a.Message); } }