public ActionResult Details(long id) { var result = bLCaseDetails.GetCaseDetailById(id); if (result != null) { result.Age = Common.CalculateAge(result.DOB); } if (result == null) { result = new BLCaseDetails(); } ViewBag.CaseId = id; return(View(result)); }
// GET: Document public ActionResult Index(long id) { var userId = User.Identity.GetUserId(); BLDocumentViewModal modal = new BLDocumentViewModal(); var result = bLCaseDetails.GetCaseDetailById(id); if (result != null) { result.Age = Common.CalculateAge(result.DOB); } if (result == null) { result = new BLCaseDetails(); } ViewBag.CaseId = id; modal.CaseID = id; modal.CaseNumber = result.CaseNumber; modal.bLDocuments = documents.GetAll(userId); return(View(modal)); }