public ActionResult Edit(int id, OperationTheatreDetailsModel model)
 {
     try
     {
         // TODO: Add update logic here
         if (ModelState.IsValid)
         {
             pro.Update(model);
             return(RedirectToAction("Index"));
         }
         else
         {
             return(View(model));
         }
     }
     catch
     {
         return(View());
     }
 }
Beispiel #2
0
        public ActionResult EidtTheatreDetails(int id, OperationTheatreDetailsModel model)
        {
            OperationTheatreDetailsProvider pro1 = new OperationTheatreDetailsProvider();

            try
            {
                if (ModelState.IsValid)
                {
                    int i = pro1.Update(model);
                    //List<OperationTheatreDetailsModel> TheatreDetailsList = new List<OperationTheatreDetailsModel>();
                    //TheatreDetailsList = pro.GetTheatreDetailsList(model.OperationTheatreMasterID);
                    TempData["message"] = "Successfully Updated!";
                    return(RedirectToAction("Details/" + i));
                }
                else
                {
                    return(View(model));
                }
            }
            catch
            {
                return(View());
            }
        }