Example #1
0
        /// <summary>
        ///     Delete row of grid.
        /// </summary>
        public ActionResult DeleteGridForShelterItems([ModelBinder(typeof(DevExpressEditorsBinder))] SheltersDescInfo model, [ModelBinder(typeof(DevExpressEditorsBinder))] int shelterId)
        {
            ViewData["ShelterId"] = shelterId;
            try
            {
                ShelterRepository.DeleteShelterItem(model);
            }
            catch (Exception exc)
            {
                TempData["DeleteErrorMsg"] = exc.Message;
                Logger.LogError(exc, "Error while deleting shelter's items from Supervisor zone");
            }

            return(PartialView("Grid/_GridForShelterItems", GetShelterItems(shelterId)));
        }