コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }