Ejemplo n.º 1
0
        // Get: Admin/LangManager/Create
        public ActionResult Create()
        {
            var model = new Models.LangBooksEditViewModel();

            this.StatusList(1);
            return(View(model));
        }
Ejemplo n.º 2
0
 public ActionResult Create(Models.LangBooksEditViewModel model)
 {
     if (ModelState.IsValid)
     {
         try
         {
             m_langWorker.InsertManagerLangBook(model);
             return(RedirectToAction("Index"));
         }
         catch (Exception ex)
         {
             ModelState.AddModelError("", ex.Message);
         }
     }
     this.StatusList(model.Status);
     return(View(model));
 }
Ejemplo n.º 3
0
 public ActionResult Edit(Models.LangBooksEditViewModel model)
 {
     if (ModelState.IsValid)
     {
         try
         {
             if (string.IsNullOrEmpty(model.Code))
             {
                 model.Code = "";
             }
             m_langWorker.UpdateManagerLangBook(model);
             return(RedirectToAction("Index"));
         }
         catch (Exception ex)
         {
             ModelState.AddModelError("", ex.Message);
         }
     }
     this.StatusList(model.Status);
     return(View(model));
 }