Esempio n. 1
0
 public RemotingServer(int workId, string UserId, int GroupId, int ModuleId, bool AllowSelMutil, bool AllowEmptyPw, bool SudoOverDue)
 {
     this._RemotingState = new RemotingState();
     this.myAlarm = new Alarm();
     this.myCar = new Car();
     this.m_LogHelper = new LogHelper();
     this._DataCSList = new RemotingDataCS();
     this._DataBSList = new RemotingDataBS();
     this._OnlineUserInfo = new OnlineUserInfo(workId, UserId, GroupId, ModuleId, AllowSelMutil, AllowEmptyPw, SudoOverDue, "");
     this.myDownData = new DownData(workId, AllowEmptyPw, SudoOverDue, AllowSelMutil, this._OnlineUserInfo);
     this.myDownDataYD = new DownDataFJYD(workId, AllowEmptyPw, SudoOverDue, AllowSelMutil, this._OnlineUserInfo);
     this.myDownDataDB44 = new DownDataXCJLY(workId, AllowEmptyPw, SudoOverDue, AllowSelMutil, this._OnlineUserInfo);
     this.myDownDataPass = new DownDataPassThrough(workId, AllowEmptyPw, SudoOverDue, AllowSelMutil, this._OnlineUserInfo);
 }
Esempio n. 2
0
 public RemotingServer(UserInfoEntity userInfo, string UserId, int ModuleId)
 {
     this._RemotingState = new RemotingState();
     this.myAlarm = new Alarm();
     this.myCar = new Car();
     this.m_LogHelper = new LogHelper();
     this._DataCSList = new RemotingDataCS();
     this._DataBSList = new RemotingDataBS();
     this._OnlineUserInfo = new OnlineUserInfo(userInfo.WorkId, UserId, userInfo.GroupId, ModuleId, userInfo.AllowSelMutil, userInfo.AllowEmptyPw, userInfo.SudoOverDue, userInfo.RoadTransportID, userInfo.AreaCode);
     this.myDownData = new DownData(userInfo.WorkId, userInfo.AllowEmptyPw, userInfo.SudoOverDue, userInfo.AllowSelMutil, this._OnlineUserInfo);
     this.myDownDataYD = new DownDataFJYD(userInfo.WorkId, userInfo.AllowEmptyPw, userInfo.SudoOverDue, userInfo.AllowSelMutil, this._OnlineUserInfo);
     this.myDownDataDB44 = new DownDataXCJLY(userInfo.WorkId, userInfo.AllowEmptyPw, userInfo.SudoOverDue, userInfo.AllowSelMutil, this._OnlineUserInfo);
     this.myDownDataPass = new DownDataPassThrough(userInfo.WorkId, userInfo.AllowEmptyPw, userInfo.SudoOverDue, userInfo.AllowSelMutil, this._OnlineUserInfo);
 }
Esempio n. 3
0
 public Response Car_CommandParameterInsterToDB(Car myCar, CmdParam.ParamType paramType, string CarValues, string CarPw, SimpleCmd cmdParameter, string cmdContent, string desc)
 {
     Response response = new Response();
     string str = cmdParameter.OrderCode.ToString();
     if (!base.CheckCar(paramType, CarValues, CarPw))
     {
         response.ErrorMsg = base.ErrorMsg;
         return response;
     }
     if (!base.isStartCommon())
     {
         response.ErrorMsg = base.ErrorMsg;
         return response;
     }
     foreach (Bussiness.CarInfo info in base.carInfoList)
     {
         int num = -1;
         int newOrderId = SendBase.CarCmdSend.GetNewOrderId();
         int num3 = SendBase.CarCmdSend.CalOrderId(base.WorkId, newOrderId);
         try
         {
             num = myCar.InsertCommandParameterToDB(info.SimNum, num3, (int) cmdParameter.CmdCode, cmdContent);
         }
         catch (Exception exception)
         {
             base.userInfo.DownCommd.AddCarNewLogData(newOrderId, (cmdParameter.OrderCode == CmdParam.OrderCode.平台查岗应答) ? "" : info.CarNum, "发送", cmdParameter.OrderCode.ToString(), "失败", "", "错误信息:" + exception.Message);
             continue;
         }
         if ((num > 0) && (cmdParameter.OrderCode != CmdParam.OrderCode.主动上报报警处理结果信息))
         {
             base.userInfo.DownCommd.AddCarNewLogData(newOrderId, (cmdParameter.OrderCode == CmdParam.OrderCode.平台查岗应答) ? "" : info.CarNum, "发送", str, "成功", "", desc);
             //将状态从等待修改为成功 huzh,2014.1.24
         }
         response.ResultCode = 0L;
     }
     return response;
 }
Esempio n. 4
0
        public Response icar_SetMultiSegSpeedAlarm(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, PathAlarmList pathAlarmList)
        {
            Response response = new Response();
            base.logMsg.FunctionName = "icar_SetMultiSegSpeedAlarm";
            base.logMsg.Msg = "发送:类型-" + paramType_0.ToString() + ",车辆-" + string_1;
            base.log.WriteLog(base.logMsg);
            if (!base.CheckCar(paramType_0, string_1, string_2))
            {
                response.ErrorMsg = base.alarmMsg.AlarmText = base.ErrorMsg;
                base.log.WriteAlarm(base.alarmMsg);
                return response;
            }
            if (base.isStartCommon())
            {
                foreach (Bussiness.CarInfo info in base.carInfoList)
                {
                    try
                    {
                        Car car = new Car();
                        int num = -1;
                        for (int i = 0; i < pathAlarmList.Count; i++)
                        {
                            PathAlarm alarm = (PathAlarm) pathAlarmList[i];
                            DataTable table = car.GetNewPathId(info.CarId, alarm.PathName, num);
                            if (table == null)
                            {
                                response.ErrorMsg = base.errMsg.ErrorText = string.Format("\"{0}\"获取偏移路线ID失败!", info.CarNum);
                                base.log.WriteError(base.errMsg);
                                return response;

                            }
                            int num3 = int.Parse(table.Rows[0][0].ToString());
                            if (-1 == num3)
                            {
                                response.ErrorMsg = base.errMsg.ErrorText = string.Format("\"{0}\"偏移路线ID已满,请删除部分偏移路线!", info.CarNum);
                                base.log.WriteError(base.errMsg);
                                return response;
                            }
                            num = int.Parse(table.Rows[0][1].ToString());
                            alarm.ID = num3;
                        }
                        object pvRegions = pathAlarmList.pvRegions;
                        int newOrderId = SendBase.CarCmdSend.GetNewOrderId();
                        base.SaveCmdParm(newOrderId.ToString() + "|" + info.CarId.ToString() + ";");
                        string orderIDParam = response.OrderIDParam;
                        response.OrderIDParam = orderIDParam + newOrderId.ToString() + "|" + info.CarId.ToString() + ";";
                        if ((info.ProtocolName != SendBase.m_ProtocolName) && (pathAlarmList.protocolType == CarProtocolType.交通厅))
                        {
                            base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "接收", pathAlarmList.OrderCode.ToString(), "失败", "", "终端不支持该协议!");
                            base.errMsg.ErrorText = "下发消息指令时发生错误!";
                            response.ErrorMsg = base.ErrorMsg = base.errMsg.ErrorText;
                            return response;
                        }
                        base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", pathAlarmList.OrderCode.ToString(), "等待", "", "");
                        car.InsertPathIntoGisCar(info.CarId, base.WorkId, newOrderId, pathAlarmList.AlarmPathDot);
                        if (pathAlarmList.OrderCode == CmdParam.OrderCode.设置分路段超速报警)
                        {
                            for (int j = 0; j < pathAlarmList.Count; j++)
                            {
                                PathAlarm alarm2 = (PathAlarm) pathAlarmList[j];
                                if (((alarm2.PathSegmentAlarmList != null) && (alarm2.PathSegmentAlarmList.Count != 0)) || !(info.ProtocolName == SendBase.m_ProtocolName))
                                {
                                    car.UpdateTrafficPathAlarm_tmp(base.WorkId, newOrderId, info.CarId, alarm2.PathName, 1, alarm2.Speed, alarm2.Time, alarm2.ID, (alarm2.BeginTime == null) ? "" : alarm2.BeginTime.ToString(), (alarm2.EndTime == null) ? "" : alarm2.EndTime.ToString(), alarm2.PathFlag, alarm2.DriEnough, alarm2.DriNoEnough);
                                }
                            }
                        }
                        if ((info.ProtocolName == SendBase.m_ProtocolName) && (pathAlarmList.protocolType == CarProtocolType.交通厅))
                        {
                            for (int k = 0; k < pathAlarmList.Count; k++)
                            {
                                PathAlarm alarm3 = (PathAlarm) pathAlarmList[k];
                                string conntent = "";
                                alarm3.OrderCode = pathAlarmList.OrderCode;
                                string str2 = alarm3.ToXmlString(base.CalOrderId(base.WorkId, newOrderId), info.SimNum, SendBase.m_ProtocolName, (int) commMode_0, "SetPathAlarm", ref conntent);
                                response.ResultCode = SendBase.CarCmdSend.icar_SendCmdXML(base.WorkId, newOrderId, info.SimNum, SendBase.m_ProtocolName, (int) alarm3.OrderCode, (int) commMode_0, str2);
                            }
                        }
                        else
                        {
                            if ((info.ProtocolName != SendBase.m_ProtocolName) && (pathAlarmList.protocolType == CarProtocolType.交通厅))
                            {
                                base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "接收", pathAlarmList.OrderCode.ToString(), "失败", "", "终端不支持该协议!");
                                response.ErrorMsg = base.ErrorMsg = base.errMsg.ErrorText;
                                response.ResultCode = 0L;
                                return response;
                            }
                            response.ResultCode = SendBase.CarCmdSend.icar_SimpleCmd(base.WorkId, newOrderId, info.SimNum, CmdParam.CmdCode.设置分段超速报警, ref pvRegions);
                        }
                        if (response.ResultCode != 0L)
                        {
                            base.alarmMsg.FunctionName = "icar_SetMultiSegSpeedAlarm";
                            base.alarmMsg.AlarmText = string.Concat(new object[] { "workid-", base.WorkId, ",simNum-", info.SimNum, ",OrderCode-", pathAlarmList.OrderCode });
                            base.alarmMsg.Code = response.ResultCode.ToString();
                            base.log.WriteAlarm(base.alarmMsg);
                        }
                        int num7 = 0;
                        while (true)
                        {
                            if (num7 >= pathAlarmList.Count)
                            {
                                break;
                            }
                            PathAlarm alarm4 = (PathAlarm) pathAlarmList[num7];
                            if ((pathAlarmList.OrderCode == CmdParam.OrderCode.设置分路段超速报警) && (pathAlarmList.protocolType == CarProtocolType.交通厅))
                            {
                                try
                                {
                                    if ((info.ProtocolName == SendBase.m_ProtocolName) && (pathAlarmList.protocolType == CarProtocolType.交通厅))
                                    {
                                        for (int m = 0; m < alarm4.PathSegmentAlarmList.Count; m++)
                                        {
                                            car.InsertTrafficSegmentParam(info.CarId, alarm4.ParentID, alarm4.PathSegmentAlarmList[m].PathSegmentID, alarm4.PathSegmentAlarmList[m].TopSpeed, alarm4.PathSegmentAlarmList[m].HoldTime, alarm4.PathSegmentAlarmList[m].DriEnough, alarm4.PathSegmentAlarmList[m].DriNoEnough, alarm4.PathSegmentAlarmList[m].Flag, alarm4.PathSegmentAlarmList[m].PathWidth);
                                        }
                                    }
                                }
                                catch (Exception exception)
                                {
                                    base.log.WriteError(base.errMsg, exception);
                                }
                            }
                            num7++;
                        }
                        response.ResultCode = 0L;
                        continue;
                    }
                    catch (Exception exception2)
                    {
                        base.errMsg.ErrorText = "下发消息指令时发生错误!";
                        response.ErrorMsg = base.ErrorMsg = base.errMsg.ErrorText;
                        base.log.WriteError(base.errMsg, exception2);
                    }
                }
                return response;
            }
            response.ErrorMsg = base.ErrorMsg;
            return response;
        }
Esempio n. 5
0
 public Response icar_SetLastDotQuery(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, CmdParam.OrderCode orderCode_0)
 {
     string format = "车辆{0}末次位置查询未找到该车辆轨迹";
     Response response = new Response();
     base.logMsg.FunctionName = "icar_SetLastDotQuery";
     base.logMsg.Msg = "发送:类型-" + paramType_0.ToString() + ",车辆-" + string_1 + ",指令-" + orderCode_0.ToString();
     base.log.WriteLog(base.logMsg);
     if (!base.CheckCar(paramType_0, string_1, string_2))
     {
         response.ErrorMsg = base.alarmMsg.AlarmText = base.ErrorMsg;
         base.log.WriteAlarm(base.alarmMsg);
         return response;
     }
     if (base.isStartCommon())
     {
         foreach (Bussiness.CarInfo info in base.carInfoList)
         {
             try
             {
                 DataRow lastDotData = new Car().GetLastDotData(info.SimNum);
                 if (lastDotData == null)
                 {
                     base.alarmMsg.FunctionName = "icar_SetLastDotQuery";
                     base.alarmMsg.AlarmText = string.Concat(new object[] { "workid-", base.WorkId, ",simNum-", info.SimNum, ",OrderCode-", orderCode_0.ToString() });
                     base.alarmMsg.Code = "-1";
                     base.log.WriteAlarm(base.alarmMsg);
                     base.userInfo.DownCommd.AddCarNewLogData(0, info.CarNum, "信息", "提示信息", "", "", string.Format(format, info.CarNum));
                 }
                 else
                 {
                     CmdParam.CommMode mode = CmdParam.CommMode.短信;
                     CarPartInfo info2 = this.method_5(lastDotData, out mode);
                     base.userInfo.DownCommd.AddCarNewLogData(0, info.CarNum, "接收", orderCode_0.ToString(), "成功", mode.ToString(), info2.GetCarCurrentInfo(), info2.Lon, info2.Lat, info2.AccOn, info2.Speed, info2.IsFill, info2.GpsValid, info.CarId, info2.Direct, info2.ReceTime, info2.GpsTime);
                 }
                 response.ResultCode = 0L;
             }
             catch (Exception exception)
             {
                 response.ErrorMsg = base.errMsg.ErrorText = "下发消息指令时发生错误!";
                 base.log.WriteError(base.errMsg, exception);
             }
         }
         return response;
     }
     response.ErrorMsg = base.ErrorMsg;
     return response;
 }
Esempio n. 6
0
 public Response icar_SelMultiPathAlarm(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, PathAlarmList pathAlarmList_0)
 {
     Response response = new Response();
     base.logMsg.FunctionName = "icar_SelMultiPathAlarm";
     base.logMsg.Msg = "发送:类型-" + paramType_0.ToString() + ",车辆-" + string_1;
     base.log.WriteLog(base.logMsg);
     if (!base.CheckCar(paramType_0, string_1, string_2))
     {
         response.ErrorMsg = base.alarmMsg.AlarmText = base.ErrorMsg;
         base.log.WriteAlarm(base.alarmMsg);
         return response;
     }
     if (base.isStartCommon())
     {
         foreach (Bussiness.CarInfo info in base.carInfoList)
         {
             try
             {
                 Car car = new Car();
                 int num = -1;
                 for (int i = 0; i < pathAlarmList_0.Count; i++)
                 {
                     PathAlarm alarm = (PathAlarm) pathAlarmList_0[i];
                     DataTable table = car.GetNewPathId(info.CarId, alarm.PathName, num);
                     if (table == null)
                     {
                         goto Label_035B;
                     }
                     int num3 = int.Parse(table.Rows[0][0].ToString());
                     if (-1 == num3)
                     {
                         goto Label_039A;
                     }
                     num = int.Parse(table.Rows[0][1].ToString());
                     alarm.ID = num3;
                 }
                 object pvRegions = pathAlarmList_0.pvRegions;
                 int newOrderId = SendBase.CarCmdSend.GetNewOrderId();
                 base.SaveCmdParm(newOrderId.ToString() + "|" + info.CarId.ToString() + ";");
                 string orderIDParam = response.OrderIDParam;
                 response.OrderIDParam = orderIDParam + newOrderId.ToString() + "|" + info.CarId.ToString() + ";";
                 base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", pathAlarmList_0.OrderCode.ToString(), "等待", "", "");
                 car.InsertPathIntoGisCar(info.CarId, base.WorkId, newOrderId, pathAlarmList_0.AlarmPathDot);
                 response.ResultCode = SendBase.CarCmdSend.icar_SelMultiPathAlarm(base.WorkId, newOrderId, info.SimNum, ref pvRegions);
                 if (response.ResultCode != 0L)
                 {
                     base.alarmMsg.FunctionName = "icar_SelMultiPathAlarm";
                     base.alarmMsg.AlarmText = string.Concat(new object[] { "workid-", base.WorkId, ",simNum-", info.SimNum, ",OrderCode-", pathAlarmList_0.OrderCode });
                     base.alarmMsg.Code = response.ResultCode.ToString();
                     base.log.WriteAlarm(base.alarmMsg);
                 }
                 for (int j = 0; j < pathAlarmList_0.Count; j++)
                 {
                     PathAlarm alarm2 = (PathAlarm) pathAlarmList_0[j];
                     car.UpdatePathAlarm(info.CarId, alarm2.PathName, 1, 0, 0, alarm2.ID, "", "", 0, 0, 0);
                 }
                 response.ResultCode = 0L;
                 continue;
             Label_035B:
                 response.ErrorMsg = base.errMsg.ErrorText = string.Format("\"{0}\"获取偏移路线ID失败!", info.CarNum);
                 base.log.WriteError(base.errMsg);
                 return response;
             Label_039A:
                 response.ErrorMsg = base.errMsg.ErrorText = string.Format("\"{0}\"偏移路线ID已满,请删除部分偏移路线!", info.CarNum);
                 base.log.WriteError(base.errMsg);
                 return response;
             }
             catch (Exception exception)
             {
                 base.errMsg.ErrorText = "下发消息指令时发生错误!";
                 response.ErrorMsg = base.ErrorMsg = base.errMsg.ErrorText;
                 base.log.WriteError(base.errMsg, exception);
             }
         }
         return response;
     }
     response.ErrorMsg = base.ErrorMsg;
     return response;
 }
Esempio n. 7
0
        /// <summary>
        /// 设置区域报警
        /// </summary>
        /// <param name="ParamType"></param>
        /// <param name="CarValues"></param>
        /// <param name="CarPw"></param>
        /// <param name="CommMode"></param>
        /// <param name="regionAlarmList"></param>
        /// <returns></returns>
        public Response icar_SetRegionAlarm(CmdParam.ParamType ParamType, string CarValues, string CarPw, CmdParam.CommMode CommMode, RegionAlarmList regionAlarmList)
        {
            Response response = new Response();
            base.logMsg.FunctionName = "icar_SetRegionAlarm";
            base.logMsg.Msg = "发送:类型-" + ParamType.ToString() + ",车辆-" + CarValues;
            base.log.WriteLog(base.logMsg);
            if (!base.CheckCar(ParamType, CarValues, CarPw))
            {
                response.ErrorMsg = base.alarmMsg.AlarmText = base.ErrorMsg;
                base.log.WriteAlarm(base.alarmMsg);
                return response;
            }
            if (base.isStartCommon())
            {
                Car car = new Car();
                foreach (Bussiness.CarInfo info in base.carInfoList)
                {
                    try
                    {
                        RegionAlarm alarm;
                        int num = -1;
                        for (int i = 0; i < regionAlarmList.Count; i++)
                        {
                            alarm = (RegionAlarm) regionAlarmList[i];
                            ///////////////////////////////////////////
                            //进行反纠偏处理
                            string LatLngString = alarm.AlarmRegionDot;
                            string[] latlng = LatLngString.Trim(new char[]{'\\'}).Split('\\');
                            LatLngString = latlng[0].ToString() + "\\";
                            for (int j = 0; j < (latlng.Length-1) / 2; j++)
                            {
                                double lng = Convert.ToDouble(latlng[j * 2 + 1]);
                                double lat = Convert.ToDouble(latlng[j * 2 + 2]);
                                GoogleOffset.getMars(ref lng, ref lat);
                                LatLngString = LatLngString + lng.ToString() + "\\" + lat.ToString() + "\\";
                            }
                            if ((latlng.Length/2)*2 == latlng.Length)
                            {
                                LatLngString = LatLngString + latlng[latlng.Length - 1];
                            }
                            alarm.AlarmRegionDot = LatLngString.Trim(new char[]{'\\'});
                            ///////////////////////////////////////////
                            DataTable table = car.GetNewRegionId(info.CarId, alarm.PathName, num);
                            if ((table == null) || (table.Rows.Count == 0))
                            {
                                base.errMsg.ErrorText = string.Format("\"{0}\"获取报警区域ID失败!", info.CarNum);
                                response.ErrorMsg = base.errMsg.ErrorText;
                                base.log.WriteError(base.errMsg);
                                return response;
                            }
                            int num3 = int.Parse(table.Rows[0][0].ToString());
                            alarm.newRegionId = num3;
                            num = num3;
                        }
                        object pvRegions = null;
                        if (regionAlarmList.protocolType == CarProtocolType.非交通厅)
                        {
                            pvRegions = regionAlarmList.pvRegions;
                        }
                        int newOrderId = SendBase.CarCmdSend.GetNewOrderId();
                        base.SaveCmdParm(newOrderId.ToString() + "|" + info.CarId.ToString() + ";");
                        string orderIDParam = response.OrderIDParam;
                        response.OrderIDParam = orderIDParam + newOrderId.ToString() + "|" + info.CarId.ToString() + ";";
                        if ((info.ProtocolName != SendBase.m_ProtocolName) && (regionAlarmList.protocolType == CarProtocolType.交通厅))
                        {
                            base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", regionAlarmList.OrderCode.ToString(), "失败", "", "终端不支持该协议!");
                            response.ResultCode = 0L;
                            return response;
                        }
                        base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", regionAlarmList.OrderCode.ToString(), "等待", "", "");
                        car.InsertRegionIntoGisCar(info.CarId, base.WorkId, newOrderId, regionAlarmList.AlarmRegionDot, regionAlarmList.RegionFeature.ToString());
                        RegionAlarmList list = new RegionAlarmList();
                        RegionAlarmList list2 = new RegionAlarmList();
                        RegionAlarmList list3 = new RegionAlarmList();
                        for (int j = 0; j < regionAlarmList.Count; j++)
                        {
                            alarm = (RegionAlarm) regionAlarmList[j];
                            switch (alarm.GetSharpe())
                            {
                                case 1:
                                    list.Add(alarm);
                                    break;

                                case 2:
                                    list2.Add(alarm);
                                    break;

                                case 3:
                                    list3.Add(alarm);
                                    break;
                            }
                            car.UpdateRegionParam(base.WorkId, newOrderId, int.Parse(info.CarId), alarm.RegionID, alarm.param, alarm.toEndTime, alarm.toBackTime, alarm.RegionType & 15, alarm.BeginTime, alarm.EndTime, regionAlarmList.RegionFeature, alarm.AlarmCondition.ToString(), alarm.PlanUpTime, alarm.PlanDownTime, alarm.newRegionId, alarm.AlarmFlag, alarm.MaxSpeed, alarm.HodeTime);
                        }
                        if (regionAlarmList.RegionFeature == 1)
                        {
                            if ((info.ProtocolName == SendBase.m_ProtocolName) && (regionAlarmList.protocolType == CarProtocolType.交通厅))
                            {
                                if (list.Count > 0)
                                {
                                    string content = "";
                                    list.OrderCode = regionAlarmList.OrderCode;
                                    string str2 = list.ToXmlString(base.CalOrderId(base.WorkId, newOrderId), info.SimNum, SendBase.m_ProtocolName, (int) CommMode, "SetRegionAlarm", ref content);
                                    if (!string.IsNullOrEmpty(content))
                                    {
                                        response.ErrorMsg = content + "经纬度数据有问题";
                                        response.ResultCode = -1L;
                                        return response;
                                    }
                                    response.ResultCode = SendBase.CarCmdSend.icar_SendCmdXML(base.WorkId, newOrderId, info.SimNum, SendBase.m_ProtocolName, (int) list.OrderCode, (int) CommMode, str2);
                                }
                                if (list2.Count > 0)
                                {
                                    string str3 = "";
                                    list2.OrderCode = regionAlarmList.OrderCode;
                                    string str4 = list2.ToXmlString(base.CalOrderId(base.WorkId, newOrderId), info.SimNum, SendBase.m_ProtocolName, (int) CommMode, "SetRegionAlarm", ref str3);
                                    if (!string.IsNullOrEmpty(str3))
                                    {
                                        response.ErrorMsg = str3 + "经纬度数据有问题";
                                        response.ResultCode = -1L;
                                        return response;
                                    }
                                    response.ResultCode = SendBase.CarCmdSend.icar_SendCmdXML(base.WorkId, newOrderId, info.SimNum, SendBase.m_ProtocolName, (int) list2.OrderCode, (int) CommMode, str4);
                                }
                                if (list3.Count > 0)
                                {
                                    string str5 = "";
                                    list3.OrderCode = regionAlarmList.OrderCode;
                                    string str6 = list3.ToXmlString(base.CalOrderId(base.WorkId, newOrderId), info.SimNum, SendBase.m_ProtocolName, (int) CommMode, "SetRegionAlarm", ref str5);
                                    if (!string.IsNullOrEmpty(str5))
                                    {
                                        response.ErrorMsg = str5 + "经纬度数据有问题";
                                        response.ResultCode = -1L;
                                        return response;
                                    }
                                    response.ResultCode = SendBase.CarCmdSend.icar_SendCmdXML(base.WorkId, newOrderId, info.SimNum, SendBase.m_ProtocolName, (int) list3.OrderCode, (int) CommMode, str6);
                                }
                            }
                            else
                            {
                                response.ResultCode = SendBase.CarCmdSend.icar_SimpleCmd(base.WorkId, newOrderId, info.SimNum, regionAlarmList.CmdCode, ref pvRegions);
                            }
                        }
                        else
                        {
                            response.ResultCode = SendBase.CarCmdSend.icar_SetMultiRegionAlarm(base.WorkId, newOrderId, info.SimNum, ref pvRegions);
                        }
                        if (response.ResultCode != 0L)
                        {
                            base.alarmMsg.FunctionName = "icar_SetRegionAlarm";
                            base.alarmMsg.AlarmText = string.Concat(new object[] { "workid-", base.WorkId, ",simNum-", info.SimNum, ",OrderCode-", regionAlarmList.OrderCode });
                            base.alarmMsg.Code = response.ResultCode.ToString();
                            base.log.WriteAlarm(base.alarmMsg);
                        }
                        response.ResultCode = 0L;
                        continue;
                    }
                    catch (Exception exception)
                    {
                        base.errMsg.ErrorText = "下发消息指令时发生错误!";
                        response.ErrorMsg = base.ErrorMsg = base.errMsg.ErrorText;
                        base.log.WriteError(base.errMsg, exception);
                    }
                }
                return response;
            }
            response.ErrorMsg = base.ErrorMsg;
            return response;
        }
Esempio n. 8
0
 protected void SaveCommandParameterToGpsLogTable(string newOrderId, string string_2)
 {
     if ((this.m_Params1 != null) && (this.m_Params1.Length != 0))
     {
         Car car = new Car();
         if (string.IsNullOrEmpty(string_2))
         {
             car.SaveCarSetParam(this.WorkId, newOrderId, this.m_OrderCode, this.m_Params1);
         }
         else
         {
             car.SaveCarSetParam(this.WorkId, newOrderId, string_2, this.m_Params1);
         }
         car.SaveCarCmdParam(this.WorkId, newOrderId, this.m_UserId, ((CmdParam.OrderCode) Convert.ToInt32(this.m_OrderCode)).ToString(), this.m_OrderCode, string_2, this.m_Params2);
     }
 }
Esempio n. 9
0
 private object method_8(string string_1, RegionAlarmList regionAlarmList_0, Car car_0)
 {
     int index = 1;
     string[] strArray = null;
     RegionAlarm alarm = null;
     DataTable table = null;
     string str = "0";
     int key = -1;
     object[] objArray = new object[(regionAlarmList_0.Count * 4) + 1];
     objArray[0] = regionAlarmList_0.Count.ToString();
     Hashtable hashtable = new Hashtable(0x40);
     for (int i = 0; i < regionAlarmList_0.Count; i++)
     {
         alarm = (RegionAlarm) regionAlarmList_0[i];
         try
         {
             int num4 = 0;
             goto Label_00A7;
         Label_0065:
             num4++;
             if ((num4 < 5) && hashtable.ContainsKey(key))
             {
                 goto Label_00A7;
             }
             goto Label_00C4;
         Label_0082:
             str = table.Rows[0][0].ToString();
             key = Convert.ToInt32(str);
             goto Label_0065;
         Label_00A7:
             table = car_0.GetNewRegionId(string_1, alarm.PathName, key);
             if (base.IsNullDataTable(table))
             {
                 goto Label_0065;
             }
             goto Label_0082;
         Label_00C4:
             hashtable.Add(key, key);
         }
         catch
         {
         }
         alarm.newRegionId = (alarm.newRegionId == 0) ? 0 : int.Parse(str);
         strArray = alarm.AlarmRegionDot.Split(new char[] { '\\' });
         if (strArray.Length == 4)
         {
             objArray[index + 1] = "1";
             objArray[index + 2] = strArray[1] + "," + strArray[2] + "," + strArray[3];
             objArray[index + 3] = strArray[0];
         }
         else if (strArray.Length == 5)
         {
             objArray[index + 1] = "2";
             objArray[index + 2] = strArray[1] + "," + strArray[2] + "," + strArray[3] + "," + strArray[4];
             objArray[index + 3] = strArray[0];
         }
         else if (strArray.Length > 5)
         {
             string str2 = string.Empty;
             for (int j = 1; j <= (strArray.Length - 2); j += 2)
             {
                 string str3 = str2;
                 str2 = str3 + strArray[j] + "," + strArray[j + 1] + ",";
             }
             objArray[index + 1] = "3";
             objArray[index + 2] = str2.Substring(0, str2.Length - 1);
             objArray[index + 3] = strArray[0];
         }
         if (alarm.newRegionId == 0)
         {
             objArray[index] = "0";
         }
         else
         {
             objArray[index] = str;
         }
         index += 4;
         object alarmRegionDot = regionAlarmList_0.AlarmRegionDot;
         regionAlarmList_0.AlarmRegionDot = string.Concat(new object[] { alarmRegionDot, alarm.newRegionId, @"\", alarm.AlarmRegionDot, "*" });
     }
     return objArray;
 }
Esempio n. 10
0
 public Response icar_SelMultiPathAlarm(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, PathAlarmList pathAlarmList_0)
 {
     Response response = new Response();
     base.WriteLog(paramType_0.ToString(), string_1);
     if (!base.CheckCar(paramType_0, string_1, string_2))
     {
         response.ErrorMsg = base.ErrorMsg;
         return response;
     }
     if (!base.isStartCommon())
     {
         response.ErrorMsg = base.ErrorMsg;
         return response;
     }
     Car car = new Car();
     int num = -1;
     int newOrderId = -1;
     DataTable table = null;
     object obj2 = null;
     PathAlarm alarm = null;
     object[] objArray = new object[4];
     foreach (Bussiness.CarInfo info in base.carInfoList)
     {
         try
         {
             int num3 = -1;
             newOrderId = SendBase.CarCmdSend.GetNewOrderId();
             base.SaveCmdParm(newOrderId.ToString() + "|" + info.CarId.ToString() + ";");
             string orderIDParam = response.OrderIDParam;
             response.OrderIDParam = orderIDParam + newOrderId.ToString() + "|" + info.CarId.ToString() + ";";
             for (int i = 0; i < pathAlarmList_0.Count; i++)
             {
                 alarm = (PathAlarm) pathAlarmList_0[i];
                 table = car.GetNewPathId(info.CarId, alarm.PathName, num3);
                 if ((table == null) || (table.Rows.Count <= 0))
                 {
                     goto Label_037E;
                 }
                 num = int.Parse(table.Rows[0][0].ToString());
                 alarm.ID = num;
                 if (-1 == num)
                 {
                     goto Label_033E;
                 }
                 num3 = int.Parse(table.Rows[0][1].ToString());
                 objArray[0] = num.ToString();
                 objArray[1] = alarm.PointCount.ToString();
                 objArray[2] = this.method_7(alarm.Points);
                 objArray[3] = alarm.PathDif;
                 obj2 = objArray;
                 base.AddUpDataLog(newOrderId, info.CarNum, RespCodeParam.GetRespName(((int) pathAlarmList_0.OrderCode) + 0x80), "");
                 car.InsertPathIdsIntoPathParam(info.CarId, base.WorkId.ToString(), newOrderId.ToString(), alarm.ID.ToString(), num.ToString());
                 if (i == (pathAlarmList_0.Count - 1))
                 {
                     object pvRegions = pathAlarmList_0.pvRegions;
                     car.InsertPathIntoGisCar(info.CarId, base.WorkId, newOrderId, pathAlarmList_0.AlarmPathDot);
                 }
                 response.ResultCode = SendBase.CarCmdSend.icar_SetCommonCmd(base.WorkId, newOrderId, info.SimNum, (CmdParam.CmdCode) pathAlarmList_0.OrderCode, ref obj2, commMode_0);
                 if ((pathAlarmList_0.Count - i) > 1)
                 {
                     Thread.Sleep(300);
                 }
                 if (response.ResultCode != 0L)
                 {
                     base.WriteError(base.WorkId.ToString(), info.SimNum, pathAlarmList_0.OrderCode.ToString());
                 }
                 car.UpdatePathAlarm(info.CarId, alarm.PathName, 1, 0, 0, alarm.ID, "", "", alarm.PathFlag, alarm.DriEnough, alarm.DriNoEnough);
             }
             continue;
         Label_033E:
             response.ErrorMsg = base.errMsg.ErrorText = string.Format("\"{0}\"偏移路线ID已满,请删除部分偏移路线!", info.CarNum);
             base.log.WriteError(base.errMsg);
             return response;
         Label_037E:
             response.ErrorMsg = base.errMsg.ErrorText = string.Format("\"{0}\"获取偏移路线ID失败!", info.CarNum);
             base.log.WriteError(base.errMsg);
             return response;
         }
         catch (Exception exception)
         {
             response.ErrorMsg = base.ErrorMsg = base.errMsg.ErrorText = "下发消息指令时发生错误!";
             base.log.WriteError(base.errMsg, exception);
         }
     }
     return response;
 }
Esempio n. 11
0
 public Response icar_SetRegionAlarm(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, RegionAlarmList regionAlarmList_0)
 {
     Response response = new Response();
     base.WriteLog(paramType_0.ToString(), string_1);
     if (!base.CheckCar(paramType_0, string_1, string_2))
     {
         response.ErrorMsg = base.ErrorMsg;
         return response;
     }
     if (!base.isStartCommon())
     {
         response.ErrorMsg = base.ErrorMsg;
         return response;
     }
     Car car = new Car();
     object obj2 = null;
     RegionAlarm alarm = null;
     int newOrderId = -1;
     try
     {
         foreach (Bussiness.CarInfo info in base.carInfoList)
         {
             newOrderId = SendBase.CarCmdSend.GetNewOrderId();
             obj2 = this.method_8(info.CarId, regionAlarmList_0, car);
             base.SaveCmdParm(newOrderId.ToString() + "|" + info.CarId.ToString() + ";");
             string orderIDParam = response.OrderIDParam;
             response.OrderIDParam = orderIDParam + newOrderId.ToString() + "|" + info.CarId.ToString() + ";";
             base.AddUpDataLog(newOrderId, info.CarNum, CmdParam.CmdCode.区域报警设置.ToString(), "");
             car.InsertRegionIntoGisCar(info.CarId, base.WorkId, newOrderId, regionAlarmList_0.AlarmRegionDot, regionAlarmList_0.RegionFeature.ToString());
             for (int i = 0; i < regionAlarmList_0.Count; i++)
             {
                 alarm = (RegionAlarm) regionAlarmList_0[i];
                 car.UpdateRegionParam(base.WorkId, newOrderId, int.Parse(info.CarId), alarm.RegionID, alarm.param, alarm.toEndTime, alarm.toBackTime, alarm.RegionType & 15, alarm.BeginTime, alarm.EndTime, regionAlarmList_0.RegionFeature, alarm.AlarmCondition.ToString(), alarm.PlanUpTime, alarm.PlanDownTime, alarm.newRegionId, alarm.AlarmFlag, alarm.MaxSpeed, alarm.HodeTime);
             }
             response.ResultCode = SendBase.CarCmdSend.icar_SetCommonCmd(base.WorkId, newOrderId, info.SimNum, CmdParam.CmdCode.区域报警设置, ref obj2, commMode_0);
             if (response.ResultCode != 0L)
             {
                 base.WriteError(base.WorkId.ToString(), info.SimNum, regionAlarmList_0.OrderCode.ToString());
             }
         }
         response.ResultCode = 0L;
     }
     catch (Exception exception)
     {
         response.ErrorMsg = "下发消息指令时发生错误,错误详细信息:" + exception.Message;
         base.log.WriteError(base.errMsg, exception);
     }
     return response;
 }
Esempio n. 12
0
 public Response icar_SendRawPackage(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, SimpleCmd simpleCmd_0)
 {
     Response response = new Response();
     string str = "";
     foreach (string[] strArray in simpleCmd_0.CmdParams)
     {
         string str8 = str;
         str = str8 + "命令码-" + simpleCmd_0.OrderCode.ToString() + ",参数-" + this.method_5(strArray, 0) + ";";
     }
     base.WriteLog(paramType_0.ToString(), string_1 + "," + str);
     if (!base.CheckCar(paramType_0, string_1, string_2))
     {
         response.ErrorMsg = base.ErrorMsg;
         return response;
     }
     if (!base.isStartCommon())
     {
         response.ErrorMsg = base.ErrorMsg;
         return response;
     }
     if ((simpleCmd_0.CmdParams != null) && (simpleCmd_0.CmdParams.Count > 0))
     {
         int newOrderId = -1;
         object objectArg = null;
         byte[] bytes = null;
         foreach (Bussiness.CarInfo info in base.carInfoList)
         {
             try
             {
                 foreach (string[] strArray2 in simpleCmd_0.CmdParams)
                 {
                     newOrderId = SendBase.CarCmdSend.GetNewOrderId();
                     base.SaveCmdParm(newOrderId.ToString() + "|" + info.CarId.ToString() + ";");
                     string orderIDParam = response.OrderIDParam;
                     response.OrderIDParam = orderIDParam + newOrderId.ToString() + "|" + info.CarId.ToString() + ";";
                     base.AddUpDataLog(newOrderId, info.CarNum, simpleCmd_0.OrderCode.ToString(), this.method_5(strArray2, (int) simpleCmd_0.OrderCode));
                     if (simpleCmd_0.OrderCode == CmdParam.OrderCode.回拔坐席电话指令)
                     {
                         bytes = Encoding.GetEncoding("gb2312").GetBytes(strArray2[0]);
                         byte[] array = new byte[15];
                         bytes.CopyTo(array, 0);
                         objectArg = array;
                     }
                     if (simpleCmd_0.OrderCode == CmdParam.OrderCode.设置油耗仪参数)
                     {
                         objectArg = new Oix().GetObjectArg(strArray2);
                     }
                     if (simpleCmd_0.OrderCode == CmdParam.OrderCode.设置出入口分段超速报警)
                     {
                         Car car = new Car();
                         string[] strArray3 = simpleCmd_0.CmdParams[0] as string[];
                         Hashtable hashtable = new Hashtable();
                         for (int i = 0; i < (strArray3.Length / 8); i++)
                         {
                             if (!hashtable.Contains(strArray3[i * 8]))
                             {
                                 car.Car_AddPassWayPathIdToTmp(info.CarId, base.WorkId, newOrderId, strArray3[i * 8], strArray3[(i * 8) + 1], (Convert.ToDouble(strArray3[(i * 8) + 6]) > 0.0) ? ((int) Convert.ToDouble(strArray3[(i * 8) + 6])) : ((int) Convert.ToDouble(strArray3[(i * 8) + 7])));
                                 hashtable[strArray3[i * 8]] = null;
                             }
                         }
                         objectArg = simpleCmd_0.pvArg;
                     }
                     if (info.ProtocolName == SendBase.m_ProtocolName)
                     {
                         if (simpleCmd_0.OrderCode == CmdParam.OrderCode.设置关键区域)
                         {
                             TrafficRawPackage package = new TrafficRawPackage {
                                 OrderCode = CmdParam.OrderCode.命令透传,
                                 SubOrderCode = simpleCmd_0.OrderCode
                             };
                             Car car2 = new Car();
                             StringBuilder builder = new StringBuilder();
                             builder.Append((strArray2.Length / 8).ToString("X4"));
                             for (int j = 0; j < strArray2.Length; j += 8)
                             {
                                 builder.Append(Convert.ToInt32(strArray2[j]).ToString("X8"));
                                 builder.Append(Convert.ToByte(strArray2[j + 1]).ToString("X2"));
                                 builder.Append(((int) (Convert.ToDouble(strArray2[j + 2]) * 1000000.0)).ToString("X8"));
                                 builder.Append(((int) (Convert.ToDouble(strArray2[j + 3]) * 1000000.0)).ToString("X8"));
                                 if (string.IsNullOrEmpty(strArray2[j + 5]))
                                 {
                                     builder.Append(Convert.ToInt32(strArray2[j + 4]).ToString("X8"));
                                     builder.Append("00000000");
                                 }
                                 else
                                 {
                                     builder.Append(((int) (Convert.ToDouble(strArray2[j + 4]) * 1000000.0)).ToString("X8"));
                                     builder.Append(((int) (Convert.ToDouble(strArray2[j + 5]) * 1000000.0)).ToString("X8"));
                                 }
                                 builder.Append(Convert.ToByte(strArray2[j + 6]).ToString("X2"));
                                 builder.Append(Convert.ToInt32(strArray2[j + 7]).ToString("X8"));
                                 if (car2.SetCriticalRegionToTmp(info.CarId, base.WorkId, newOrderId, strArray2[j], strArray2[j + 6], strArray2[j + 7]) != 0)
                                 {
                                     base.WriteError(base.WorkId.ToString(), info.SimNum, simpleCmd_0.OrderCode.ToString() + "-参数保存失败-" + strArray2[j] + "," + strArray2[j + 6] + "," + strArray2[j + 7]);
                                 }
                             }
                             package.strText = builder.ToString();
                             string conntent = "";
                             string str3 = package.ToXmlString(base.CalOrderId(base.WorkId, newOrderId), info.SimNum, SendBase.m_ProtocolName, (int) commMode_0, "SendRawPackage", ref conntent);
                             response.ResultCode = SendBase.CarCmdSend.icar_SendCmdXML(base.WorkId, newOrderId, info.SimNum, SendBase.m_ProtocolName, (int) package.OrderCode, (int) commMode_0, str3);
                         }
                         else if (simpleCmd_0.OrderCode == CmdParam.OrderCode.设置出入口分段超速报警)
                         {
                             TrafficRawPackage package2 = new TrafficRawPackage {
                                 OrderCode = CmdParam.OrderCode.命令透传,
                                 SubOrderCode = simpleCmd_0.OrderCode
                             };
                             StringBuilder builder2 = new StringBuilder();
                             byte[] pvArg = (byte[]) simpleCmd_0.pvArg;
                             if (pvArg != null)
                             {
                                 for (int k = 0; k < pvArg.Length; k++)
                                 {
                                     if (((k + 1) % 0x16) == 1)
                                     {
                                         byte[] buffer4 = new byte[4];
                                         for (int m = 0; m < 4; m++)
                                         {
                                             buffer4[m] = pvArg[k + m];
                                         }
                                         k += 3;
                                         builder2.Append(BitConverter.ToInt32(buffer4, 0).ToString("X8"));
                                     }
                                     else
                                     {
                                         builder2.Append(pvArg[k].ToString("X2"));
                                     }
                                 }
                             }
                             package2.strText = builder2.ToString();
                             string str4 = "";
                             string str5 = package2.ToXmlString(base.CalOrderId(base.WorkId, newOrderId), info.SimNum, SendBase.m_ProtocolName, (int) commMode_0, "SendRawPackage", ref str4);
                             response.ResultCode = SendBase.CarCmdSend.icar_SendCmdXML(base.WorkId, newOrderId, info.SimNum, SendBase.m_ProtocolName, (int) package2.OrderCode, (int) commMode_0, str5);
                         }
                         else
                         {
                             string str6 = "";
                             string str7 = simpleCmd_0.ToXmlString(base.CalOrderId(base.WorkId, newOrderId), info.SimNum, SendBase.m_ProtocolName, (int) commMode_0, "SimpleCmd", ref str6);
                             response.ResultCode = SendBase.CarCmdSend.icar_SendCmdXML(base.WorkId, newOrderId, info.SimNum, SendBase.m_ProtocolName, (int) simpleCmd_0.OrderCode, (int) commMode_0, str7);
                         }
                     }
                     else
                     {
                         response.ResultCode = SendBase.CarCmdSend.icar_SendRawPackage(base.WorkId, newOrderId, info.SimNum, simpleCmd_0.CmdCode, ref objectArg, commMode_0);
                     }
                     if (response.ResultCode != 0L)
                     {
                         base.WriteError(base.WorkId.ToString(), info.SimNum, simpleCmd_0.OrderCode.ToString());
                     }
                 }
             }
             catch (Exception exception)
             {
                 response.ErrorMsg = "下发消息指令时发生错误,错误详细信息:" + exception.Message;
                 base.log.WriteError(base.errMsg, exception);
             }
         }
         return response;
     }
     response.ResultCode = -1L;
     response.ErrorMsg = "下发参数为空!";
     return response;
 }
Esempio n. 13
0
 public DataTable GetReplayData(string string_0, string string_1, string string_2, int int_0, int int_1, int int_2, int int_3, string string_3, string string_4)
 {
     DataTable table = this.method_2();
     try
     {
         new TrackReplay();
         int num = int_0;
         DataTable table2 = this.method_0(string_0, string_1, string_2, num, int_1, int_2, 0);
         DataView defaultView = table2.DefaultView;
         int num2 = 0;
         int num3 = 0;
         long num4 = 0L;
         int result = 0;
         string str = string.Empty;
         string str2 = string.Empty;
         CarAlarmType type = new CarAlarmType();
         Car car = new Car();
         for (int i = 0; i < defaultView.Count; i++)
         {
             DataRow row = table.NewRow();
             row["CarNum"] = defaultView[i]["carNum"].ToString();
             row["CarId"] = defaultView[i]["carid"].ToString();
             row["Longitude"] = defaultView[i]["Longitude"].ToString();
             row["Latitude"] = defaultView[i]["Latitude"].ToString();
             row["Speed"] = defaultView[i]["speed"].ToString();
             str = Convert.ToString(defaultView[i]["SimNum"]);
             num2 = Convert.ToInt32(defaultView[i]["reserved"]);
             row["Reserved"] = num2;
             if (num2 == 0x28b)
             {
                 row["Reserved"] = "是";
             }
             else
             {
                 row["Reserved"] = "否";
             }
             num3 = Convert.ToInt32(defaultView[i]["CarStatu"]);
             if (table2.Columns.Contains("CarStatuEx"))
             {
                 num4 = long.Parse(defaultView[i]["CarStatuEx"].ToString());
             }
             str2 = AlamStatus.GetStatusNameByCarStatu((long) num3) + AlamStatus.GetStatusNameByCarStatuExt(num4) + type.GetCustAlarmName(str, num3);
             float num7 = float.Parse(defaultView[i]["distanceDiff"].ToString()) / 1000f;
             if (num7 < 0f)
             {
                 num7 = 0f;
             }
             row["Distance"] = string.Format("{0:F2}", num7);
             row["GpsTime"] = defaultView[i]["gpstime"].ToString();
             row["CarStatusList"] = str2;
             row["CarStatus"] = AlamStatus.IsAlarmReport(num2) ? 1 : 2;
             row["AlarmType"] = type.GetAlarmTypeValue(string_2, num3, num4);
             int.TryParse(defaultView[i]["TransportStatus"].ToString(), out result);
             row["IsFill"] = (result == 3) ? 1 : 0;
             row["GpsValid"] = car.isPosStatus(num3) ? 1 : 0;
             row["AccOn"] = ((num3 & 0x4000) == 0) ? 0 : 1;
             row["Direct"] = defaultView[i]["Direct"].ToString();
             table.Rows.Add(row);
         }
         return table;
     }
     catch (Exception exception)
     {
         ErrorMsg msg = new ErrorMsg("TrackReplay", "GetTrackData", exception.Message);
         new LogHelper().WriteError(msg);
         DataRow row2 = table.NewRow();
         table.Clear();
         row2["Error"] = exception.Message;
         row2["Hand"] = string_3;
         table.Rows.Add(row2);
         return table;
     }
 }