コード例 #1
0
ファイル: AlarmInfoManager.cs プロジェクト: hhahh2011/CH.Gps
 public void Add(EAlarmInfo entity)
 {
     using (IRepository repository = SessionManager.CreateRepository(typeof(EAlarmInfo)))
     {
         repository.Save(entity);
     }
 }
コード例 #2
0
        protected EAlarmInfo CreateAlarmEntity(AlarmHandleContext context, EBaseAlertReport report, EWebSMSInfo webSMS)
        {
            EAlarmInfo eAlarmInfo = new EAlarmInfo();
            eAlarmInfo.ACCState = report.ACCState;
            eAlarmInfo.AlarmGrade = (int)report.EnumAlarmGrade;
          
            eAlarmInfo.GPSTime = report.GPSReportTime;
            eAlarmInfo.IsLock = false;
            eAlarmInfo.ProcessState = (int)EnumProcessState.UnProcess;
            eAlarmInfo.Position = this.GetPlaceName(context, report.Latitude, report.Longitude);
            eAlarmInfo.SMSInfoType = (int)report.EnumSMSInfoType;
            eAlarmInfo.Speed = report.Speed;
            eAlarmInfo.StarkMileage = report.VStarkMileage;
            eAlarmInfo.VehicleCode = report.VehicleCode;
            eAlarmInfo.WebSMSInfoID = webSMS.RecordID;

            return eAlarmInfo;
        }
コード例 #3
0
ファイル: AlarmInfoManager.cs プロジェクト: hhahh2011/CH.Gps
 private VAlarmInfo CreateVAlarmInfo(EAlarmInfo eAlarmInfo,  string licensePlate)
 {
     VAlarmInfo vAlarmInfo = new VAlarmInfo();
     vAlarmInfo.RecordID = eAlarmInfo.RecordID;
     vAlarmInfo.ACCState = eAlarmInfo.ACCState;
     vAlarmInfo.AlarmGrade = eAlarmInfo.AlarmGrade;
     vAlarmInfo.DriverName = eAlarmInfo.DriverName;
     vAlarmInfo.DriverPhone = eAlarmInfo.DriverPhone;
     vAlarmInfo.GPSTime = eAlarmInfo.GPSTime;
     vAlarmInfo.IsLock = eAlarmInfo.IsLock;
     vAlarmInfo.LicensePlate = licensePlate;          
     vAlarmInfo.LockUser = eAlarmInfo.LockUser;
     vAlarmInfo.ProcessState = eAlarmInfo.ProcessState;
     if (eAlarmInfo.ProcessTime.HasValue)
     {
         vAlarmInfo.ProcessTime = eAlarmInfo.ProcessTime.Value;
     }
     vAlarmInfo.ProcessUser = eAlarmInfo.ProcessUser;
     vAlarmInfo.Position = eAlarmInfo.Position;
     vAlarmInfo.Remark = eAlarmInfo.Remark;
     vAlarmInfo.SMSInfoType = eAlarmInfo.SMSInfoType;
     vAlarmInfo.Speed = eAlarmInfo.Speed;
     vAlarmInfo.StarkMileage = eAlarmInfo.StarkMileage;
     vAlarmInfo.VehicleCode = eAlarmInfo.VehicleCode; 
     if (eAlarmInfo.WebSMSInfoID.HasValue)
     {
         vAlarmInfo.WebSMSInfoID = eAlarmInfo.WebSMSInfoID.Value;
     }
     
     vAlarmInfo.IsEffective = eAlarmInfo.IsEffective;
     return vAlarmInfo;
 }