Beispiel #1
0
 public override void start()
 {
     try
     {
         this.tUpdateRemedyBillTimer = new Timer((double)this.iGetBillPosInterval);
         this.tUpdateRemedyBillTimer.Elapsed += new ElapsedEventHandler(this.UpdateRemedyBill_Elapsed);
         this.tUpdateRemedyBillTimer.Enabled = true;
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         this.tUpdateRemedyBillTimer.Enabled = true;
         ErrorMsg errorMsg = new ErrorMsg("AddressResolution", "start", string.Concat("定时补救订单", exception.Message));
         this.logHelper.WriteError(errorMsg);
     }
     try
     {
         this.tGetCarDayPos = new Timer((double)this.iGetCarDayPosInterval);
         this.tGetCarDayPos.Elapsed += new ElapsedEventHandler(this.tGetCarDayPos_Elapsed);
         this.tGetCarDayPos.Enabled = true;
     }
     catch (Exception exception3)
     {
         Exception exception2 = exception3;
         this.tGetCarDayPos.Enabled = true;
         ErrorMsg errorMsg1 = new ErrorMsg("AddressResolution", "start", string.Concat("车辆当天末次位置", exception2.Message));
         this.logHelper.WriteError(errorMsg1);
     }
 }
Beispiel #2
0
 public override void start()
 {
     try
     {
         this.tBroadCastTimer = new Timer((double)this.iBroadCastTime);
         this.tBroadCastTimer.Elapsed += new ElapsedEventHandler(this.tBroadCastTimer_Elapsed);
         this.tBroadCastTimer.Enabled = true;
         this.tBroadCastTimer.Start();
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("Service", "GpsPicMain", string.Concat("启动播报普通信息失败", exception.Message));
         this.logHelper.WriteError(errorMsg);
     }
     try
     {
         this.tBroadCastUrgentTimer = new Timer((double)this.iBroadCastTime);
         this.tBroadCastUrgentTimer.Elapsed += new ElapsedEventHandler(this.tBroadCastUrgentTimer_Elapsed);
         this.tBroadCastUrgentTimer.Enabled = true;
         this.tBroadCastUrgentTimer.Start();
     }
     catch (Exception exception3)
     {
         Exception exception2 = exception3;
         ErrorMsg errorMsg1 = new ErrorMsg("Service", "GpsPicMain", string.Concat("启动播报紧急信息失败", exception2.Message));
         this.logHelper.WriteError(errorMsg1);
     }
 }
Beispiel #3
0
 public void DeleteOldRecord(int iLogSaveDate)
 {
     try
     {
         DirectoryInfo info = new DirectoryInfo(FileHelper.FilePath);
         if (!info.Exists)
         {
             return;
         }
         foreach (FileInfo info2 in info.GetFiles())
         {
             if (info2.CreationTime.AddDays((double) iLogSaveDate).Date < DateTime.Now.Date)
             {
                 File.Delete(info2.FullName);
             }
         }
     }
     catch (Exception exception)
     {
         ErrorMsg pErrorMsg = new ErrorMsg("LogHelper", "清除旧日志文件", exception.Message);
         new LogHelper().WriteError(pErrorMsg);
         return;
     }
     LogMsg pLogMsg = new LogMsg("LogHelper", "清除旧日志文件", "成功");
     new LogHelper().WriteLog(pLogMsg);
 }
Beispiel #4
0
 public override void start()
 {
     try
     {
         try
         {
             Variable.sServerIp = ReadDataFromXml.AppIp;
             Variable.sPort = ReadDataFromXml.AppPort;
             Variable.sUserId = ReadDataFromXml.AppUser;
             Variable.sPassword = ReadDataFromXml.AppPwd;
             this.execConnection();
         }
         catch (Exception exception1)
         {
             Exception exception = exception1;
             ErrorMsg errorMsg = new ErrorMsg("ChkErrorTimer", "start", string.Concat("启动故障检测失败", exception.Message));
             this.logHelper.WriteError(errorMsg);
         }
         this.tChkErrorTimer = new System.Timers.Timer((double)this.iChkErrTime);
         this.tChkErrorTimer.Elapsed += new ElapsedEventHandler(this.onChkErrorMain);
         this.tChkErrorTimer.Enabled = true;
     }
     catch (Exception exception3)
     {
         Exception exception2 = exception3;
         this.tChkErrorTimer.Enabled = true;
         ErrorMsg errorMsg1 = new ErrorMsg("ChkErrorTimer", "start", string.Concat("启动故障检测失败Ex", exception2.Message));
         this.logHelper.WriteError(errorMsg1);
     }
 }
 public override void start()
 {
     try
     {
         this.tGetConfigInfo = new Timer(100);
         this.tGetConfigInfo.Elapsed += new ElapsedEventHandler(this.tGetConfigInfo_Elapsed);
         this.tGetConfigInfo.Enabled = true;
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("CarInOutOfRangeOnTime", "start", string.Concat("开启获取按时进出站配置信息错误,", exception.Message));
         this.logHelper.WriteError(errorMsg);
     }
     try
     {
         this.tGetCurrentPosInfo = new Timer((double)this.iGetCurrentPosInfo);
         this.tGetCurrentPosInfo.Elapsed += new ElapsedEventHandler(this.tGetCurrentPosInfo_Elapsed);
         this.tGetCurrentPosInfo.Enabled = true;
     }
     catch (Exception exception3)
     {
         Exception exception2 = exception3;
         ErrorMsg errorMsg1 = new ErrorMsg("CarInOutOfRangeOnTime", "start", string.Concat("开启检测是否按时进出站错误,", exception2.Message));
         this.logHelper.WriteError(errorMsg1);
     }
 }
Beispiel #6
0
 public override void Add(DataTable data)
 {
     if ((data != null) && (data.Rows.Count > 0))
     {
         GpsDataTable table = new GpsDataTable(UpdataStruct.ColNameList);
         try
         {
             int num = 1;
             for (int i = 0; i <= (data.Rows.Count - 1); i++)
             {
                 table.InsertRows(data.Rows[i].ItemArray);
                 if ((num >= base._Size) || (i == (data.Rows.Count - 1)))
                 {
                     lock (base._PosList.SyncRoot)
                     {
                         base._PosList.Add(CompressHelper.CompressToSelf(table));
                     }
                     table.Rows.Clear();
                     num = 0;
                 }
                 num++;
             }
         }
         catch (Exception exception)
         {
             ErrorMsg msg = new ErrorMsg("RemotingDataBS", "Add", exception.Message + exception.StackTrace);
             new LogHelper().WriteError(msg);
             base._PosList = new ArrayList(100);
         }
     }
 }
Beispiel #7
0
 public static void execSaveGpsLogTable(int sWrkId, int sOrderId, string sCarId, int sOptcode, string sMsgText)
 {
     string str = sMsgText.Replace("'", "‘");
     string str1 = "";
     try
     {
         str1 = string.Concat(str1, " insert into ");
         str1 = string.Concat(str1, " GpsLog(wrkid,orderid,userid,carid,optcode,OptCodeDetail,isSuccess,description,optTime) ");
         str1 = string.Concat(str1, " values({0},{1},'{2}',{3}, 13, {4},-1,'{5}',getDate())");
         object[] objArray = new object[] { sWrkId, sOrderId, ReadDataFromXml.ExecUserId, sCarId, sOptcode, str };
         str1 = string.Format(str1, objArray);
         SqlDataAccess.insertBySql(str1);
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg()
         {
             ClassName = "ReadDataFromDB",
             FunctionName = "execSaveGpsLogTable",
             ErrorText = string.Concat("保存下发内容到GpsLog时发生错误!", exception.Message, ",SQL:", str1)
         };
         (new LogHelper()).WriteError(errorMsg, exception);
     }
 }
Beispiel #8
0
 private void method_0(Exception exception_0)
 {
     Thread.Sleep(0x1388);
     LogHelper helper = new LogHelper();
     ErrorMsg msg = new ErrorMsg("UpDataOtherData", helper.GetCallFunction(), helper.GetExceptionMsg(exception_0));
     helper.WriteError(msg);
 }
Beispiel #9
0
 private void method_0()
 {
     Trace.Write("appserver - Thread upNewPosition, WebGpsClient_GetCurrentPosData start!");
     DataRow row = UpdataStruct.CloneDataTableColumn.NewRow();
     SqlDataAccess access = new SqlDataAccess();
     DateTime dbTime = base.GetDbTime(access);
     Label_0019:
     try
     {
         SqlParameter[] parameterArray = new SqlParameter[] { new SqlParameter("@ReadTime", dbTime) };
         DataTable table = access.getDataBySP("WebGpsClient_GetCurrentPosData", parameterArray);
         if (table != null)
         {
             goto Label_0056;
         }
     Label_004A:
         Thread.Sleep(0x7d0);
         goto Label_0019;
     Label_0056:
         if (table.Rows.Count <= 0)
         {
             goto Label_004A;
         }
         dbTime = Convert.ToDateTime(table.Rows[0]["svrTime"]);
         string str = string.Empty;
         string str2 = string.Empty;
         CarInfo dataCarInfoBySimNum = null;
         CarPartInfo info2 = new CarPartInfo();
         foreach (DataRow row2 in table.Rows)
         {
             this.method_1(row2, row, info2);
             str = Convert.ToString(row2["phone"]);
             str2 = Convert.ToString(row2["carNum"]);
             dataCarInfoBySimNum = CarDataInfoBuffer.GetDataCarInfoBySimNum(str);
             if (((dataCarInfoBySimNum != null) && !string.IsNullOrEmpty(str2)) && !str2.Equals(dataCarInfoBySimNum.CarNum))
             {
                 CarDataInfoBuffer.GetDataCarInfoByCarNum(str2);
             }
             if (dataCarInfoBySimNum != null)
             {
                 dataCarInfoBySimNum.CarPosData = row.ItemArray;
                 dataCarInfoBySimNum.IsNewPosTime = dbTime;
             }
         }
         Thread.Sleep(20);
         goto Label_0019;
     }
     catch (Exception exception)
     {
         Thread.Sleep(0xbb8);
         LogHelper helper = new LogHelper();
         ErrorMsg msg = new ErrorMsg("UpdataNewPosition", helper.GetCallFunction(), helper.GetExceptionMsg(exception));
         helper.WriteError(msg);
         goto Label_0019;
     }
 }
 public override void start()
 {
     try
     {
         this.tCheckPathAlarm = new Timer((double)this.iCheckPathAlarm);
         this.tCheckPathAlarm.Elapsed += new ElapsedEventHandler(this.tCheckPathAlarm_Elapsed);
         this.tCheckPathAlarm.Enabled = true;
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("PlatformAlarmPathAlarm", "start", string.Concat("开启检测偏移路线报警错误,", exception.Message));
         this.logHelper.WriteError(errorMsg);
     }
 }
Beispiel #11
0
 public override void start()
 {
     try
     {
         this.tTimer1 = new Timer(1000);
         this.tTimer1.Elapsed += new ElapsedEventHandler(this.tTimer1_Elapsed);
         this.tTimer1.Enabled = true;
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("SendPZMessage", "start", string.Concat(",", exception.Message));
         this.logHelper.WriteError(errorMsg);
     }
 }
Beispiel #12
0
 public override void start()
 {
     try
     {
         this.tCheckSeparateSticky = new Timer((double)this.SeparateAndStickyInterval);
         this.tCheckSeparateSticky.Elapsed += new ElapsedEventHandler(this.tCheckSeparateSticky_Elapsed);
         this.tCheckSeparateSticky.Enabled = true;
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("SeparateAndSticky", "start", string.Concat("开启检测脱车粘车报警错误,", exception.Message));
         this.logHelper.WriteError(errorMsg);
     }
 }
Beispiel #13
0
 public override void start()
 {
     try
     {
         this.tTerminalDemand = new Timer((double)this.iTerminalDemand);
         this.tTerminalDemand.Elapsed += new ElapsedEventHandler(this.tTerminalDemand_Elapsed);
         this.tTerminalDemand.Enabled = true;
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("JTBTerminalDemand", "start", string.Concat("启动定时下发终端点播失败", exception.Message));
         this.logHelper.WriteError(errorMsg);
     }
 }
 public override void start()
 {
     try
     {
         this.tCheckRoadSpeedAndRan = new Timer(1000);
         this.tCheckRoadSpeedAndRan.Elapsed += new ElapsedEventHandler(this.tCheckRoadSpeedAndRan_Elapsed);
         this.tCheckRoadSpeedAndRan.Enabled = true;
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("PlatFormCheckRoadSpeedAndRank", "start", string.Concat("判断车自定义分段超速报警和道路等级,", exception.Message));
         this.logHelper.WriteError(errorMsg);
     }
 }
 public override void start()
 {
     try
     {
         this.tSendCurrentAddress = new Timer(10000);
         this.tSendCurrentAddress.Elapsed += new ElapsedEventHandler(this.tSendCurrentAddress_Elapsed);
         this.tSendCurrentAddress.Enabled = true;
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("InquiresCarCurrentAddress", "start", string.Concat("启动查询车辆当前地址信息失败", exception.Message));
         this.logHelper.WriteError(errorMsg);
     }
 }
Beispiel #16
0
 public override void start()
 {
     try
     {
         this.tRecordTimer = new System.Timers.Timer((double)this.iRecordTime);
         this.tRecordTimer.Elapsed += new ElapsedEventHandler(this.onRecordTimerMain);
         this.tRecordTimer.Enabled = true;
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         this.tRecordTimer.Enabled = true;
         ErrorMsg errorMsg = new ErrorMsg("PicTimer", "start", string.Concat("启动定时拍照失败", exception.Message));
         this.logHelper.WriteError(errorMsg);
     }
 }
Beispiel #17
0
 public override void start()
 {
     try
     {
         this.DWLBSPosTimer = new Timer((double)this.DWLBSPosInterval);
         this.DWLBSPosTimer.Elapsed += new ElapsedEventHandler(this.DWLBSPosTimer_Elapsed);
         this.DWLBSPosTimer.Enabled = true;
         this.getLBSPosParam();
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("DWLBSPos", "start", string.Concat("启动DWLBS定位服务失败", exception.Message));
         this.logHelper.WriteError(errorMsg);
     }
 }
Beispiel #18
0
 public override void start()
 {
     try
     {
         this.tGetCurrentPosInfoTimer = new Timer((double)this.iGetCurrentPosInfoInterval);
         this.tGetCurrentPosInfoTimer.Elapsed += new ElapsedEventHandler(this.tGetCurrentPosInfoTimer_Elapsed);
         this.tGetCurrentPosInfoTimer.Enabled = true;
         this.sAdminRegionPreTime = DateTime.Now.ToString();
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("IORegionTimer", "start", string.Concat("启动出入行政区报警服务失败", exception.Message));
         this.logHelper.WriteError(errorMsg);
     }
 }
 private DataTable getGatheredAlarmConfig()
 {
     DataTable dataBySql;
     try
     {
         dataBySql = SqlDataAccess.getDataBySql(" select a.*, b.RegionName, b.RegionDot from GpsGatheredAlarmConfig a INNER JOIN GpsRegionType b on a.RegionId = b.RegionId ");
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("PlatformGatheredAlarm", "getGatheredAlarmConfig", string.Concat("获取聚集报警配置信息,", exception.Message));
         this.logHelper.WriteError(errorMsg);
         dataBySql = null;
     }
     return dataBySql;
 }
Beispiel #20
0
 public override void start()
 {
     try
     {
         this.InitLCSTime();
         this.tLCSPosTimer = new Timer((double)this.iLCSTime);
         this.tLCSPosTimer.Elapsed += new ElapsedEventHandler(this.tLCSPosTimer_Elapsed);
         this.tLCSPosTimer.Enabled = true;
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("LCSTimer", "start", string.Concat("启动LCS定位服务失败", exception.Message));
         this.logHelper.WriteError(errorMsg);
     }
 }
 private DataTable getCurrentPosInfo()
 {
     DataTable dataBySql;
     try
     {
         string str = " select a.*, b.CarNum from GpsCarCurrentPosInfo a WITH(NOLOCK) INNER JOIN GisCar b on a.telephone = b.SimNum where dateadd(Hh, {0}, gpsTime) > getdate() ";
         dataBySql = SqlDataAccess.getDataBySql(string.Format(str, this.EffectiveTime));
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("PlatformGatheredAlarm", "getCurrentPosInfo", string.Concat("获取末次位置信息,", exception.Message));
         this.logHelper.WriteError(errorMsg);
         dataBySql = null;
     }
     return dataBySql;
 }
Beispiel #22
0
 private void DWLBSPosTimer_Elapsed(object sender, ElapsedEventArgs e)
 {
     this.DWLBSPosTimer.Enabled = false;
     try
     {
         try
         {
             DataTable dWLBSInfo = this.getDWLBSInfo();
             if (dWLBSInfo != null && dWLBSInfo.Rows.Count > 0)
             {
                 LogMsg logMsg = new LogMsg("DWLBSPos", "DWLBSPosTimer_Elapsed", "")
                 {
                     Msg = string.Concat("获取需定位的信息数量为:", dWLBSInfo.Rows.Count)
                 };
                 this.logHelper.WriteLog(logMsg);
                 int num1 = 0;
                 foreach (DataRow row in dWLBSInfo.Rows)
                 {
                     string str = row["SimNum"].ToString();
                     int num2 = Convert.ToInt32(row["CarId"]);
                     if (this.myDownData.iCar_SetPosReport(CmdParam.ParamType.SimNum, str, "", CmdParam.CommMode.未知方式, this.m_PosReport, num2) != (long)-1)
                     {
                         num1++;
                     }
                     else
                     {
                         ErrorMsg errorMsg = new ErrorMsg("DWLBSPos", "DWLBSPosTimer_Elapsed", string.Concat("通讯返回失败,SIM卡:", str));
                         this.logHelper.WriteError(errorMsg);
                     }
                 }
                 logMsg.Msg = string.Concat("实际定位成功的信息数量为:", num1);
                 this.logHelper.WriteLog(logMsg);
             }
         }
         catch (Exception exception1)
         {
             Exception exception = exception1;
             ErrorMsg errorMsg1 = new ErrorMsg("DWLBSPos", "DWLBSPosTimer_Elapsed", string.Concat("DWLBS定位失败", exception.Message));
             this.logHelper.WriteError(errorMsg1);
         }
     }
     finally
     {
         this.DWLBSPosTimer.Enabled = true;
     }
 }
Beispiel #23
0
 public override void start()
 {
     try
     {
         this.OffLineNotice = new Timer((double)this.NoticeInterval);
         this.OffLineNotice.Elapsed += new ElapsedEventHandler(this.OffLineNotice_Elapsed);
         this.OffLineNotice.Enabled = true;
         this.OnLineNotice = new Timer((double)this.NoticeInterval);
         this.OnLineNotice.Elapsed += new ElapsedEventHandler(this.OnLineNotice_Elapsed);
         this.OnLineNotice.Enabled = true;
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("JTBOnOffLineNotice", "start", string.Concat("开启交通部上下线通知错误,", exception.Message));
         this.logHelper.WriteError(errorMsg);
     }
 }
Beispiel #24
0
 public override void start()
 {
     try
     {
         this.preGetLBSTime = "";
         this.tGetLBSPosDataTimer = new System.Timers.Timer((double)this.iGetLBSPosDataInterval);
         this.tGetLBSPosDataTimer.Elapsed += new ElapsedEventHandler(this.tGetLBSDataTimer_Elapsed);
         this.tGetLBSPosDataTimer.Enabled = true;
         this.tLBSPosTimer = new System.Timers.Timer((double)this.iGetLBSPosDataInterval);
         this.tLBSPosTimer.Elapsed += new ElapsedEventHandler(this.tLBSPosTimer_Elapsed);
         this.tLBSPosTimer.Enabled = true;
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("LBSTimer", "start", string.Concat("启动LBS定位服务失败", exception.Message));
         this.logHelper.WriteError(errorMsg);
     }
 }
Beispiel #25
0
 private DataTable getCarCurrentPosInfo()
 {
     DataTable dataTable;
     try
     {
         DateTime svrTime = ReadDataFromDB.GetSvrTime();
         DataTable dataBySql = SqlDataAccess.getDataBySql(string.Format(this.sql, this.dtNow, svrTime));
         this.dtNow = svrTime;
         dataTable = dataBySql;
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("GpsCarCurrentPosInfo", "getCarCurrentPosInfo", string.Concat("获取末次位置信息错误,", exception.Message));
         this.logHelper.WriteError(errorMsg);
         dataTable = null;
     }
     return dataTable;
 }
Beispiel #26
0
 public void CalAlarmData(DataRow dataRow_0, DataRow dataRow_1, CarPartInfo carPartInfo_0, DataTable dataTable_0)
 {
     try
     {
         int num = Convert.ToInt32(dataRow_0["reserved"]);
         string str = Convert.ToString(dataRow_0["phone"]);
         this.updataCommon_0.GetCarPartInfo(dataRow_1, dataRow_0, carPartInfo_0);
         int num2 = this.updataCommon_0.SetCarAlarmStatus(dataRow_1, dataRow_0, str);
         this.updataCommon_0.SetUpdataPosData(dataRow_1, dataRow_0, "", this.updataCommon_0.GetAddMsgText(dataRow_0, num), carPartInfo_0);
         dataRow_1["IsImportWatch"] = Convert.ToInt32(dataRow_0["isImportWatch"]);
         dataRow_1["statuDesc"] = this.updataCommon_0.GetStatuDesc(str, Convert.ToString(dataRow_0["recetime"]), carPartInfo_0.GpsTime, carPartInfo_0.StatusName);
         dataRow_1["OrderType"] = new CarAlarmType().GetAlarmTypeName(num2);
         dataTable_0.Rows.Add(dataRow_1.ItemArray);
     }
     catch (Exception exception)
     {
         ErrorMsg msg = new ErrorMsg("UpAlarm", "CalAlarmData", exception.Message + exception.StackTrace);
         new LogHelper().WriteError(msg);
     }
 }
Beispiel #27
0
 private DataTable getOffLineData2()
 {
     DataTable dataTable;
     try
     {
         DateTime svrTime = ReadDataFromDB.GetSvrTime();
         string str = " exec GpsPicServer_ExecCuffNoticeJTB '{0}', '{1}' ";
         DataTable dataBySql = SqlDataAccess.getDataBySql(string.Format(str, this.dtOffLineTime.ToString(), svrTime));
         this.dtOffLineTime = svrTime;
         dataTable = dataBySql;
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg("JTBOnOffLineNotice", "getOffLineData2", string.Concat("获取掉线车辆信息错误,", exception.Message));
         this.logHelper.WriteError(errorMsg);
         dataTable = null;
     }
     return dataTable;
 }
Beispiel #28
0
 private void method_0(string string_0)
 {
     string str = string.Format("select distinct a.CarId as carid from gpsUserCar a where a.UserId = '{0}'", string_0);
     try
     {
         DataTable table = new SqlDataAccess().getDataBySql(str);
         if ((table != null) && (table.Rows.Count > 0))
         {
             foreach (DataRow row in table.Rows)
             {
                 this.hashtable_0.Add(row["CarId"], row["CarId"]);
             }
         }
     }
     catch (Exception exception)
     {
         ErrorMsg msg = new ErrorMsg("UserCarId", "CreateUserCarInfoToList", exception.Message + exception.StackTrace);
         new LogHelper().WriteError(msg);
     }
 }
Beispiel #29
0
 public override void Add(DataTable data)
 {
     try
     {
         if ((data != null) && (data.Rows.Count <= base._Size))
         {
             lock (base._PosList.SyncRoot)
             {
                 base._PosList.Add(CompressHelper.Compress(data));
                 return;
             }
         }
         this.DataDisBach(data);
     }
     catch (Exception exception)
     {
         ErrorMsg msg = new ErrorMsg("RemotingDataCS", "Add", exception.Message + exception.StackTrace);
         new LogHelper().WriteError(msg);
         base._PosList = new ArrayList(100);
     }
 }
Beispiel #30
0
 public void CalPicData(DataRow dataRow_0, CarPartInfo carPartInfo_0, DataTable dataTable_0)
 {
     try
     {
         DataRow row = dataTable_0.NewRow();
         this.updataCommon_0.GetCarPartInfo(row, dataRow_0, carPartInfo_0);
         row["GpsTime"] = Convert.ToString(dataRow_0["GpsTime"]);
         row["OrderID"] = Convert.ToString(dataRow_0["orderId"]);
         row["CarId"] = Convert.ToString(dataRow_0["CarId"]);
         row["CarNum"] = Convert.ToString(dataRow_0["CarNum"]);
         row["SimNum"] = Convert.ToString(dataRow_0["Phone"]);
         row["OrderType"] = "";
         row["OrderName"] = "";
         row["MsgType"] = "";
         row["OrderResult"] = "";
         row["CommFlag"] = "";
         row["Describe"] = carPartInfo_0.GetCarCurrentInfo() + "摄像头信息报文";
         row["Longitude"] = carPartInfo_0.Lon;
         row["Latitude"] = carPartInfo_0.Lat;
         row["isImportWatch"] = -1;
         if (dataRow_0["CameraId"] != DBNull.Value)
         {
             row["CameraId"] = this.updataCommon_0.ConvertCameraId(Convert.ToInt32(dataRow_0["CameraId"]));
         }
         row["svrTime"] = Convert.ToString(dataRow_0["svrTime"]);
         row["statuName"] = carPartInfo_0.StatusName;
         row["ReceTime"] = Convert.ToDateTime(Convert.ToString(dataRow_0["ReceTime"])).ToString("yyyy-MM-dd HH:mm:ss.fff");
         row["ReadPicTime"] = Convert.ToDateTime(Convert.ToString(dataRow_0["ReadPicTime"])).ToString("yyyy-MM-dd HH:mm:ss.fff");
         row["CarStatus"] = 2;
         row["AlarmType"] = 0;
         row["PicDataType"] = Convert.ToString(dataRow_0["PicDataType"]);
         dataTable_0.Rows.Add(row);
     }
     catch (Exception exception)
     {
         ErrorMsg msg = new ErrorMsg("CarPic", "CalPicData", exception.Message);
         new LogHelper().WriteError(msg);
     }
 }
Beispiel #31
0
 public void WriteError(ErrorMsg pErrorMsg)
 {
     base.WriteText(pErrorMsg.GetMsg() + "\n");
 }
Beispiel #32
0
 public void WriteError(ErrorMsg pErrorMsg, Exception ex)
 {
     base.WriteText(pErrorMsg.GetMsg() + "\n" + ex.Message + "\n" + ex.StackTrace + "\n");
 }
Beispiel #33
0
 public void WriteError(ErrorMsg pErrorMsg, Exception ex, string funName)
 {
     pErrorMsg.FunctionName = funName;
     base.WriteText(pErrorMsg.GetMsg() + "\n" + ex.Message + "\n" + ex.StackTrace + "\n");
 }