Ejemplo n.º 1
0
        public static BlockViewList CreateBlockViewListFromAppUserEditView(ApplicationDbContext db, Guid appUserId, string url)
        {
            List <BlockView> userBlockListView        = BlockViewHelpers.GetBlockViewByType(db, appUserId, LevelEnum.User);
            List <BlockView> userBranchBlockListView  = BlockViewHelpers.GetBlockViewByType(db, appUserId, LevelEnum.Branch);
            List <BlockView> userCompanyBlockListView = BlockViewHelpers.GetBlockViewByType(db, appUserId, LevelEnum.Company);

            BlockViewList list = new BlockViewList()
            {
                UserBlockListView        = userBlockListView,
                UserBranchBlockListView  = userBranchBlockListView,
                UserCompanyBlockListView = userCompanyBlockListView,
                CallingUrl = url
            };

            return(list);
        }
Ejemplo n.º 2
0
        // GET: AppUsers Blocks
        public ActionResult BlockIndex(Guid appUserId, string url)
        {
            BlockViewList model = BlockViewHelpers.CreateBlockViewListFromAppUserEditView(db, appUserId, url);

            return(View(model));
        }