| | |
| | | int staffstatus; |
| | | public void ShowBangDingData(HStation.Vmo.EmployeeMain employee)//展示本控件数据 |
| | | { |
| | | //HStation.WinFrmUI.Organize.EmployeeViewModel _employee = new HStation.WinFrmUI.Organize.EmployeeViewModel(employee); |
| | | NametextEdit.Text = employee.FirstName;//姓名 |
| | | textEditBianHao.Text = employee.ErpCode;//编号 |
| | | ZhiWutextEdit.Text = employee.PositonName;//职务 |
| | | DianHuatextEdit.Text = employee.Telephone;//电话 |
| | | textEditQianMing.Text = employee.DrawSignal;//签名 |
| | | YouXiangtextEdit.Text = employee.Email;//邮箱 |
| | | ChongZhiimageComboBoxEdit.SelectedIndex = employee.RequirePasswordReset;//重置密码 |
| | | if (employee.StaffStatus.ToString() == "在职") |
| | | ChongZhiimageComboBoxEdit.SelectedIndex = employee.RequirePasswordReset; |
| | | if (employee.StaffStatus == Vmo.eJobType.exist) |
| | | { |
| | | staffstatus = 1; |
| | | ZhuangTaiimageComboBoxEdit.SelectedIndex = 1; |
| | | } |
| | | else |
| | | { |
| | | staffstatus = 0; |
| | | ZhuangTaiimageComboBoxEdit.SelectedIndex = 0; |
| | | } |
| | | ZhuangTaiimageComboBoxEdit.SelectedIndex = staffstatus;//在职状态 |
| | | EnglishNametextEdit.Text = employee.LastName;//姓名 英文 |
| | | } |
| | | |
| | |
| | | employee.FirstName = NametextEdit.Text; |
| | | employee.ErpCode = textEditBianHao.Text; |
| | | employee.PositonName = ZhiWutextEdit.Text; |
| | | employee.EmployeeID = _employee.EmployeeID; |
| | | employee.Telephone = DianHuatextEdit.Text; |
| | | employee.DrawSignal = textEditQianMing.Text; |
| | | employee.Email = YouXiangtextEdit.Text; |
| | |
| | | return _employee; |
| | | } |
| | | //loginUserInfoCtrl.SetOffInput();//loginUserInfoCtrl控件可编辑 |
| | | if (loginUserInfoCtrl.NewBindingData(_employee.LoginAccount, out error) == null)//出现错误并返回null和错误 |
| | | if (loginUserInfoCtrl.NewBindingData(_employee.User, out error) == null)//出现错误并返回null和错误 |
| | | { |
| | | return null; |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | if (loginUserInfoCtrl.NewBindingData(_employee.LoginAccount, out error) != null)//出现错误并返回null和错误 |
| | | if (loginUserInfoCtrl.NewBindingData(_employee.User, out error) != null)//出现错误并返回null和错误 |
| | | { |
| | | return null; |
| | | } |
| | |
| | | return; |
| | | } |
| | | ShowBangDingData(employee); |
| | | if (employee.LoginAccount != null) |
| | | if (employee.User != null) |
| | | { |
| | | loginUserInfoCtrl.SetNoInput(); |
| | | checkEditCreateLogin.Visible = false; |