Esempio n. 1
0
        public static SelectList GetKppbcAll(IZaidmExKPPBCBLL kppbcBll)
        {
            IZaidmExKPPBCBLL kppbcbll = kppbcBll;
            var kppbcList             = kppbcbll.GetAll().Where(x => x.IS_DELETED != true).OrderBy(x => x.KPPBC_ID);
            var selectItemSource      = Mapper.Map <List <SelectItemModel> >(kppbcList);

            return(new SelectList(selectItemSource, "ValueField", "TextField"));
        }
        //
        // GET: /POA/
        public ActionResult Index()
        {
            var model = new KppbcIndexViewModel();

            model.MainMenu    = _mainMenu;
            model.CurrentMenu = PageInfo;

            model.Kppbcs      = Mapper.Map <List <ZAIDM_EX_KPPBCDto> >(_kppbcbll.GetAll());
            model.IsNotViewer = (CurrentUser.UserRole != Enums.UserRole.Viewer && CurrentUser.UserRole != Enums.UserRole.Controller ? true : false);
            return(View("Index", model));
        }