protected void btnQuery_Click(object sender, EventArgs e) { IList<ERobAlertSetting> list = new List<ERobAlertSetting>(); ERobAlertSetting entity = new ERobAlertSetting(); IAlertSettingService db=new AlertSettingService(); list = db.Search<ERobAlertSetting>("粤", EnumVehicleType.Taxi); if(list.Count>0) { //list.Add(entity); dgv.DataSource = list; dgv.DataBind(); } }
/// <summary> /// 定时提醒 /// </summary> /// <param name="vehicleCode"></param> /// <returns></returns> public IList<ETimingAlertSetting> GetTimingAlertSetting(Guid vehicleCode) { IList<Guid> vehicleCodeList = new List<Guid>(); vehicleCodeList.Add(vehicleCode); AlertSettingService serv = new AlertSettingService(); IList<ETimingAlertSetting> timingAlertList = serv.Search<ETimingAlertSetting>(vehicleCodeList, false); return timingAlertList; }
/// <summary> /// 停车未熄火提醒 /// </summary> /// <param name="vehicleCode"></param> /// <returns></returns> public EStopCarAccOnAlertSetting GetStopCarAccOnAlertSetting(Guid vehicleCode) { IList<Guid> vehicleCodeList = new List<Guid>(); vehicleCodeList.Add(vehicleCode); AlertSettingService serv = new AlertSettingService(); IList<EStopCarAccOnAlertSetting> stopCarAccOnAlertList = serv.Search<EStopCarAccOnAlertSetting>(vehicleCodeList, false); if (stopCarAccOnAlertList.Count > 0) { return stopCarAccOnAlertList[0]; } return null; }
/// <summary> /// 超速提醒 /// </summary> /// <param name="vehicleCode"></param> /// <returns></returns> public EOverSpeedAlertSetting GetOverSpeedAlertSetting(Guid vehicleCode) { IList<Guid> vehicleCodeList = new List<Guid>(); vehicleCodeList.Add(vehicleCode); AlertSettingService serv = new AlertSettingService(); IList<EOverSpeedAlertSetting> overSpeedAlertList = serv.Search<EOverSpeedAlertSetting>(vehicleCodeList, false); if (overSpeedAlertList.Count > 0) { return overSpeedAlertList[0]; } return null; }
/// <summary> /// 疲劳驾驶提醒 /// </summary> /// <param name="vehicleCode"></param> /// <returns></returns> public EFatigueDrivingAlertSetting GetFatigueDrivingAlertSetting(Guid vehicleCode) { IList<Guid> vehicleCodeList = new List<Guid>(); vehicleCodeList.Add(vehicleCode); AlertSettingService serv = new AlertSettingService(); IList<EFatigueDrivingAlertSetting> fatAlertList = serv.Search<EFatigueDrivingAlertSetting>(vehicleCodeList, false); if (fatAlertList.Count > 0) { return fatAlertList[0]; } return null; }
/// <summary> /// 断电报警 /// </summary> /// <param name="vehicleCode"></param> /// <returns></returns> public EPowerDownAlertSetting GetPowerDownAlertSetting(Guid vehicleCode) { IList<Guid> vehicleCodeList = new List<Guid>(); vehicleCodeList.Add(vehicleCode); AlertSettingService serv = new AlertSettingService(); IList<EPowerDownAlertSetting> powerDownAlertList = serv.Search<EPowerDownAlertSetting>(vehicleCodeList, false); if (powerDownAlertList.Count > 0) { return powerDownAlertList[0]; } return null; }
/// <summary> /// 劫车报警 /// </summary> /// <param name="vehicleCode"></param> /// <returns></returns> public ERobAlertSetting GetRobAlertSetting(Guid vehicleCode) { IList<Guid> vehicleCodeList = new List<Guid>(); vehicleCodeList.Add(vehicleCode); AlertSettingService serv = new AlertSettingService(); IList<ERobAlertSetting> robAlertList = serv.Search<ERobAlertSetting>(vehicleCodeList, false); if (robAlertList.Count > 0) { return robAlertList[0]; } return null; }