예제 #1
0
 public RequirementSubTypeController(
     IRequirementSubTypeService service,
     IRequirementTypeService type) : base(service)
 {
     this.service = service;
     ViewData.Add("RequirementTypeID", new SelectList(type.getAll(), "RequirementTypeID", "description"));
 }
예제 #2
0
        public RequirementTemplateController
            (IRequirementTemplateService service, IUserService userService, IRequirementTypeService type) : base(service)
        {
            this.service = service;

            Mapper.Initialize(cfg =>
            {
                cfg.CreateAutomaticMapping <RequirementTemplateViewModel, RequirementTemplateEntity>();
                cfg.CreateAutomaticMapping <RequirementTemplateEntity, RequirementTemplateViewModel>();
            });

            ViewData.Add("CreationUserID", new SelectList(userService.getAll(), "UserID", "DisplayName"));
            ViewData.Add("RequirementTypeID", new SelectList(type.getAll(), "RequirementTypeID", "description"));
        }