internal Models.busLocationModel.AddBusLocationResp AddBusLocation(Models.busLocationModel.AddBusLocationReq req)
        {
            Models.busLocationModel.AddBusLocationResp rsp = new Models.busLocationModel.AddBusLocationResp();
            rsp.apiError = new APIErrors();
            rsp.apiError = ApiError_defs.err_Invalid_Request;
            ITBusLocation busL = _storage.AddBusLocation(req.nBusFK, req.rLat, req.rLong);

            if (busL != null && busL.n > 0)
            {
                // rsp.n = iUser.n;   //Use if needed
                rsp.n        = busL.n;
                rsp.apiError = ApiError_defs.ok;
            }
            else
            {
                rsp.apiError.sErrorMessage = "Couldent report the bus for the location. ";
            }

            return(rsp);
        }
Beispiel #2
0
 public object AddBusLocation([FromBody] Models.busLocationModel.AddBusLocationReq req)
 {
     Bllfiles.BLL_BusLocation bgrv = new Bllfiles.BLL_BusLocation();
     Models.busLocationModel.AddBusLocationResp resp = bgrv.AddBusLocation(req);
     return(resp);
 }