public ActionResult Delete(Guid id) { try { string paymentMethodId = string.Empty; paymentMethodId = paymentMethodRepository.DeletePaymentMethod(id, LogInManager.LoggedInUserId); if (!string.IsNullOrWhiteSpace(paymentMethodId)) { return(Json(new { IsSuccess = true, data = new { PaymentMethodId = paymentMethodId } }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { IsSuccess = false, errorMessage = "Payment Method details not deleted successfully." }, JsonRequestBehavior.AllowGet)); } } catch (Exception e) { Utility.Utility.LogError(e, "Delete"); return(Json(new { IsSuccess = false, errorMessage = e.Message })); } }
public bool DeletePaymentMethod(long paymentMethodId) { try { return(_paymentMethodRepository.DeletePaymentMethod(paymentMethodId)); } catch (Exception ex) { ErrorLogger.LogError(ex.StackTrace, ex.Source, ex.Message); return(false); } }