internal Models.DriverBus.getBusOfDriverResp getBusOfDriver(Models.DriverBus.getBusOfDriverReq req) { Models.DriverBus.getBusOfDriverResp rsp = new Models.DriverBus.getBusOfDriverResp(); ITDriver_Bus driverBus = _storage.getBusOfDriver(req.nEntityId); rsp.apiError = new APIErrors(); //Added Entity if (driverBus != null && driverBus.n > 0) { rsp.apiError = ApiError_defs.ok; ITBus bus = _storage.GetBusById(driverBus.nBusFK); rsp.nDriverBusId = driverBus.n; rsp.sRegNo = bus.sRegNo; } else { rsp.apiError = ApiError_defs.err_Invalid_Request; rsp.apiError.sErrorMessage = "Unable to get bus"; } return(rsp); }
public object getBusOfDriver([FromBody] Models.DriverBus.getBusOfDriverReq req) { Bllfiles.BLL_Mapping bllentity = new Bllfiles.BLL_Mapping(); Models.DriverBus.getBusOfDriverResp resp = bllentity.getBusOfDriver(req); return(resp); }