public Hashtable GpsCarFilterToHashTable(int int_0) { SqlParameter[] parameterArray = new SqlParameter[] { new SqlParameter("@workId", int_0) }; DataTable table = new SqlDataAccess().getDataBySP("WebGpsClient_GetCarFilter", parameterArray); Hashtable hashtable = new Hashtable(); if (hashtable.Count > 0) { hashtable.Clear(); } CarFilterInfo info = null; foreach (DataRow row in table.Rows) { if (row["simNum"] != DBNull.Value) { info = new CarFilterInfo { SimNum = Convert.ToString(row["simNum"]), CarInfoData = CarDataInfoBuffer.GetDataCarInfoBySimNum(info.SimNum) }; if (info.CarInfoData != null) { info.PosReadTime = info.CarInfoData.IsNewPosTime; info.PicReadTime = info.CarInfoData.IsNewPicTime; hashtable.Add(info.SimNum, info); } } } return(hashtable); }
private void method_4(DataTable dataTable_0) { lock (this.hashtable_0.SyncRoot) { if (this.hashtable_0.Count > 0) { this.hashtable_0.Clear(); } CarFilterInfo info = null; foreach (DataRow row in dataTable_0.Rows) { if (row["simNum"] != DBNull.Value) { info = new CarFilterInfo { SimNum = Convert.ToString(row["simNum"]), CarInfoData = CarDataInfoBuffer.GetDataCarInfoBySimNum(Convert.ToString(row["simNum"])) }; if (info.CarInfoData != null) { info.PosReadTime = info.CarInfoData.IsNewPosTime; info.PicReadTime = info.CarInfoData.IsNewPicTime; this.hashtable_0.Add(info.SimNum, info); } } } } }
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; } }
private bool method_1(string string_1) { bool flag = true; if (CarDataInfoBuffer.GetDataCarInfoBySimNum(string_1) == null) { flag = false; } return(flag); }
private bool method_2(string string_1, string string_2) { bool flag = true; CarInfo dataCarInfoBySimNum = CarDataInfoBuffer.GetDataCarInfoBySimNum(string_1); if (((dataCarInfoBySimNum != null) && !string.IsNullOrEmpty(dataCarInfoBySimNum.Password)) && !dataCarInfoBySimNum.Password.Equals(string_2)) { flag = false; } return(flag); }
private CarInfo method_3(CmdParam.ParamType paramType, string str) { //修改类型判断 switch (paramType) { case CmdParam.ParamType.CarNum: return(CarDataInfoBuffer.GetDataCarInfoByCarNum(str)); case CmdParam.ParamType.CarId: return(CarDataInfoBuffer.GetDataCarInfoByCarId(str)); case CmdParam.ParamType.SimNum: return(CarDataInfoBuffer.GetDataCarInfoBySimNum(str)); } return(null); }