public bool updateScaleBaseData(SCALE_BASE_DATA new_scale_base_data) { try { using (sc.Data.DBConnection_EF con = sc.Data.DBConnection_EF.GetUContext()) { con.SCALE_BASE_DATA.Attach(new_scale_base_data); con.Entry(new_scale_base_data).Property(p => p.RESOLUTION).IsModified = true; con.Entry(new_scale_base_data).Property(p => p.INPOSITION_AREA).IsModified = true; con.Entry(new_scale_base_data).Property(p => p.INPOSITION_STABLE_TIME).IsModified = true; con.Entry(new_scale_base_data).Property(p => p.TOTAL_SCALE_PULSE).IsModified = true; con.Entry(new_scale_base_data).Property(p => p.SCALE_OFFSET).IsModified = true; con.Entry(new_scale_base_data).Property(p => p.SCALE_RESE_DIST).IsModified = true; con.Entry(new_scale_base_data).Property(p => p.READ_DIR).IsModified = true; con.Entry(new_scale_base_data).Property(p => p.SUB_VER).IsModified = true; con.Entry(new_scale_base_data).Property(p => p.ADD_TIME).IsModified = true; con.Entry(new_scale_base_data).Property(p => p.ADD_USER).IsModified = true; con.Entry(new_scale_base_data).Property(p => p.UPD_TIME).IsModified = true; con.Entry(new_scale_base_data).Property(p => p.UPD_USER).IsModified = true; ScaleBaseDataDao.update(con, new_scale_base_data); } return(true); } catch (Exception ex) { NLog.LogManager.GetCurrentClassLogger().Error(ex, "Exception:"); return(false); } }
public void start(SCApplication app) { AddressDataDao = app.AddressDataDao; ScaleBaseDataDao = app.ScaleBaseDataDao; ControlDataDao = app.ControlDataDao; VehicleControlDao = app.VehicleControlDao; }
public void start(ViewSectionDao viewSectionDao, SegmentDao segmentDao, AddressDataDao addressDataDao, ScaleBaseDataDao scaleBaseDataDao, ControlDataDao controlDataDao, VehicleControlDao vehicleControlDao) { VSection100Dao = viewSectionDao; AddressDataDao = addressDataDao; ScaleBaseDataDao = scaleBaseDataDao; ControlDataDao = controlDataDao; VehicleControlDao = vehicleControlDao; SegmentDao = segmentDao; }
public SCALE_BASE_DATA getReleaseSCALE_BASE_DATA() { SCALE_BASE_DATA data = null; using (DBConnection_EF con = DBConnection_EF.GetUContext()) { data = ScaleBaseDataDao.getReleaseData(con); } return(data); }
public VehicleDataSetting() { VSection100Dao = new ViewSectionDao(); SegmentDao = new SegmentDao(); AddressDataDao = new AddressDataDao(); ScaleBaseDataDao = new ScaleBaseDataDao(); ControlDataDao = new ControlDataDao(); VehicleControlDao = new VehicleControlDao(); SectionDao = new SectionDao(); sectionControlDao = new ohxc.winform.Dao.MirleOHS_100.SectionControlDao(); start(VSection100Dao, SegmentDao, AddressDataDao, ScaleBaseDataDao, ControlDataDao, VehicleControlDao); }