Beispiel #1
0
        public ActionResult MasterGridViewPartialDelete(System.Guid Id_Master)
        {
            var model = MasterList.GetData();

            if (Id_Master != null)
            {
                try
                {
                    MasterList.DeleteItem(Id_Master);
                    // Insert here a code to delete the item from your model
                }
                catch (Exception e)
                {
                    ViewData["EditError"] = e.Message;
                }
            }
            return(PartialView("_MasterGridViewPartial", model));
        }
Beispiel #2
0
        public ActionResult MasterGridViewPartialUpdate(dnGroupMVC01.Areas.DemoClientSideShowHide.Models.Master item)
        {
            var model = MasterList.GetData();

            if (ModelState.IsValid)
            {
                try
                {
                    MasterList.UpdateItem(item);
                    // Insert here a code to update the item in your model
                }
                catch (Exception e)
                {
                    ViewData["EditError"] = e.Message;
                }
            }
            else
            {
                ViewData["EditError"] = "Please, correct all errors.";
            }
            return(PartialView("_MasterGridViewPartial", model));
        }
Beispiel #3
0
        public ActionResult MasterGridViewPartial()
        {
            var model = MasterList.GetData();

            return(PartialView("_MasterGridViewPartial", model));
        }
Beispiel #4
0
 // GET: DemoClientSideShowHide/Demo1
 public ActionResult Index()
 {
     ViewData["CategoryList"] = MasterList.GetData();
     ViewData["ProductList"]  = DetailList.GetData();
     return(View());
 }