Exemplo n.º 1
0
        public ActionResult Create(Powerbi powerbi)
        {
            if (ModelState.IsValid)
            {
                db.Frames.Add(powerbi);
                db.SaveChanges();

                return this.RestoreReferrer() ?? RedirectToAction("Index", "Frame");
            }

            this.FillTemplatesSelectList(db, FrameTypes.Powerbi, powerbi.TemplateId);
            FillTypesSelectList(powerbi.Type);
            FillAccountsSelectList(powerbi.AccountId);
            

            return View(powerbi);
        }
Exemplo n.º 2
0
        // GET: /Powerbi/Create
        public ActionResult Create()
        {
            Frame frame = TempData[FrameController.SelectorFrameKey] as Frame;

            if (frame == null || frame.PanelId == 0)
            {
                return RedirectToAction("Create", "Frame");
            }

            Powerbi powerbi = new Powerbi(frame, db);

            this.FillTemplatesSelectList(db, FrameTypes.Powerbi);
            FillTypesSelectList();
            FillAccountsSelectList();
            

            return View(powerbi);
        }