Beispiel #1
0
        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();
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
        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();
        }
 void client_GetAllPostByEmployeeIDCompleted(object sender, GetAllPostByEmployeeIDCompletedEventArgs e)
 {
     if (e.Error != null && e.Error.Message != "")
     {
     }
     else
     {
         EmployeePost = e.Result.Where(t => t.T_HR_POST.POSTID == LeftOfficeConfirm.OWNERPOSTID).FirstOrDefault();
     }
 }
Beispiel #5
0
        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();
        }
 /// <summary>
 ///     Added by 罗捷
 ///     根据员工ID获取所有的Post,并赋值给RepeatPostChecker
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">AllPost</param>
 void client_GetAllPostByEmployeeIdCompeted(object sender, GetAllPostByEmployeeIDCompletedEventArgs e)
 {
     RefreshUI(RefreshedTypes.HideProgressBar);
     if (e.Error != null)
     {
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
     }
     else
     {
         RepeatPostChecker = new List<T_HR_EMPLOYEEPOST>();
         if (e.Result.Count() > 0)
         {                 
             RepeatPostChecker = e.Result.ToList();
         }
         else
         {
             RepeatPostChecker = null;
         }
     }
 }