Exemplo n.º 1
0
        public void Execute(object parameter)
        {
            SMT.SaaS.FrameworkUI.OrganizationControl.OrganizationLookupAll lookup = new SMT.SaaS.FrameworkUI.OrganizationControl.OrganizationLookupAll();
            lookup.SelectedObjType = SMT.SaaS.FrameworkUI.OrgTreeItemTypes.All;
            lookup.SelectedClick += (obj, ev) =>
            {
                List<SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj> ent = lookup.SelectedObj as List<SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj>;
                if (ent != null && ent.Count > 0)
                {
                    SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj result = ent.FirstOrDefault();
                    if (result.ObjectType == SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Personnel)
                    {
                        this.ConsultationViewModel.REPLYUSERID = result.ObjectID;
                        this.ConsultationViewModel.REPLYUSERNAME = result.ObjectName;

                    }
                    else
                    {
                        this.ConsultationViewModel.REPLYUSERID = string.Empty;
                        this.ConsultationViewModel.REPLYUSERNAME = string.Empty;
                    }
                }


            };
            lookup.MultiSelected = true;
            lookup.Show();
        }
Exemplo n.º 2
0
        public void Execute(object parameter)
        {
            SMT.SaaS.FrameworkUI.OrganizationControl.OrganizationLookupAll lookup = new SMT.SaaS.FrameworkUI.OrganizationControl.OrganizationLookupAll();
            lookup.SelectedObjType = SMT.SaaS.FrameworkUI.OrgTreeItemTypes.All;
            lookup.SelectedClick += (obj, ev) =>
            {
                List<SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj> ent = lookup.SelectedObj as List<SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj>;
                if (ent != null && ent.Count > 0)
                {
                    SMT.SaaS.FrameworkUI.OrganizationControl.ExtOrgObj result = ent.FirstOrDefault();
                    if (result.ObjectType == SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Personnel)
                    {
                        this.ConsultationViewModel.REPLYUSERID = result.ObjectID;
                        this.ConsultationViewModel.REPLYUSERNAME = result.ObjectName;
                        
                    }
                    else
                    {
                        ComfirmWindow.ConfirmationBoxs("提示", "请选择有效的员工!此模式下只能勾选一个有效的员工", Utility.GetResourceStr("CONFIRM"), MessageIcon.Information);
                        this.ConsultationViewModel.REPLYUSERID = string.Empty;
                        this.ConsultationViewModel.REPLYUSERNAME = string.Empty;
                    }
                }


            };
            lookup.MultiSelected = false;
            lookup.Show();
        }