public ActionResult Edit(int?id = null)
 {
     if (id.HasValue)
     {
         CodexTab tab = _uow.GetRepo <CodexTabRepository>().GetByID(id.Value);
         return(View(tab));
     }
     return(View());
 }
 public ActionResult Edit(CodexTab model)
 {
     if (ModelState.IsValid)
     {
         if (model.ID == 0)
         {
             _uow.GetRepo <CodexTabRepository>().Add(model);
             TempData["message"] = "Added New Codex Tab";
         }
         else
         {
             _uow.GetRepo <CodexTabRepository>().Update(model);
             TempData["message"] = "Updated Codex Tab";
         }
         return(RedirectToAction("Index"));
     }
     return(View(model));
 }
예제 #3
0
 public void Load(CodexTab codexTab)
 {
     codexTab.ItemCategory_Objects = uow.GetRepo <ItemCategoryRepository>().GetByCodexTabID(codexTab.ID);
 }