void personclient_GetAllPostByEmployeeIDCompleted(object sender, GetAllPostByEmployeeIDCompletedEventArgs e) { if (e.Result != null) { List <SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEEPOST> dicts = e.Result.ToList(); var qUsingDicts = from d in dicts where d.CHECKSTATE == "2" && d.EDITSTATE == "1" select d; List <SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEEPOST> UsingDicts; if (qUsingDicts != null) { UsingDicts = qUsingDicts.ToList(); } else { UsingDicts = null; } //dicts[0].T_HR_EMPLOYEE.t ComboBox cbxSystemType = Utility.FindChildControl <ComboBox>(gridfirst, "cbxPosition"); cbxSystemType.ItemsSource = UsingDicts; cbxSystemType.DisplayMemberPath = "T_HR_POST.T_HR_POSTDICTIONARY.POSTNAME"; if (dicts.Count > 0) { cbxPosition.SelectedIndex = 0; SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEEPOST dict = cbxSystemType.SelectedItem as SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEEPOST; StrPositionID = dict == null ? "" : dict.T_HR_POST.POSTID.ToString(); orgclient.GetCompanyByIdAsync(tmpUser.OWNERCOMPANYID); //orgclient.GetDepartmentByIdAsync(tmpUser.OWNERDEPARTMENTID); } } //LoadData(); }
void personclient_GetAllPostByEmployeeIDCompleted(object sender, GetAllPostByEmployeeIDCompletedEventArgs e) { if (e.Result != null) { List <SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEEPOST> dicts = e.Result.ToList(); var qUsingDicts = from d in dicts where d.CHECKSTATE == "2" && d.EDITSTATE == "1" select d; List <SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEEPOST> UsingDicts; if (qUsingDicts != null) { UsingDicts = qUsingDicts.ToList(); } else { UsingDicts = null; } List <SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEEPOST> newUsingDicts = new List <Saas.Tools.PersonnelWS.T_HR_EMPLOYEEPOST>(); try { //重新岗位名称 foreach (var ent in UsingDicts) { try { if (!string.IsNullOrEmpty(ent.T_HR_POST.T_HR_DEPARTMENT.T_HR_COMPANY.BRIEFNAME)) { ent.T_HR_POST.T_HR_POSTDICTIONARY.POSTNAME = ent.T_HR_POST.T_HR_DEPARTMENT.T_HR_COMPANY.BRIEFNAME + "-" + ent.T_HR_POST.T_HR_POSTDICTIONARY.POSTNAME; } else { ent.T_HR_POST.T_HR_POSTDICTIONARY.POSTNAME = ent.T_HR_POST.T_HR_DEPARTMENT.T_HR_COMPANY.CNAME + "-" + ent.T_HR_POST.T_HR_POSTDICTIONARY.POSTNAME; } newUsingDicts.Add(ent); } catch (Exception e1) { newUsingDicts.Add(ent); } } } catch (Exception ex) { } ComboBox cbxSystemType = Utility.FindChildControl <ComboBox>(gridfirst, "cbxPosition"); cbxSystemType.ItemsSource = UsingDicts; cbxSystemType.DisplayMemberPath = "T_HR_POST.T_HR_POSTDICTIONARY.POSTNAME"; if (dicts.Count > 0) { cbxPosition.SelectedIndex = 0; SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEEPOST dict = cbxSystemType.SelectedItem as SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEEPOST; StrPositionID = dict == null ? "" : dict.T_HR_POST.POSTID.ToString(); orgclient.GetCompanyByIdAsync(tmpUser.OWNERCOMPANYID); //orgclient.GetDepartmentByIdAsync(tmpUser.OWNERDEPARTMENTID); } } //LoadData(); }
private void InitParas() { txtBalanceYear.Text = DateTime.Now.Year.ToString(); txtBalanceMonth.Text = DateTime.Now.AddMonths(-1).Month.ToString(); if (cbxkAssignedObjectType.Items == null) { return; } if (cbxkAssignedObjectType.Items.Count == 0) { return; } foreach (object obj in cbxkAssignedObjectType.Items) { T_SYS_DICTIONARY entDic = obj as T_SYS_DICTIONARY; if (string.IsNullOrEmpty(entDic.DICTIONARYID) || string.IsNullOrEmpty(entDic.DICTIONCATEGORY) || string.IsNullOrEmpty(entDic.DICTIONARYVALUE.ToString())) { continue; } if (entDic.DICTIONARYVALUE.ToString() == (Convert.ToInt32(AssignedObjectType.Company) + 1).ToString()) { cbxkAssignedObjectType.SelectedItem = obj; clientOrg.GetCompanyByIdAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID); break; } } }