public dynamic GetInfoDetail(int Id) { PaymentVoucherDetail model = new PaymentVoucherDetail(); try { model = _paymentVoucherDetailService.GetObjectById(Id); } catch (Exception ex) { LOG.Error("GetInfo", ex); Dictionary <string, string> Errors = new Dictionary <string, string>(); Errors.Add("Generic", "Error " + ex); return(Json(new { Errors }, JsonRequestBehavior.AllowGet)); } return(Json(new { model.Id, model.Code, model.PayableId, Payable = _payableService.GetObjectById(model.PayableId).Code, model.Amount, model.Description, model.Errors }, JsonRequestBehavior.AllowGet)); }