public JsonResult UnfundedCapitalCallBalanceReport(FormCollection collection) { UnfundedCapitalCallBalanceModel model = new UnfundedCapitalCallBalanceModel(); this.TryUpdateModel(model, collection); string error = string.Empty; ResultModel resultModel = new ResultModel(); FlexigridData flexgridData = new FlexigridData(); int pageIndex = DataTypeHelper.ToInt32(collection["pageIndex"]); int pageSize = DataTypeHelper.ToInt32(collection["pageSize"]); string sortName = collection["sortName"]; string sortOrder = collection["sortOrder"]; int totalRows = 0; if (ModelState.IsValid) { List<UnfundedCapitalCallBalanceReportDetail> unfundedCapitalCallBalances = ReportRepository.FindUnfundedCapitalCallBalanceReport(pageIndex, pageSize, sortName, sortOrder, ref totalRows, model.FundId, (model.StartDate ?? Convert.ToDateTime("01/01/1900")), (model.EndDate ?? DateTime.Now)); flexgridData.total = totalRows; flexgridData.page = 1; foreach (var unfundedCapitalCallBalance in unfundedCapitalCallBalances) { flexgridData.rows.Add(new FlexigridRow { cell = new List<object> { unfundedCapitalCallBalance.DealNo, unfundedCapitalCallBalance.FundName, unfundedCapitalCallBalance.UnfundedAmount } }); } } else { foreach (var values in ModelState.Values.ToList()) { foreach (var err in values.Errors.ToList()) { if (string.IsNullOrEmpty(err.ErrorMessage) == false) { error += err.ErrorMessage + "\n"; } } } } return Json(new { Error = error, Data = flexgridData, page = pageIndex, total = totalRows }, JsonRequestBehavior.AllowGet); }
public ActionResult UnfundedCapitalCallBalance() { ViewData["MenuName"] = "ReportManagement"; ViewData["SubmenuName"] = "UnfundedCapitalCallBalance"; UnfundedCapitalCallBalanceModel model = new UnfundedCapitalCallBalanceModel(); return View(model); }