/// <summary> /// 根据id获取岗位字典 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void client_GetPostDictionaryByIdCompleted(object sender, GetPostDictionaryByIdCompletedEventArgs e) { if (e.Error != null && e.Error.Message != "") { RefreshUI(RefreshedTypes.HideProgressBar); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } else { if (e.Result == null) { RefreshUI(RefreshedTypes.HideProgressBar); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTFOUND"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); return; } PostDictionary = e.Result; if (PostDictionary.CHECKSTATE == Convert.ToInt32(CheckStates.Approving).ToString() || PostDictionary.CHECKSTATE == Convert.ToInt32(CheckStates.Approved).ToString()) { SetOnlyBrowse(); } else if (FormType == FormTypes.Resubmit) { PostDictionary.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString(); PostDictionary.EDITSTATE = Convert.ToInt32(EditStates.UnActived).ToString(); acbDepName.IsEnabled = false; } if (PostDictionary.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString()) { EnableControl(); } if (PostDictionary.CHECKSTATE == Convert.ToInt32(CheckStates.Approved).ToString() || PostDictionary.CHECKSTATE == Convert.ToInt32(CheckStates.UnApproved).ToString()) { RefreshUI(RefreshedTypes.AuditInfo); SetToolBar(); } else { System.Collections.ObjectModel.ObservableCollection <string> CreateUserIDs = new System.Collections.ObjectModel.ObservableCollection <string>(); CreateUserIDs.Add(PostDictionary.CREATEUSERID); personClient.GetEmployeeToEngineAsync(CreateUserIDs); } client.GetDepartmentDictionaryAllAsync(); } }
/// <summary> /// 根据id获取岗位字典 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void client_GetPostDictionaryByIdCompleted(object sender, GetPostDictionaryByIdCompletedEventArgs e) { if (e.Error != null && e.Error.Message != "") { RefreshUI(RefreshedTypes.HideProgressBar); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } else { if (e.Result == null) { RefreshUI(RefreshedTypes.HideProgressBar); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTFOUND"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); return; } PostDictionary = e.Result; if (PostDictionary.CHECKSTATE == Convert.ToInt32(CheckStates.Approving).ToString() || PostDictionary.CHECKSTATE == Convert.ToInt32(CheckStates.Approved).ToString()) { SetOnlyBrowse(); } else if (FormType == FormTypes.Resubmit) { PostDictionary.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString(); PostDictionary.EDITSTATE = Convert.ToInt32(EditStates.UnActived).ToString(); acbDepName.IsEnabled = false; } if (PostDictionary.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString()) { EnableControl(); } if (PostDictionary.CHECKSTATE == Convert.ToInt32(CheckStates.Approved).ToString() || PostDictionary.CHECKSTATE == Convert.ToInt32(CheckStates.UnApproved).ToString()) { RefreshUI(RefreshedTypes.AuditInfo); SetToolBar(); } else { System.Collections.ObjectModel.ObservableCollection<string> CreateUserIDs = new System.Collections.ObjectModel.ObservableCollection<string>(); CreateUserIDs.Add(PostDictionary.CREATEUSERID); personClient.GetEmployeeToEngineAsync(CreateUserIDs); } client.GetDepartmentDictionaryAllAsync(); } }