Esempio n. 1
0
        private void btnLookUpUserName_Click(object sender, RoutedEventArgs e)
        {
            LooKUP up = new LooKUP();

            up.SelectedClick += (obj, ev) =>
            {
                if (up.SelectList != null)
                {
                    OrgObj = up.SelectList.FirstOrDefault();
                    this.txtReceiveUser.Text = up.SelectList.FirstOrDefault().ObjectName;
                }
            };
            up.Show();
        }
Esempio n. 2
0
        private void btnLookUpPostName_Click(object sender, RoutedEventArgs e)
        {
            LooKUP up = new LooKUP();

            up.SelectedClick += (obj, ev) =>
            {
                if (up.SelectList != null)
                {
                    string postName = "";
                    if (OrgObjPost != null)
                    {
                        OrgObjPost.Clear();
                    }
                    OrgObjPost = up.SelectList;
                    foreach (var item in up.SelectList)
                    {
                        postName += item.ObjectName + ",";
                    }
                    this.txtReceivePost.Text = postName.TrimEnd(',');
                }
            };
            up.Show();
        }
Esempio n. 3
0
        private void ShowOrganization(SMT.SaaS.FrameworkUI.OrgTreeItemTypes orgTreeItemType, string nameType)
        {
            LooKUP up = new LooKUP(orgTreeItemType, "你选择的条件是:" + lookTitle);
            up.Width = 700;
            up.SelectedClick += (obj, ev) =>
            {
                if (up.SelectList != null)
                {
                    string selectid = "";
                    if (SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Company == orgTreeItemType)
                    {
                        if (nameType == "COMPANYNAME")
                        {
                            selectid = ((SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY)(up.SelectList.FirstOrDefault().ObjectInstance)).CNAME;
                        }
                        else
                        {
                            selectid = ((SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY)(up.SelectList.FirstOrDefault().ObjectInstance)).COMPANYID;
                        }
                    }
                    if (SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Department == orgTreeItemType)
                    {
                        if (nameType == "DEPARTMENTNAME")
                        {
                            selectid = ((SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT)(up.SelectList.FirstOrDefault().ObjectInstance)).T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME;
                        }
                        else
                        {
                            selectid = ((SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT)(up.SelectList.FirstOrDefault().ObjectInstance)).DEPARTMENTID;
                        }
                    }
                    if (SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Post == orgTreeItemType)
                    {
                        if (nameType == "POSTNAME")
                        {
                            selectid = ((SMT.Saas.Tools.OrganizationWS.T_HR_POST)(up.SelectList.FirstOrDefault().ObjectInstance)).T_HR_POSTDICTIONARY.POSTNAME;
                        }
                        else
                        {
                            selectid = ((SMT.Saas.Tools.OrganizationWS.T_HR_POST)(up.SelectList.FirstOrDefault().ObjectInstance)).POSTID;
                        }

                    }
                    if (SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Personnel == orgTreeItemType)
                    {
                        if (nameType == "OWNER"
                            || nameType == "CREATEUSERNAME"
                            || nameType == "OWNERNAME"
                            || nameType == "CURRENTEMPLOYEENAME"
                            || nameType == "CLAIMSWERENAME"
                            || nameType == "EMPLOYEENAME"
                            || nameType == "UPDATEUSERNAME"
                            )
                        {
                            selectid = ((SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEE)(up.SelectList.FirstOrDefault().ObjectInstance)).EMPLOYEECNAME;
                        }
                        else
                        {
                            selectid = ((SMT.Saas.Tools.PersonnelWS.T_HR_EMPLOYEE)(up.SelectList.FirstOrDefault().ObjectInstance)).EMPLOYEEID;
                        }

                    }
                    txtCompareValue.Text = selectid;
                }              
            };
            up.Show();
            return;
        }
Esempio n. 4
0
 private void btnLookUpUserName_Click(object sender, RoutedEventArgs e)
 {
     LooKUP up = new LooKUP();
     up.SelectedClick += (obj, ev) =>
         {
             if (up.SelectList != null)
             {
                 OrgObj = up.SelectList.FirstOrDefault();
                 this.txtReceiveUser.Text = up.SelectList.FirstOrDefault().ObjectName;
             }
         };
     up.Show();
 }
Esempio n. 5
0
 private void btnLookUpPostName_Click(object sender, RoutedEventArgs e)
 {
     LooKUP up = new LooKUP();
     up.SelectedClick += (obj, ev) =>
     {
         if (up.SelectList != null)
         {
             string postName = "";
             if (OrgObjPost != null)
             {
                 OrgObjPost.Clear();
             }                   
             OrgObjPost = up.SelectList;
             foreach (var item in up.SelectList)
             {
                 postName += item.ObjectName + ",";
             }
             this.txtReceivePost.Text = postName.TrimEnd(',');
         }
     };
     up.Show();
 }