public JsonResult tabAccidents() { Repositories_Accidents acc = new Repositories_Accidents(); return Json(new { proc_Accidents = acc.GetJSON_proc_Accidents(), tblAccidents = acc.GetJSON_tblAccidents(), proc_Drivers = acc.GetJSON_proc_Drivers(false), tblAccidentsTypes = acc.GetJSON_tblAccidentTypes(), tblClaimTypes = acc.GetJSON_tblClaimTypes(), proc_Vehicles = acc.GetJSON_proc_Vehicles(false), proc_InsPolicies = acc.GetJSON_proc_InsPolicies(false), tblInsurers = acc.GetJSON_tblInsurers(), tblVehicleMakes = acc.GetJSON_tblVehicleMakes(), tblClaims = acc.GetJSON_tblClaims() }); }
public JsonResult GetAccident(int? AccidentNo) { Repositories_Accidents AccRep = new Repositories_Accidents(); string View = ""; int AccNo = (AccidentNo.HasValue) ? AccidentNo.Value : 0; clsAccident a = new clsAccident(AccNo); View = RenderPartialViewToString("Card", a); //if (AccidentNo == 0) { }//new { NewRec = NewRec } //else { // View = RenderPartialViewToString("Card", a); //} return Json(new { //Render - pirmas, ExecFn - paskutinis Render = new { tabAccidents = View }, tblAccidentsTypes = AccRep.GetJSON_tblAccidentTypes(), proc_Drivers = AccRep.GetJSON_proc_Drivers(false), ExecFn = new { tabAccidents = "tabs" } }); }