Ejemplo n.º 1
0
 public JsonResult DealDetailReport(FormCollection collection)
 {
     DealDetailModel model = new DealDetailModel();
     this.TryUpdateModel(model, collection);
     string error = string.Empty;
     ResultModel resultModel = new ResultModel();
     DealDetailReportModel dealReportDetail = null;
     if (ModelState.IsValid) {
         dealReportDetail = ReportRepository.FindDealDetailReport(model.DealId);
     }
     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 = dealReportDetail }, JsonRequestBehavior.AllowGet);
 }
Ejemplo n.º 2
0
 public ActionResult DealDetail()
 {
     ViewData["MenuName"] = "ReportManagement";
     ViewData["SubmenuName"] = "DealDetail";
     DealDetailModel model = new DealDetailModel();
     return View(model);
 }