Example #1
0
 private static void DeleteShelter(int shelterId)
 {
     try
     {
         if (shelterId > 0)
         {
             ShelterRepository.DeleteShelter(shelterId);
         }
     }
     catch (Exception e)
     {
         Logger.LogError(e, "Error while deleting shelter from Supervisor zone");
     }
 }
Example #2
0
        /// <summary>
        ///     Delete row from grid.
        /// </summary>
        public ActionResult DeleteGridForShelters([ModelBinder(typeof(DevExpressEditorsBinder))] int shelterId)
        {
            try
            {
                if (shelterId > 0)
                {
                    ShelterRepository.DeleteShelter(shelterId);
                }
            }
            catch (Exception exc)
            {
                TempData["DeleteErrorMsg"] = exc.Message;
                Logger.LogError(exc, "Error while deleting shelter from Supervisor zone");
            }

            return(PartialView("Grid/_GridForShelters", ShelterRepository.Shelters));
        }