/// <summary>
        /// 设置用于前端页面需要的关联数据选项
        /// </summary>
        public void SetRelevanceItems(DepartmentVM boVM)
        {
            boVM.DepartmentTypeItemCollection = PlainFacadeItemFactory <Department> .GetByEnum(boVM.DepartmentType);

            boVM.ParentDepartmentItemCollection = SelfReferentialItemFactory <Department> .GetCollection(_boRepository, true);

            boVM.OrganizationItemCollection = PlainFacadeItemFactory <Organ> .Get(_orgRepository);

            boVM.ApplicationRoleItemCollection = _GetApplicationRoleItemCollection(_roleManager.Roles.ToList());
        }
Пример #2
0
        public JobTitleVM(JobTitle bo)
        {
            this.Id          = bo.Id;
            this.Name        = bo.Name;
            this.Description = bo.Description;
            this.SortCode    = bo.SortCode;

            this.JobTitleType               = bo.JobTitleType;
            this.JobTitleTypeName           = bo.JobTitleType.ToString();
            this.JobTitleTypeItemCollection = PlainFacadeItemFactory <JobTitle> .GetByEnum(bo.JobTitleType);
        }
Пример #3
0
        public JobTitleVM(Guid boId, IEntityRepository <JobTitle> boService)
        {
            var bo = boService.GetSingle(boId);

            if (bo == null)
            {
                bo         = new JobTitle();
                this.IsNew = true;
            }
            else
            {
                this.IsNew = false;
            }

            this.Id          = bo.Id;
            this.Name        = bo.Name;
            this.Description = bo.Description;
            this.SortCode    = bo.SortCode;

            this.JobTitleType               = bo.JobTitleType;
            this.JobTitleTypeName           = bo.JobTitleType.ToString();
            this.JobTitleTypeItemCollection = PlainFacadeItemFactory <JobTitle> .GetByEnum(bo.JobTitleType);
        }
Пример #4
0
 public void SetItems()
 {
     this.JobTitleTypeItemCollection = PlainFacadeItemFactory <JobTitle> .GetByEnum(this.JobTitleType);
 }