ITBus IStorageService.getBusbyReg(string regNo) { ITBus iBus = null; TBus tBus = _Sb.TBus.FirstOrDefault(obj => obj.sRegNo == regNo); if (tBus != null) { iBus = new OTBus(tBus) as ITBus; } return(iBus); }
ITBus IStorageService.GetBusById(long n) { ITBus iBus = null; TBus tBus = _Sb.TBus.FirstOrDefault(obj => obj.n == n); if (tBus != null) { iBus = new OTBus(tBus) as ITBus; } return(iBus); }
ITBus IStorageService.ModifyBus(ITBus iBus, string sRegNo, int jOccupied, bool fCommitNow) { TBus tBus = (iBus as OTBus)._oMoniker; tBus.sRegNo = sRegNo; tBus.jCapacity = jOccupied; OTBus objBus = new OTBus(tBus); if (fCommitNow) { _Sb.SubmitChanges(); } return(objBus); }