Example #1
0
        public ActionResult Delete(Guid id)
        {
            try
            {
                string mappingId = string.Empty;

                mappingId = rateRepository.DeleteRoomTypeRateTypeMapping(id, LogInManager.LoggedInUserId);

                if (!string.IsNullOrWhiteSpace(mappingId))
                {
                    return(Json(new
                    {
                        IsSuccess = true,
                        data = new
                        {
                            MappingId = id
                        }
                    }, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json(new
                    {
                        IsSuccess = false,
                        errorMessage = "Rate not deleted successfully."
                    }, JsonRequestBehavior.AllowGet));
                }
            }
            catch (Exception e)
            {
                Utility.Utility.LogError(e, "Delete");
                return(Json(new { IsSuccess = false, errorMessage = e.Message }));
            }
        }