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); }
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 void method_5(DataRow dataRow_0, DataTable dataTable_0) { int drInt = base.GetDrInt(dataRow_0, "RespValue"); int num2 = base.GetDrInt(dataRow_0, "cmdResult"); string str = string.Empty; int num3 = base.GetDrInt(dataRow_0, "commFlag"); DataRow row = dataTable_0.NewRow(); row["GpsTime"] = base.GetDrStr(dataRow_0, "GpsTime"); row["ReceTime"] = base.GetDrStr(dataRow_0, "instime"); row["OrderID"] = base.GetDrStr(dataRow_0, "orderId"); row["CarNum"] = base.GetDrStr(dataRow_0, "carNum"); row["CarId"] = base.GetDrStr(dataRow_0, "CarId"); row["OrderType"] = "接收"; row["OrderName"] = RespCodeParam.GetRespName(drInt); row["msgType"] = 0x45; row["OrderResult"] = this.method_10(drInt, num2, out str); row["CommFlag"] = base.GetCommFlagName(num3); row["Describe"] = str; row["RespCode"] = drInt; row["speed"] = base.GetDrStr(dataRow_0, "speed"); row["AccOn"] = ((base.GetDrInt(dataRow_0, "statu") & 0x4000) == 0) ? 0 : 1; dataTable_0.Rows.Add(row); if (base.IsCancelAlarm(drInt) && (num2 == 0)) { this.updataCommon_0.UpdateAlarmFlag(false, Convert.ToString(row["CarId"]), null); } if ((drInt == 0x1bc) || (drInt == 0x184)) { DataRow row2 = dataTable_0.NewRow(); try { row2["GpsTime"] = base.GetDrStr(dataRow_0, "GpsTime"); row2["ReceTime"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); row2["OrderID"] = 0; row2["CarNum"] = base.GetDrStr(dataRow_0, "carNum"); row2["CarId"] = base.GetDrStr(dataRow_0, "CarId"); row2["OrderType"] = "信息"; row2["OrderName"] = "提示信息"; row2["msgType"] = -1; row2["CommFlag"] = ""; new CarAlarmType().UpdateAlarmType(base.GetDrStr(dataRow_0, "phone")); row2["OrderResult"] = "成功"; row2["Describe"] = "下载数据成功"; } catch (Exception exception) { row2["OrderResult"] = "失败"; row2["Describe"] = "下载数据失败"; LogHelper helper = new LogHelper(); ErrorMsg msg = new ErrorMsg("UpdataNewLogData", helper.GetCallFunction(), helper.GetExceptionMsg(exception)); helper.WriteError(msg); } dataTable_0.Rows.Add(row2); } }
private DataTable method_2() { DataTable table = null; try { table = this.loginUserInfo.CreateUserAuthorInfomation(); } catch (Exception exception) { LogHelper helper = new LogHelper(); ErrorMsg msg = new ErrorMsg("login", helper.GetCallFunction(), helper.GetExceptionMsg(exception)); helper.WriteError(msg); throw exception; } return table; }
private void method_1() { //Trace.Write("appserver - Thread upResponse, WebGpsClient_GetResponseData start!"); SqlDataAccess access = new SqlDataAccess(); DateTime dbTime = base.GetDbTime(access); DateTime now = DateTime.Now; DataRow row = UpdataStruct.CloneDataTableColumn.NewRow(); while (true) { try { SqlParameter[] parameterArray = new SqlParameter[] { new SqlParameter("@PreReadTime", dbTime) }; DataTable table = access.getDataBySP("WebGpsClient_GetResponseData", parameterArray); if ((table != null) && (table.Rows.Count > 0)) { dbTime = Convert.ToDateTime(table.Rows[0]["svrTime"]); this.method_2(row, table); } else { Thread.Sleep(0xbb8); } if (this.method_0(now)) { now = DateTime.Now; } } catch (Exception exception) { Thread.Sleep(0x1388); LogHelper helper = new LogHelper(); ErrorMsg msg = new ErrorMsg("UpdataResponseData", helper.GetCallFunction(), helper.GetExceptionMsg(exception)); helper.WriteError(msg); } Thread.Sleep(0x3e8); } }
public bool IsUserButCUser() { bool flag; try { string format = "SELECT UserID FROM GpsUser WHERE IsStop = 0 and UserID= '{0}' and PassWord ='******'"; format = string.Format(format, this.UserId, this.UserPassword); if (this.sqlDataAccess_0.getDataBySql(format).Rows.Count != 0) { return true; } flag = false; } catch (Exception exception) { LogHelper helper = new LogHelper(); ErrorMsg msg = new ErrorMsg("login", helper.GetCallFunction(), helper.GetExceptionMsg(exception)); helper.WriteError(msg, exception); throw exception; } return flag; }
public DataTable GetReplayData(string BeginTime, string EndTime, string Tele, int RecordCount, int PageNum, int PageCount, int IsComputeMile, int IsQueryPic) { DataTable table = null; try { table = this.method_1(BeginTime, EndTime, Tele, RecordCount, PageNum, PageCount, IsComputeMile, IsQueryPic); table.Columns.Add(new DataColumn("StatuList")); table.Columns.Add(new DataColumn("AlarmType")); table.Columns.Add(new DataColumn("IsFill")); table.Columns.Add(new DataColumn("AccOn")); table.Columns.Add(new DataColumn("GpsValid")); int num = 0; int num2 = 0; long num3 = 0L; string str = string.Empty; CarAlarmType type = new CarAlarmType(); foreach (DataRow row in table.Rows) { str = row["SimNum"].ToString(); row["CarNum"].ToString(); num = Convert.ToInt32(row["reserved"]); num2 = int.Parse(row["carStatu"].ToString()); if (table.Columns.Contains("CarStatuEx")) { num3 = long.Parse(row["CarStatuEx"].ToString()); } row["StatuList"] = AlamStatus.GetStatusNameByCarStatu((long) num2) + AlamStatus.GetStatusNameByCarStatuExt(num3) + type.GetCustAlarmName(str, num2); if (AlamStatus.IsAlarmReport(num)) { row["carStatu"] = 1; } else { row["carStatu"] = 2; } row["AlarmType"] = type.GetAlarmTypeValue(Tele, num2, num3); int result = 0; int.TryParse(row["TransportStatus"].ToString(), out result); if (result == 3) { row["IsFill"] = 1; } else { row["IsFill"] = 0; } if (base.isPosStatus(num2)) { row["GpsValid"] = 1; } else { row["GpsValid"] = 0; } if ((num2 & 0x4000) == 0) { row["AccOn"] = 0; } else { row["AccOn"] = 1; } } return table; } catch (Exception exception) { LogHelper helper = new LogHelper(); ErrorMsg msg = new ErrorMsg("TrackReplay", helper.GetCallFunction(), helper.GetExceptionMsg(exception)); helper.WriteError(msg); } return table; }