예제 #1
0
 public DAL.TRACK_INSPECTION getDALInspection()
 {
     if (DALInspection != null && DALInspection.inspection_auto == Id)
     {
         return(DALInspection);
     }
     DALInspection = _domainContext.TRACK_INSPECTION.Find(Id);
     return(DALInspection);
 }
예제 #2
0
 public DAL.TRACK_INSPECTION getDALInspectionByQuoteId(int QuoteId)
 {
     if (DALInspection != null && DALInspection.quote_auto == QuoteId)
     {
         return(DALInspection);
     }
     DALInspection = _domainContext.TRACK_INSPECTION.Where(m => m.quote_auto == QuoteId).FirstOrDefault();
     return(DALInspection);
 }
예제 #3
0
        public Boolean UpdateTrackInspection(SyncModel equip)
        {
            DAL.TRACK_INSPECTION record = new DAL.TRACK_INSPECTION();
            record.LeftShoeNo = equip.leftShoeNo;
            record.RightShoeNo = equip.rightShoeNo;

            var inspectionRecord =
                _context.TRACK_INSPECTION.Where(m => m.inspection_auto == _InspectionAuto).FirstOrDefault();
            if (inspectionRecord == null)
                return false;

            inspectionRecord.LeftShoeNo = equip.leftShoeNo;
            inspectionRecord.RightShoeNo = equip.rightShoeNo;
            _context.SaveChanges();

            return true;
        }