Пример #1
0
        public ActionResult SalesOnlineItemsGridViewPartialDelete(System.Int32 ID)
        {
            var model = SalesOnlineItemsList.GetData();

            if (ID >= 0)
            {
                try
                {
                    SalesOnlineItemsList.DeleteItem(ID);
                }
                catch (Exception e)
                {
                    ViewData["EditError"] = e.Message;
                }
            }
            return(PartialView("_SalesOnlineItemsGridViewPartial", model));
        }
Пример #2
0
        public ActionResult SalesOnlineItemsGridViewPartialUpdate(MVC.Areas.Sell.Models.APISalesOnlineItems item)
        {
            var model = SalesOnlineItemsList.GetData();

            if (ModelState.IsValid)
            {
                try
                {
                    SalesOnlineItemsList.UpdateItem(item);
                }
                catch (Exception e)
                {
                    ViewData["EditError"] = e.Message;
                }
            }
            else
            {
                ViewData["EditError"] = "Please, correct all errors.";
            }
            return(PartialView("_SalesOnlineItemsGridViewPartial", model));
        }
Пример #3
0
        public ActionResult SalesOnlineItemsGridViewPartial()
        {
            var model = SalesOnlineItemsList.GetData();

            return(PartialView("_SalesOnlineItemsGridViewPartial", model));
        }