public dynamic UnConfirm(PaymentRequest model) { try { if (!AuthenticationModel.IsAllowed("UnConfirm", Core.Constants.Constant.MenuName.PaymentRequest, Core.Constants.Constant.MenuGroupName.Master)) { Dictionary <string, string> Errors = new Dictionary <string, string>(); Errors.Add("Generic", "You are Not Allowed to Add record"); return(Json(new { Errors }, JsonRequestBehavior.AllowGet)); } var data = _paymentRequestService.GetObjectById(model.Id); model = _paymentRequestService.UnconfirmObject(data, _paymentVoucherDetailService, _payableService); } catch (Exception ex) { LOG.Error("Unconfirm Failed", ex); Dictionary <string, string> Errors = new Dictionary <string, string>(); Errors.Add("Generic", "Error " + ex); return(Json(new { Errors }, JsonRequestBehavior.AllowGet)); } return(Json(new { model.Errors })); }