コード例 #1
0
        internal Models.DriverBus.editBusDriverresp editBusDriver(Models.DriverBus.editBusDriverreq req)
        {
            Models.DriverBus.editBusDriverresp rsp = new Models.DriverBus.editBusDriverresp();
            ITDriver_Bus driverBus = _storage.GetDriverBusbyId(req.DriverBusId);

            rsp.apiError = new APIErrors();
            ITDriver_Bus driverBus1 = _storage.editBusDriver(driverBus, req.nEntityId, req.nBusFK, req.bStatus);

            //Added Entity
            if (driverBus1 != null && driverBus1.n > 0 && driverBus1.nBusFK == req.nBusFK && driverBus1.nEntityFKDrvier == req.nEntityId)
            {
                rsp.apiError  = ApiError_defs.ok;
                rsp.nEntityId = driverBus1.nEntityFKDrvier;
                ITEntity driver = _storage.GetEntityByID(driverBus1.nEntityFKDrvier);
                rsp.sFname = driver.sFname;
                rsp.sMname = driver.sMname;
                rsp.sLname = driver.sLname;
                ITBus bus = _storage.GetBusById(driverBus1.nBusFK);
                rsp.sRegNo = bus.sRegNo;
                rsp.nBusId = bus.n;
            }
            else
            {
                rsp.apiError = ApiError_defs.err_Invalid_Request;
                rsp.apiError.sErrorMessage = "Unable to Update";
            }
            return(rsp);
        }
コード例 #2
0
 public object editBusDriver([FromBody] Models.DriverBus.editBusDriverreq req)
 {
     Bllfiles.BLL_Mapping bllentity          = new Bllfiles.BLL_Mapping();
     Models.DriverBus.editBusDriverresp resp = bllentity.editBusDriver(req);
     return(resp);
 }