Beispiel #1
0
 public ActionResult Edit(long id)
 {
     try
     {
         ViewBag.ActiveURL = "/Admin/packagelist";
         PackageSaveModel model = new PackageSaveModel();
         model.PackageType = objAPI.GetObjectByKey <utblMstPackageType>("configuration", "packagetypebyid", id.ToString(), "PackageTypeID");
         return(View(model));
     }
     catch (AuthorizationException)
     {
         TempData["ErrMsg"] = "Your Login Session has expired. Please Login Again";
         return(RedirectToAction("Login", "Account", new { Area = "" }));
     }
 }
Beispiel #2
0
 public ActionResult Edit(PackageSaveModel model)
 {
     try
     {
         ViewBag.ActiveURL = "/Admin/packagelist";
         if (ModelState.IsValid)
         {
             string jsonStr = JsonConvert.SerializeObject(model.PackageType);
             TempData["ErrMsg"] = objAPI.PostRecordtoApI("configuration", "savepackagetype", jsonStr);
             return(RedirectToAction("packagelist", "Package", new { Area = "Admin" }));
         }
         return(View(model));
     }
     catch (AuthorizationException)
     {
         TempData["ErrMsg"] = "Your Login Session has expired. Please Login Again";
         return(RedirectToAction("Login", "Account", new { Area = "" }));
     }
 }