public bool updateGuideData(AVEHICLE_CONTROL_100 new_control_data) { try { using (sc.Data.DBConnection_EF con = sc.Data.DBConnection_EF.GetUContext()) { con.AVEHICLE_CONTROL_100.Attach(new_control_data); con.Entry(new_control_data).Property(p => p.GUIDE_START_STOP_SPEED).IsModified = true; con.Entry(new_control_data).Property(p => p.GUIDE_MAX_SPD).IsModified = true; con.Entry(new_control_data).Property(p => p.GUIDE_ACCEL_DECCEL_TIME).IsModified = true; con.Entry(new_control_data).Property(p => p.GUIDE_S_CURVE_RATE).IsModified = true; con.Entry(new_control_data).Property(p => p.GUIDE_RUN_SPD).IsModified = true; con.Entry(new_control_data).Property(p => p.GUIDE_MANUAL_HIGH_SPD).IsModified = true; con.Entry(new_control_data).Property(p => p.GUIDE_MANUAL_LOW_SPD).IsModified = true; con.Entry(new_control_data).Property(p => p.GUIDE_LF_LOCK_POSITION).IsModified = true; con.Entry(new_control_data).Property(p => p.GUIDE_LB_LOCK_POSITION).IsModified = true; con.Entry(new_control_data).Property(p => p.GUIDE_RF_LOCK_POSITION).IsModified = true; con.Entry(new_control_data).Property(p => p.GUIDE_RB_LOCK_POSITION).IsModified = true; con.Entry(new_control_data).Property(p => p.GUIDE_CHG_STABLE_TIME).IsModified = true; VehicleControlDao.update(con, new_control_data); } return(true); } catch (Exception ex) { NLog.LogManager.GetCurrentClassLogger().Error(ex, "Exception:"); return(false); } }
public bool updateTravelBaseData(AVEHICLE_CONTROL_100 new_control_data) { try { using (sc.Data.DBConnection_EF con = sc.Data.DBConnection_EF.GetUContext()) { con.AVEHICLE_CONTROL_100.Attach(new_control_data); con.Entry(new_control_data).Property(p => p.TRAVEL_RESOLUTION).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_START_STOP_SPEED).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_MAX_SPD).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_ACCEL_DECCEL_TIME).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_HOME_DIR).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_HOME_SPD).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_KEEP_DIS_SPD).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_OBS_DETECT_LONG).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_OBS_DETECT_SHORT).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_MANUAL_HIGH_SPD).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_MANUAL_LOW_SPD).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_TEACHING_SPD).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_TRAVEL_DIR).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_F_DIR_LIMIT).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_R_DIR_LIMIT).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_S_CURVE_RATE).IsModified = true; con.Entry(new_control_data).Property(p => p.TRAVEL_ENCODER_POLARITY).IsModified = true; VehicleControlDao.update(con, new_control_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 List <AVEHICLE_CONTROL_100> loadAllReleaseVehicleControlData_100() { List <AVEHICLE_CONTROL_100> datas = null; using (DBConnection_EF con = DBConnection_EF.GetUContext()) { datas = VehicleControlDao.loadAllReleaseData(con); } return(datas); }
public AVEHICLE_CONTROL_100 getReleaseVehicleControlData_100(string vh_id) { AVEHICLE_CONTROL_100 data = null; using (DBConnection_EF con = DBConnection_EF.GetUContext()) { data = VehicleControlDao.getReleaseDataByVhID(con, vh_id); } 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); }