Exemplo n.º 1
0
        private void BindAssignObjectLookup()
        {
            if (ObjectValue == null || ObjectType == -1)
            {
                lkAssignObject.DataContext = null;
                return;
            }
            switch (ObjectType + 1)
            {
            case 1:
                orgClient.GetCompanyByIdAsync(ObjectValue);
                break;

            case 2:
                orgClient.GetDepartmentByIdAsync(ObjectValue);
                break;

            case 3:
                orgClient.GetPostByIdAsync(ObjectValue);
                break;

            case 4:
                OrganizationWS.T_HR_EMPLOYEE employee = new OrganizationWS.T_HR_EMPLOYEE();
                employee.EMPLOYEEID = ObjectValue;
                //employee.EMPLOYEECNAME = "";
                lkAssignObject.DisplayMemberPath = "EMPLOYEECNAME";
                lkAssignObject.DataContext       = employee;
                break;

            default:
                lkAssignObject.DataContext = null;
                break;
            }
        }
Exemplo n.º 2
0
        private void BindAssignObjectLookup()
        {
            if (SalarySolutionAssignView == null || SalarySolutionAssignView.SalarySolutionAssign == null)
            {
                lkAssignObject.DataContext = null;
                return;
            }
            switch (SalarySolutionAssignView.SalarySolutionAssign.ASSIGNEDOBJECTTYPE)
            {
            case "1":
                OrganizationWS.T_HR_COMPANY company = new OrganizationWS.T_HR_COMPANY();
                company.CNAME     = SalarySolutionAssignView.AssignObjectName;
                company.COMPANYID = SalarySolutionAssignView.SalarySolutionAssign.ASSIGNEDOBJECTID;
                lkAssignObject.DisplayMemberPath = "CNAME";
                lkAssignObject.DataContext       = company;
                break;

            case "2":
                OrganizationWS.T_HR_DEPARTMENT depart = new OrganizationWS.T_HR_DEPARTMENT();
                depart.DEPARTMENTID = SalarySolutionAssignView.SalarySolutionAssign.ASSIGNEDOBJECTID;
                depart.T_HR_DEPARTMENTDICTIONARY = new OrganizationWS.T_HR_DEPARTMENTDICTIONARY();
                depart.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME = SalarySolutionAssignView.AssignObjectName;
                lkAssignObject.DisplayMemberPath = "T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME";
                lkAssignObject.DataContext       = depart;
                break;

            case "3":
                OrganizationWS.T_HR_POST post = new OrganizationWS.T_HR_POST();
                post.POSTID = SalarySolutionAssignView.SalarySolutionAssign.ASSIGNEDOBJECTID;
                post.T_HR_POSTDICTIONARY          = new OrganizationWS.T_HR_POSTDICTIONARY();
                post.T_HR_POSTDICTIONARY.POSTNAME = SalarySolutionAssignView.AssignObjectName;
                lkAssignObject.DisplayMemberPath  = "T_HR_POSTDICTIONARY.POSTNAME";
                lkAssignObject.DataContext        = post;
                break;

            case "4":
                OrganizationWS.T_HR_EMPLOYEE employee = new OrganizationWS.T_HR_EMPLOYEE();
                employee.EMPLOYEEID              = SalarySolutionAssignView.SalarySolutionAssign.ASSIGNEDOBJECTID;
                employee.EMPLOYEECNAME           = SalarySolutionAssignView.AssignObjectName;
                lkAssignObject.DisplayMemberPath = "EMPLOYEECNAME";
                lkAssignObject.DataContext       = employee;
                break;

            default:
                lkAssignObject.DataContext = null;
                break;
            }
        }
Exemplo n.º 3
0
        private void BindAssignObjectLookup()
        {
            if (SalarySolutionAssignView == null || SalarySolutionAssignView.SalarySolutionAssign == null)
            {
                lkAssignObject.DataContext = null;
                return;

            }
            switch (SalarySolutionAssignView.SalarySolutionAssign.ASSIGNEDOBJECTTYPE)
            {
                case "1":
                    OrganizationWS.T_HR_COMPANY company = new OrganizationWS.T_HR_COMPANY();
                    company.CNAME = SalarySolutionAssignView.AssignObjectName;
                    company.COMPANYID = SalarySolutionAssignView.SalarySolutionAssign.ASSIGNEDOBJECTID;
                    lkAssignObject.DisplayMemberPath = "CNAME";
                    lkAssignObject.DataContext = company;
                    break;

                case "2":
                    OrganizationWS.T_HR_DEPARTMENT depart = new OrganizationWS.T_HR_DEPARTMENT();
                    depart.DEPARTMENTID = SalarySolutionAssignView.SalarySolutionAssign.ASSIGNEDOBJECTID;
                    depart.T_HR_DEPARTMENTDICTIONARY = new OrganizationWS.T_HR_DEPARTMENTDICTIONARY();
                    depart.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME = SalarySolutionAssignView.AssignObjectName;
                    lkAssignObject.DisplayMemberPath = "T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME";
                    lkAssignObject.DataContext = depart;
                    break;

                case "3":
                    OrganizationWS.T_HR_POST post = new OrganizationWS.T_HR_POST();
                    post.POSTID = SalarySolutionAssignView.SalarySolutionAssign.ASSIGNEDOBJECTID;
                    post.T_HR_POSTDICTIONARY = new OrganizationWS.T_HR_POSTDICTIONARY();
                    post.T_HR_POSTDICTIONARY.POSTNAME = SalarySolutionAssignView.AssignObjectName;
                    lkAssignObject.DisplayMemberPath = "T_HR_POSTDICTIONARY.POSTNAME";
                    lkAssignObject.DataContext = post;
                    break;

                case "4":
                    OrganizationWS.T_HR_EMPLOYEE employee = new OrganizationWS.T_HR_EMPLOYEE();
                    employee.EMPLOYEEID = SalarySolutionAssignView.SalarySolutionAssign.ASSIGNEDOBJECTID;
                    employee.EMPLOYEECNAME = SalarySolutionAssignView.AssignObjectName;
                    lkAssignObject.DisplayMemberPath = "EMPLOYEECNAME";
                    lkAssignObject.DataContext = employee;
                    break;

                default:
                    lkAssignObject.DataContext = null;
                    break;
            }

        }
Exemplo n.º 4
0
        private void BindAssignObjectLookup()
        {
            if (ObjectValue == null || ObjectType == -1)
            {
                lkAssignObject.DataContext = null;
                return;
            }
            switch (ObjectType + 1)
            {
                case 1:
                    orgClient.GetCompanyByIdAsync(ObjectValue);
                    break;

                case 2:
                    orgClient.GetDepartmentByIdAsync(ObjectValue);
                    break;

                case 3:
                    orgClient.GetPostByIdAsync(ObjectValue);
                    break;

                case 4:
                    OrganizationWS.T_HR_EMPLOYEE employee = new OrganizationWS.T_HR_EMPLOYEE();
                    employee.EMPLOYEEID = ObjectValue;
                    //employee.EMPLOYEECNAME = "";
                    lkAssignObject.DisplayMemberPath = "EMPLOYEECNAME";
                    lkAssignObject.DataContext = employee;
                    break;

                default:
                    lkAssignObject.DataContext = null;
                    break;
            }

        }