当前位置: 首页>>代码示例>>C#>>正文


C# CmdParam.ToString方法代码示例

本文整理汇总了C#中ParamLibrary.Application.CmdParam.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# CmdParam.ToString方法的具体用法?C# CmdParam.ToString怎么用?C# CmdParam.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ParamLibrary.Application.CmdParam的用法示例。


在下文中一共展示了CmdParam.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: icar_SendCmdXML

 public long icar_SendCmdXML(CmdParam.ParamType ParamType, string SimNum, string CarId, string CarPw, string ProtocolName, CmdParam.CommMode CommMode, TxtMsg MsgContext, string sMsgType)
 {
     long num = (long)0;
     this.logMsg.FunctionName = "icar_SendTxtMsg";
     this.logMsg.Msg = string.Concat("发送:类型-", ParamType.ToString(), ",车辆-", SimNum);
     string str = string.Concat("消息类型-", MsgContext.MsgType.ToString(), string.Format(",{0}-", sMsgType), MsgContext.strMsg);
     LogMsg logMsg = this.logMsg;
     logMsg.Msg = string.Concat(logMsg.Msg, ",", str);
     this.log.WriteLog(this.logMsg);
     if (!this.isStartCommon())
     {
         num = (long)-1;
     }
     else
     {
         try
         {
             int newOrderId = DownData.CarCmdSend.GetNewOrderId();
             if (ProtocolName != "JTBGPS")
             {
                 num = DownData.CarCmdSend.icar_SendTxtMsg(this.WorkId, newOrderId, SimNum, MsgContext.MsgType, MsgContext.strMsg);
             }
             else
             {
                 MsgContext.TransformCode = CmdParam.TrafficProtocolCodeExchange((int)MsgContext.MsgType);
                 string str1 = "";
                 string xmlString = MsgContext.ToXmlString(this.CalOrderId(this.WorkId, newOrderId), SimNum, ProtocolName, (int)CommMode, "SimpleCmd", ref str1);
                 num = DownData.CarCmdSend.icar_SendCmdXML(this.WorkId, newOrderId, SimNum, ProtocolName, (int)MsgContext.MsgType, (int)CommMode, xmlString);
             }
             if (num == (long)0)
             {
                 ReadDataFromDB.execSaveGpsLogTable(this.WorkId, newOrderId, CarId, (int)MsgContext.MsgType, MsgContext.strMsg);
             }
             if (num != (long)0)
             {
                 AlarmMsg alarmMsg = new AlarmMsg()
                 {
                     ClassName = "GpsPicDownData",
                     FunctionName = "icar_SendTxtMsg"
                 };
                 object[] workId = new object[] { "workid-", this.WorkId, ",simNum-", SimNum, ",strMsg-", MsgContext.strMsg };
                 alarmMsg.AlarmText = string.Concat(workId);
                 alarmMsg.Code = num.ToString();
                 this.log.WriteAlarm(alarmMsg);
             }
         }
         catch (Exception exception1)
         {
             Exception exception = exception1;
             ErrorMsg errorMsg = new ErrorMsg()
             {
                 ClassName = "GpsPicDownData",
                 ErrorText = "下发消息指令时发生错误!"
             };
             this.log.WriteError(errorMsg, exception);
             num = (long)-1;
         }
     }
     return num;
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:60,代码来源:DownData.cs

示例2: icar_RemoteDial

 public Response icar_RemoteDial(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, RemoteDial remoteDial_0)
 {
     Response response = new Response();
     base.logMsg.FunctionName = "icar_RemoteDial";
     base.logMsg.Msg = "发送:类型-" + paramType_0.ToString() + ",车辆-" + string_1 + ",指令-" + remoteDial_0.OrderCode.ToString();
     string str = "电话号码-" + remoteDial_0.strPhone + ",消息-" + remoteDial_0.strMsg;
     base.logMsg.Msg = base.logMsg.Msg + "," + str;
     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;
     }
     string strErrorMsg = string.Empty;
     if (remoteDial_0.CheckData(out strErrorMsg) != 0)
     {
         response.ErrorMsg = strErrorMsg;
         return response;
     }
     if (base.isStartCommon())
     {
         foreach (Bussiness.CarInfo info in base.carInfoList)
         {
             try
             {
                 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, "发送", remoteDial_0.OrderCode.ToString(), "等待", "", str);
                 response.ResultCode = SendBase.CarCmdSend.icar_RemoteDial(base.WorkId, newOrderId, info.SimNum, remoteDial_0.Phone.ToString(), remoteDial_0.strMsg);
                 if (response.ResultCode != 0L)
                 {
                     base.alarmMsg.FunctionName = "icar_RemoteDial";
                     base.alarmMsg.AlarmText = string.Concat(new object[] { "workid-", base.WorkId, ",simNum-", info.SimNum, ",OrderCode-", remoteDial_0.OrderCode });
                     base.alarmMsg.Code = response.ResultCode.ToString();
                     base.log.WriteAlarm(base.alarmMsg);
                 }
                 response.ResultCode = 0L;
             }
             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;
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:53,代码来源:DownData.cs

示例3: JTBPlatformPostResponse

 public JTBPlatformPostResponse(CmdParam.OrderCode OrderCode, string[] responseId)
 {
     this.InitializeComponent();
     this.Text = OrderCode.ToString();
     this.OrderCode = OrderCode;
     this.repid = responseId[0];
     this.repContent = ((int)responseId.Length >= 1 ? responseId[1] : "");
     this.repType = ((int)responseId.Length >= 3 ? responseId[2] : "1");
     this.repObjectID = ((int)responseId.Length >= 4 ? responseId[3] : "");
     string[] strArrays = this.repContent.Split(new char[] { ';' }, 2, StringSplitOptions.RemoveEmptyEntries);
     this.OBJECT_ID = strArrays[0];
     string[] strArrays2 = strArrays[1].Split(new string[] { ":=" }, 2, StringSplitOptions.RemoveEmptyEntries);
     this.strAsk = strArrays2[1].Split(new char[] { '|' }, 2, StringSplitOptions.RemoveEmptyEntries)[0];
     this.txtPostContent.Text = strArrays2[1];
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:15,代码来源:JTBPlatformPostResponse.cs

示例4: JTBCallPoliceSuperviseReponsion

        public JTBCallPoliceSuperviseReponsion(CmdParam.OrderCode OrderCode, string ReponseID, string CarNum)
        {
            this.InitializeComponent();

            string[] strArray6 = ReponseID.ToString().Replace("报警督办ID:", "").Split(new char[] { ',' });

            for (int i = 1; i < strArray6.Length; i++)
            {
                txtDetails.AppendText(strArray6[i] + "\r\n");
            }
            this.OrderCode = OrderCode;
            this.Text = OrderCode.ToString();
            //this._repid = ReponseID;
            this._repid = strArray6[0];
            this._carNum = CarNum;
            this.cmbResolve.SelectedIndex = 0;
            DataRow[] rowArray = MainForm.myCarList.AllCar.Select("CarNum='" + CarNum + "'");
            this.txtCarNum.Text = CarNum;
            if ((rowArray != null) && (rowArray.Length > 0))
            {
                this.txtSimNum.Text = rowArray[0]["SimNum"].ToString();
            }
        }
开发者ID:lexzh,项目名称:Myproject,代码行数:23,代码来源:JTBCallPoliceSuperviseReponsion.cs

示例5: icar_SendTxtMsg

 public Response icar_SendTxtMsg(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, TxtMsg txtMsg_0)
 {
     Response response = new Response();
     base.logMsg.FunctionName = "icar_SendTxtMsg";
     base.logMsg.Msg = "发送:类型-" + paramType_0.ToString() + ",车辆-" + string_1 + ",指令-" + txtMsg_0.OrderCode.ToString();
     string str = "信息-" + txtMsg_0.strMsg + ",信息类型-" + txtMsg_0.MsgType.ToString();
     base.logMsg.Msg = base.logMsg.Msg + "," + str;
     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;
     }
     string strErrorMsg = string.Empty;
     if (txtMsg_0.CheckData(out strErrorMsg) != 0)
     {
         response.ErrorMsg = strErrorMsg;
         return response;
     }
     if (base.isStartCommon())
     {
         string str3 = null;
         foreach (Bussiness.CarInfo info in base.carInfoList)
         {
             try
             {
                 int newOrderId = SendBase.CarCmdSend.GetNewOrderId();
                 switch (((int) txtMsg_0.MsgType))
                 {
                     case 240:
                     case 0xf1:
                     case 0xf2:
                     case 0xf3:
                         str3 = txtMsg_0.MsgType.ToString();
                         break;
                 }
                 base.SaveCommandParameterToGpsLogTable(newOrderId.ToString() + "|" + info.CarId.ToString() + ";", str3);
                 string orderIDParam = response.OrderIDParam;
                 response.OrderIDParam = orderIDParam + newOrderId.ToString() + "|" + info.CarId.ToString() + ";";
                 base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", txtMsg_0.OrderCode.ToString(), "等待", "", str);
                 if (info.ProtocolName == SendBase.m_ProtocolName)
                 {
                     txtMsg_0.TransformCode = CmdParam.TrafficProtocolCodeExchange((int) txtMsg_0.MsgType);
                     string conntent = "";
                     string str5 = txtMsg_0.ToXmlString(base.CalOrderId(base.WorkId, newOrderId), info.SimNum, SendBase.m_ProtocolName, (int) commMode_0, "SimpleCmd", ref conntent);
                     response.ResultCode = SendBase.CarCmdSend.icar_SendCmdXML(base.WorkId, newOrderId, info.SimNum, SendBase.m_ProtocolName, txtMsg_0.TransformCode, (int) commMode_0, str5);
                 }
                 else
                 {
                     response.ResultCode = SendBase.CarCmdSend.icar_SendTxtMsg(base.WorkId, newOrderId, info.SimNum, txtMsg_0.MsgType, txtMsg_0.strMsg);
                 }
                 if (response.ResultCode != 0L)
                 {
                     base.alarmMsg.FunctionName = "icar_SendTxtMsg";
                     base.alarmMsg.AlarmText = string.Concat(new object[] { "workid-", base.WorkId, ",simNum-", info.SimNum, ",OrderCode-", txtMsg_0.OrderCode });
                     base.alarmMsg.Code = response.ResultCode.ToString();
                     base.log.WriteAlarm(base.alarmMsg);
                 }
                 response.ResultCode = 0L;
             }
             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;
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:73,代码来源:DownData.cs

示例6: icar_StopCapture

 public Response icar_StopCapture(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, StopCapture stopCapture_0)
 {
     Response response = new Response();
     base.logMsg.FunctionName = "icar_SetCaptureEx";
     base.logMsg.Msg = "发送:类型-" + paramType_0.ToString() + ",车辆-" + string_1;
     string str = string.Empty;
     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;
     }
     string strErrorMsg = string.Empty;
     if (stopCapture_0.CheckData(out strErrorMsg) != 0)
     {
         response.ErrorMsg = strErrorMsg;
         return response;
     }
     if (base.isStartCommon())
     {
         foreach (Bussiness.CarInfo info in base.carInfoList)
         {
             try
             {
                 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, "发送", stopCapture_0.OrderCode.ToString(), "等待", "", str);
                 if (info.ProtocolName == SendBase.m_ProtocolName)
                 {
                     string conntent = "";
                     stopCapture_0.TransformCode = CmdParam.TrafficProtocolCodeExchange2((int) stopCapture_0.OrderCode);
                     string str4 = stopCapture_0.ToXmlString(base.CalOrderId(base.WorkId, newOrderId), info.SimNum, SendBase.m_ProtocolName, (int) commMode_0, "SimpleCmd", ref conntent);
                     response.ResultCode = SendBase.CarCmdSend.icar_SendCmdXML(base.WorkId, newOrderId, info.SimNum, SendBase.m_ProtocolName, stopCapture_0.TransformCode, (int) commMode_0, str4);
                 }
                 else
                 {
                     response.ResultCode = SendBase.CarCmdSend.icar_StopCapture(base.WorkId, newOrderId, info.SimNum, stopCapture_0.CamerasID, stopCapture_0.Flag1, stopCapture_0.Flag2);
                 }
                 if (response.ResultCode != 0L)
                 {
                     base.alarmMsg.FunctionName = "icar_StopCapture";
                     base.alarmMsg.AlarmText = string.Concat(new object[] { "workid-", base.WorkId, ",simNum-", info.SimNum, ",OrderCode-", stopCapture_0.OrderCode });
                     base.alarmMsg.Code = response.ResultCode.ToString();
                     base.log.WriteAlarm(base.alarmMsg);
                 }
                 else
                 {
                     new Car().UpdateGisCarCommandTime(info.CarId);
                 }
                 response.ResultCode = 0L;
             }
             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;
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:66,代码来源:DownData.cs

示例7: icar_SelMultiPathAlarm

 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;
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:79,代码来源:DownData.cs

示例8: icar_SelMultiPathAlarm

 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;
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:86,代码来源:DownDataFJYD.cs

示例9: icar_StopAlarmDeal

 public Response icar_StopAlarmDeal(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, TrafficALarmHandle trafficALarmHandle_0, object object_0)
 {
     Response response = new Response();
     base.logMsg.FunctionName = "icar_StopAlarmDeal";
     base.logMsg.Msg = "发送:类型-" + paramType_0.ToString() + ",车辆-" + string_1 + ",指令-报警解除(交通部)";
     base.log.WriteLog(base.logMsg);
     response.ResultCode = 0L;
     if (!base.CheckCar(paramType_0, string_1, string_2))
     {
         response.ErrorMsg = base.ErrorMsg;
         return response;
     }
     if (!base.isStartCommon())
     {
         response.ErrorMsg = base.ErrorMsg;
         return response;
     }
     foreach (Bussiness.CarInfo info in base.carInfoList)
     {
         try
         {
             int newOrderId = SendBase.CarCmdSend.GetNewOrderId();
             trafficALarmHandle_0.OrderID = newOrderId;
             trafficALarmHandle_0.WorkID = base.WorkId;
             trafficALarmHandle_0.CarId = info.CarId;
             if (!string.IsNullOrEmpty(trafficALarmHandle_0.GpsTime))
             {
                 Alarm.InsertAlarmResult(trafficALarmHandle_0);
             }
             if ((trafficALarmHandle_0.iProcMode == 1) && (info.ProtocolName != SendBase.m_ProtocolName))
             {
                 SimpleCmd cmd = object_0 as SimpleCmd;
                 string paramDisc = cmd.GetParamDisc();
                 object pvArg = cmd.pvArg;
                 base.AddUpDataLog(newOrderId, info.CarNum, cmd.OrderCode.ToString(), paramDisc);
                 response.ResultCode = SendBase.CarCmdSend.icar_SimpleCmd(base.WorkId, newOrderId, info.SimNum, cmd.CmdCode, ref pvArg);
             }
             else
             {
                 string conntent = "";
                 CmdParamBase base2 = object_0 as CmdParamBase;
                 if (base2 == null)
                 {
                     return response;
                 }
                 if (trafficALarmHandle_0.iProcMode == 4)
                 {
                     base2.TransformCode = CmdParam.TrafficProtocolCodeExchange((int) ((TxtMsg) base2).MsgType);
                 }
                 else
                 {
                     base2.TransformCode = CmdParam.TrafficProtocolCodeExchange2((int) base2.OrderCode);
                 }
                 string str3 = base2.ToXmlString(base.CalOrderId(base.WorkId, newOrderId), info.SimNum, SendBase.m_ProtocolName, (int) commMode_0, "SimpleCmd", ref conntent);
                 base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", base2.OrderCode.ToString(), "等待", "", this.method_6(trafficALarmHandle_0.iProcMode, info.SimNum.ToString()));
                 response.ResultCode = SendBase.CarCmdSend.icar_SendCmdXML(base.WorkId, newOrderId, info.SimNum, SendBase.m_ProtocolName, base2.TransformCode, (int) commMode_0, str3);
             }
         }
         catch (Exception exception)
         {
             response.ErrorMsg = exception.Message;
             response.ResultCode = -1L;
             return response;
         }
     }
     return response;
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:67,代码来源:DownData.cs

示例10: icar_SetCustomAlarmer

 public Response icar_SetCustomAlarmer(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, AlarmEntity alarmEntity_0)
 {
     Response response = new Response();
     base.logMsg.FunctionName = "icar_SetCustomAlarmer";
     base.logMsg.Msg = "发送:类型-" + paramType_0.ToString() + ",车辆-" + string_1 + ",指令-" + alarmEntity_0.OrderCode.ToString();
     string str = "配置自定义报警器";
     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;
     }
     string strErrorMsg = string.Empty;
     if (alarmEntity_0.CheckData(out strErrorMsg) != 0)
     {
         response.ErrorMsg = strErrorMsg;
         return response;
     }
     if (base.isStartCommon())
     {
         foreach (Bussiness.CarInfo info in base.carInfoList)
         {
             try
             {
                 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, "发送", alarmEntity_0.OrderCode.ToString(), "等待", "", str);
                 new Car().InsertCustAlarmIntoGisCar(info.CarId, base.WorkId.ToString(), newOrderId, alarmEntity_0.CarAlarmSwitch, alarmEntity_0.CarAlarmFlag, alarmEntity_0.CarShowAlarm, alarmEntity_0.Level, alarmEntity_0.CustName);
                 response.ResultCode = SendBase.CarCmdSend.icar_SetCustomAlarmer(base.WorkId, newOrderId, info.SimNum, (uint) alarmEntity_0.CarAlarmSwitch, (uint) alarmEntity_0.CarAlarmFlag, (uint) alarmEntity_0.Level);
                 if (response.ResultCode != 0L)
                 {
                     base.alarmMsg.FunctionName = "icar_SetCustomAlarmer";
                     base.alarmMsg.AlarmText = string.Concat(new object[] { "workid-", base.WorkId, ",simNum-", info.SimNum, ",OrderCode-", alarmEntity_0.OrderCode });
                     base.alarmMsg.Code = response.ResultCode.ToString();
                     base.log.WriteAlarm(base.alarmMsg);
                 }
                 response.ResultCode = 0L;
             }
             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;
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:53,代码来源:DownData.cs

示例11: icar_RemoteUpdate

 public Response icar_RemoteUpdate(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0)
 {
     byte[] buffer;
     Response response = new Response();
     base.logMsg.FunctionName = "icar_RemoteUpdate";
     base.logMsg.Msg = "发送:类型-" + paramType_0.ToString() + ",车辆-" + string_1;
     string str = string.Empty;
     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;
     }
     string updateFileVersion = Const.UpdateFileVersion;
     string updateFilePath = Const.UpdateFilePath;
     FileStream input = null;
     BinaryReader reader = null;
     try
     {
         if (!string.IsNullOrEmpty(updateFilePath) && !string.IsNullOrEmpty(updateFilePath))
         {
             if (!File.Exists(updateFilePath))
             {
                 base.ErrorMsg = "不存在的升级文件!";
                 response.ErrorMsg = base.errMsg.ErrorText = "不存在的升级文件:FilePath-" + updateFilePath + ",FileVersion-" + updateFileVersion;
                 base.log.WriteError(base.errMsg);
                 return response;
             }
             input = new FileStream(updateFilePath, FileMode.Open);
             reader = new BinaryReader(input);
             buffer = new byte[input.Length];
             reader.Read(buffer, 0, buffer.Length);
             base.logMsg.Msg = string.Concat(new object[] { "升级文件大小:", buffer.Length, ",文件路径-", updateFilePath, ",文件版本-", updateFileVersion });
             base.log.WriteLog(base.logMsg);
         }
         else
         {
             base.ErrorMsg = "升级文件信息错误!";
             response.ErrorMsg = base.errMsg.ErrorText = "升级文件信息错误:FilePath-" + updateFilePath + ",FileVersion-" + updateFileVersion;
             base.log.WriteError(base.errMsg);
             return response;
         }
     }
     catch (Exception exception)
     {
         base.ErrorMsg = "读取升级文件信息错误!";
         response.ErrorMsg = base.errMsg.ErrorText = "读取升级文件信息错误:FilePath-" + updateFilePath + ",FileVersion-" + updateFileVersion;
         base.log.WriteError(base.errMsg, exception);
         return response;
     }
     finally
     {
         if (input != null)
         {
             input.Close();
         }
         if (reader != null)
         {
             reader.Close();
         }
     }
     object obj2 = buffer;
     if (base.isStartCommon())
     {
         foreach (Bussiness.CarInfo info in base.carInfoList)
         {
             try
             {
                 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, "发送", "远程升级车台软件", "等待", "", str);
                 response.ResultCode = SendBase.CarCmdSend.icar_RemoteUpdate(base.WorkId, newOrderId, info.SimNum, updateFileVersion, ref obj2);
                 if (response.ResultCode != 0L)
                 {
                     base.alarmMsg.FunctionName = "icar_RemoteUpdate";
                     base.alarmMsg.AlarmText = string.Concat(new object[] { "workid-", base.WorkId, ",simNum-", info.SimNum });
                     base.alarmMsg.Code = response.ResultCode.ToString();
                     base.log.WriteAlarm(base.alarmMsg);
                 }
                 response.ResultCode = 0L;
             }
             catch (Exception exception2)
             {
                 response.ErrorMsg = base.ErrorMsg = base.errMsg.ErrorText = "下发消息指令时发生错误!";
                 base.log.WriteError(base.errMsg, exception2);
             }
         }
         return response;
     }
     response.ErrorMsg = base.ErrorMsg;
     return response;
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:95,代码来源:DownData.cs

示例12: icar_SetBlackBox

 public Response icar_SetBlackBox(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, BlackBox blackBox_0)
 {
     Response response = new Response();
     base.logMsg.FunctionName = "icar_SetBlackBox";
     base.logMsg.Msg = "发送:类型-" + paramType_0.ToString() + ",车辆-" + string_1 + ",指令-" + blackBox_0.OrderCode.ToString();
     string str = string.Concat(new object[] { "拐点补偿-", blackBox_0.IsAutoCalArc, ",自动上传数据-", blackBox_0.Flag, ",间隔-", blackBox_0.ReportCycle, ",汇报方式-", blackBox_0.ReportType });
     base.logMsg.Msg = base.logMsg.Msg + "," + str;
     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;
     }
     string strErrorMsg = string.Empty;
     if (blackBox_0.CheckData(out strErrorMsg) != 0)
     {
         response.ErrorMsg = strErrorMsg;
         return response;
     }
     if (base.isStartCommon())
     {
         foreach (Bussiness.CarInfo info in base.carInfoList)
         {
             try
             {
                 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, "发送", blackBox_0.OrderCode.ToString(), "等待", "", str);
                 response.ResultCode = SendBase.CarCmdSend.icar_SetBlackBox(base.WorkId, newOrderId, info.SimNum, blackBox_0.ReportType, blackBox_0.ReportCycle, blackBox_0.IsAutoCalArc, blackBox_0.Flag);
                 if (response.ResultCode != 0L)
                 {
                     base.alarmMsg.FunctionName = "icar_SetPosReport";
                     base.alarmMsg.AlarmText = string.Concat(new object[] { "workid-", base.WorkId, ",simNum-", info.SimNum, ",OrderCode-", blackBox_0.OrderCode });
                     base.alarmMsg.Code = response.ResultCode.ToString();
                     base.log.WriteAlarm(base.alarmMsg);
                 }
                 response.ResultCode = 0L;
             }
             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;
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:53,代码来源:DownData.cs

示例13: icar_SetCaptureEx

 public Response icar_SetCaptureEx(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, CaptureEx captureEx_0)
 {
     Response response = new Response();
     base.logMsg.FunctionName = "icar_SetCaptureEx";
     base.logMsg.Msg = "发送:类型-" + paramType_0.ToString() + ",车辆-" + string_1;
     string str = string.Concat(new object[] {
         "是否多帧-", captureEx_0.IsMulitFramebool, ",拍摄类型:", captureEx_0.Type, ",监控次数-", captureEx_0.Times, ",间隔时间-", captureEx_0.Interval * 0.1, ",图像质量-", captureEx_0.Quality, ",图像亮度-", captureEx_0.Brightness, ",图像对比度-", captureEx_0.Contrast, ",图像饱和度-", captureEx_0.Saturation,
         ",图像色度", captureEx_0.Chroma, ",停车是否拍照-", captureEx_0.IsCapWhenStop, ",图像分辨率-", captureEx_0.PSize
      });
     if (!string.IsNullOrEmpty(captureEx_0.BeginTime) && !string.IsNullOrEmpty(captureEx_0.EndTime))
     {
         string str5 = str;
         str = str5 + ",时间段拍照启始时间-" + captureEx_0.BeginTime + ",时间段拍照结束时间-" + captureEx_0.EndTime;
     }
     base.logMsg.Msg = base.logMsg.Msg + "," + str;
     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;
     }
     string strErrorMsg = string.Empty;
     if (captureEx_0.CheckData(out strErrorMsg) != 0)
     {
         response.ErrorMsg = strErrorMsg;
         return response;
     }
     if (base.isStartCommon())
     {
         foreach (Bussiness.CarInfo info in base.carInfoList)
         {
             try
             {
                 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, "发送", captureEx_0.OrderCode.ToString(), "等待", "", str);
                 if ((info.ProtocolName == SendBase.m_ProtocolName) && (captureEx_0.protocolType == CarProtocolType.交通厅))
                 {
                     string conntent = "";
                     captureEx_0.TransformCode = CmdParam.TrafficProtocolCodeExchange2((int) captureEx_0.OrderCode);
                     if (captureEx_0.Quality == 0)
                     {
                         captureEx_0.Quality = 1;
                     }
                     if (captureEx_0.CaptureCache == 1)
                     {
                         captureEx_0.CaptureCache = -1;
                     }
                     string str4 = captureEx_0.ToXmlString(base.CalOrderId(base.WorkId, newOrderId), info.SimNum, SendBase.m_ProtocolName, (int) commMode_0, "SetCapture", ref conntent);
                     response.ResultCode = SendBase.CarCmdSend.icar_SendCmdXML(base.WorkId, newOrderId, info.SimNum, SendBase.m_ProtocolName, captureEx_0.TransformCode, (int) commMode_0, str4);
                 }
                 else
                 {
                     captureEx_0.Quality = byte.Parse(((10 - captureEx_0.Quality) / 2).ToString());
                     captureEx_0.CaptureCache = 0;
                     if (!string.IsNullOrEmpty(captureEx_0.BeginTime) && !string.IsNullOrEmpty(captureEx_0.EndTime))
                     {
                         response.ResultCode = SendBase.CarCmdSend.icar_SetCaptureExWithTime(base.WorkId, newOrderId, info.SimNum, captureEx_0.IsMultiFrame, captureEx_0.CamerasID, captureEx_0.CaptureFlag, captureEx_0.CaptureCache, captureEx_0.Times, captureEx_0.Interval, captureEx_0.Quality, captureEx_0.Brightness, captureEx_0.Contrast, captureEx_0.Saturation, captureEx_0.Chroma, captureEx_0.CapWhenStop, captureEx_0.BeginTime, captureEx_0.EndTime);
                     }
                     else
                     {
                         response.ResultCode = SendBase.CarCmdSend.icar_SetCaptureEx(base.WorkId, newOrderId, info.SimNum, captureEx_0.IsMultiFrame, captureEx_0.CamerasID, captureEx_0.CaptureFlag, captureEx_0.CaptureCache, captureEx_0.Times, captureEx_0.Interval, captureEx_0.Quality, captureEx_0.Brightness, captureEx_0.Contrast, captureEx_0.Saturation, captureEx_0.Chroma, captureEx_0.CapWhenStop);
                     }
                 }
                 if (response.ResultCode != 0L)
                 {
                     base.alarmMsg.FunctionName = "icar_SetCaptureEx";
                     base.alarmMsg.AlarmText = string.Concat(new object[] { "workid-", base.WorkId, ",simNum-", info.SimNum, ",OrderCode-", captureEx_0.OrderCode });
                     base.alarmMsg.Code = response.ResultCode.ToString();
                     base.log.WriteAlarm(base.alarmMsg);
                 }
                 else
                 {
                     new Car().InsertIntoCaptureParam(info.CarId, captureEx_0);
                 }
                 response.ResultCode = 0L;
             }
             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;
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:92,代码来源:DownData.cs

示例14: InsertAlarmInfo

 private void InsertAlarmInfo(DataRow dr, CmdParam.CarAlarmState carAlarmState, int AddMsgType)
 {
     try
     {
         int num = 0;
         string empty = string.Empty;
         int num1 = Convert.ToInt32(dr["carstatu"]);
         long num2 = (long)0;
         num2 = (dr["carstatuex"] == DBNull.Value || dr["carstatuex"].ToString().Equals("") ? 2251799813685248L : 2251799813685248L | Convert.ToInt64(dr["carstatuex"]));
         int num3 = 1154;
         int num4 = 65;
         string str = string.Empty;
         string str1 = dr["AddMsgTxt"].ToString();
         string str2 = null;
         bool flag = false;
         string str3 = null;
         int num5 = 0;
         try
         {
             SqlParameter[] sqlParameter = new SqlParameter[] { new SqlParameter("@wrkid", (object)num), new SqlParameter("@orderid", dr["OrderId"]), new SqlParameter("@userid", empty), new SqlParameter("@telephone", dr["telephone"]), new SqlParameter("@msgType", (object)num4), new SqlParameter("@recetime", dr["ReceTime"]), new SqlParameter("@gpstime", dr["GpsTime"]), new SqlParameter("@starCondition", dr["StarCondition"]), new SqlParameter("@starNum", dr["StarNum"]), new SqlParameter("@carStatu", (object)num1), new SqlParameter("@carStatuEx", (object)num2), new SqlParameter("@carCondition", dr["CarCondition"]), new SqlParameter("@Longitude", dr["Longitude"]), new SqlParameter("@Latitude", dr["Latitude"]), new SqlParameter("@direct", dr["Direct"]), new SqlParameter("@speed", dr["Speed"]), new SqlParameter("@Reserved", (object)num3), new SqlParameter("@TransportStatus", dr["TransportStatus"]), new SqlParameter("@Accelerration", dr["Accelerration"]), new SqlParameter("@Altitude", dr["Altitude"]), new SqlParameter("@DistanceDiff", dr["DistanceDiff"]), new SqlParameter("@commflag", dr["CommFlag"]), new SqlParameter("@addType", (object)AddMsgType), new SqlParameter("@addTxt", str1), new SqlParameter("@DutyStr", str2), new SqlParameter("@isPic", (object)flag), new SqlParameter("@pic", str3), new SqlParameter("@alarmInfo", str), new SqlParameter("@cameraID", (object)num5) };
             string str4 = "GpsPicServer_Alarm_Insert";
             string str5 = "GpsPicServer_RealTime_Insert";
             if (AddMsgType != -99997)
             {
                 int num6 = SqlDataAccess.insertBySp(str4, sqlParameter);
                 if (num6 > 0)
                 {
                     LogMsg logMsg = new LogMsg("PlatformAlarmPathAlarm", "InsertAlarmInfo", "");
                     string[] strArrays = new string[] { "车载电话为:", dr["telephone"].ToString(), "的平台检测", carAlarmState.ToString(), "报警报文已插入gpsrecebuffer" };
                     logMsg.Msg = string.Concat(strArrays);
                     this.logHelper.WriteLog(logMsg);
                 }
                 else
                 {
                     ErrorMsg errorMsg = new ErrorMsg("PlatformAlarmPathAlarm", "InsertAlarmInfo", string.Concat("将平台检测", carAlarmState.ToString(), "报警报文插入gpsrecbuffer表错误,返回值!", num6.ToString()));
                     this.logHelper.WriteError(errorMsg);
                 }
             }
             int num7 = SqlDataAccess.insertBySp(str5, sqlParameter);
             if (num7 > 0)
             {
                 string[] strArrays1 = new string[] { "车载电话为:", dr["telephone"].ToString(), "的平台检测", carAlarmState.ToString(), "报警报文已插入gpsrecerealtime" };
                 LogMsg logMsg1 = new LogMsg("PlatformAlarmPathAlarm", "InsertAlarmInfo", string.Concat(strArrays1));
                 string[] strArrays2 = new string[] { "车载电话为:", dr["telephone"].ToString(), "的平台检测", carAlarmState.ToString(), "报警报文已插入gpsrecerealtime" };
                 logMsg1.Msg = string.Concat(strArrays2);
                 this.logHelper.WriteLog(logMsg1);
             }
             else
             {
                 ErrorMsg errorMsg1 = new ErrorMsg("PlatformAlarmPathAlarm", "InsertAlarmInfo", string.Concat("将平台检测", carAlarmState.ToString(), "报警报文插入gpsrecerealtime_buffer表发生错误,返回值!", num7.ToString()));
                 this.logHelper.WriteError(errorMsg1);
             }
         }
         catch (Exception exception1)
         {
             Exception exception = exception1;
             string[] strArrays3 = new string[] { "车载电话为:", dr["telephone"].ToString(), "的平台检测", carAlarmState.ToString(), "报警报文插入数据库发生错误! 信息:", exception.Message };
             ErrorMsg errorMsg2 = new ErrorMsg("PlatformAlarmPathAlarm", "InsertAlarmInfo", string.Concat(strArrays3));
             this.logHelper.WriteError(errorMsg2);
         }
     }
     catch (Exception exception3)
     {
         Exception exception2 = exception3;
         LogHelper logHelper = new LogHelper();
         ErrorMsg errorMsg3 = new ErrorMsg("PlatformAlarmPathAlarm", "InsertAlarmInfo", string.Concat("将平台检测", carAlarmState.ToString(), "报警报文插入gpsrecbuffer表 、gpsrecerealtime_buffer表发生错误!", exception2.Message));
         logHelper.WriteError(errorMsg3);
     }
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:69,代码来源:PlatformAlarmPathAlarm.cs

示例15: icar_SetTextMsg

 public Response icar_SetTextMsg(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, TxtMsg txtMsg_0, string string_3, string string_4)
 {
     Response response = new Response();
     if (string.IsNullOrEmpty(string_1))
     {
         DataTable table = base.GetCarInfoByArea(txtMsg_0.LLon, txtMsg_0.LLat, txtMsg_0.RLon, txtMsg_0.RLat, string_3, string_4);
         if ((table != null) && (table.Rows.Count > 0))
         {
             foreach (DataRow row in table.Rows)
             {
                 string_1 = string_1 + row["telephone"].ToString() + ",";
             }
             string_1 = string_1.Trim(new char[] { ',' });
         }
         if (string.IsNullOrEmpty(string_1))
         {
             response.ErrorMsg = "没有存在下发的车辆!";
             return response;
         }
     }
     base.logMsg.FunctionName = "icar_SetTextMsg";
     base.logMsg.Msg = "发送:类型-" + paramType_0.ToString() + ",车辆-" + string_1 + ",指令-" + txtMsg_0.OrderCode.ToString();
     string msg = base.logMsg.Msg;
     base.log.WriteLog(base.logMsg);
     if (!base.CheckCar(paramType_0, string_1, string_2))
     {
         response.ErrorMsg = base.ErrorMsg;
         return response;
     }
     if (!base.isStartCommon())
     {
         response.ErrorMsg = base.ErrorMsg;
         return response;
     }
     new Car();
     foreach (Bussiness.CarInfo info in base.carInfoList)
     {
         try
         {
             int newOrderId = SendBase.CarCmdSend.GetNewOrderId();
             if (info.ProtocolName == SendBase.m_ProtocolName)
             {
                 base.SaveCmdParm(newOrderId.ToString() + "|" + info.CarId.ToString() + ";");
                 base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", txtMsg_0.OrderCode.ToString(), "等待", "", msg);
                 string orderIDParam = response.OrderIDParam;
                 response.OrderIDParam = orderIDParam + newOrderId.ToString() + "|" + info.CarId.ToString() + ";";
                 string conntent = "";
                 string str3 = txtMsg_0.ToXmlString(base.CalOrderId(base.WorkId, newOrderId), info.SimNum, SendBase.m_ProtocolName, (int) commMode_0, "SetTextMsg", ref conntent);
                 response.ResultCode = SendBase.CarCmdSend.icar_SendCmdXML(base.WorkId, newOrderId, info.SimNum, SendBase.m_ProtocolName, (int) txtMsg_0.OrderCode, (int) commMode_0, str3);
             }
             else if ((txtMsg_0.OrderCode == CmdParam.OrderCode.电召指令) && (txtMsg_0.MsgType == CmdParam.MsgType.电召信息))
             {
                 base.SaveCmdParm(newOrderId.ToString() + "|" + info.CarId.ToString() + ";");
                 base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", txtMsg_0.OrderCode.ToString(), "等待", "", msg);
                 string str4 = base.WorkId.ToString() + SendBase.CarCmdSend.GetNewOrderId().ToString();
                 response.SvcContext = str4;
                 string str6 = response.OrderIDParam;
                 response.OrderIDParam = str6 + newOrderId.ToString() + "|" + info.CarId.ToString() + ";";
                 object obj2 = this.method_9(info.SimNum, txtMsg_0.TelNumber, txtMsg_0.strMsg, str4, txtMsg_0.Way, txtMsg_0.LLon + "," + txtMsg_0.LLat + "," + txtMsg_0.RLon + "," + txtMsg_0.RLat);
                 response.ResultCode = SendBase.CarCmdSend.icar_SetCommonCmd(base.WorkId, newOrderId, info.SimNum, CmdParam.CmdCode.电召指令, ref obj2, commMode_0);
             }
             else if (txtMsg_0.OrderCode == CmdParam.OrderCode.拨打电话号码)
             {
                 base.SaveCmdParm(newOrderId.ToString() + "|" + info.CarId.ToString() + ";");
                 base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", txtMsg_0.OrderCode.ToString(), "等待", "", msg);
                 string str7 = response.OrderIDParam;
                 response.OrderIDParam = str7 + newOrderId.ToString() + "|" + info.CarId.ToString() + ";";
                 SimpleCmd cmd = new SimpleCmd {
                     OrderCode = CmdParam.OrderCode.抢答确认指令
                 };
                 new ArrayList();
                 string[] strArray = new string[] { txtMsg_0.sPhone, txtMsg_0.TelNumber, txtMsg_0.strMsg, txtMsg_0.Orderid, txtMsg_0.sCarName };
                 object obj3 = this.method_6(strArray);
                 response.ResultCode = SendBase.CarCmdSend.icar_SetCommonCmd(base.WorkId, newOrderId, info.SimNum, cmd.CmdCode, ref obj3, commMode_0);
             }
             else
             {
                 base.userInfo.DownCommd.AddCarNewLogData(newOrderId, info.CarNum, "发送", txtMsg_0.OrderCode.ToString(), "失败", "", "错误描述:该车辆终端不支持此操作。");
                 response.ErrorMsg = "终端不支持该协议";
             }
         }
         catch (Exception exception)
         {
             response.ErrorMsg = exception.Message;
             return response;
         }
     }
     return response;
 }
开发者ID:lexzh,项目名称:Myproject,代码行数:89,代码来源:DownDataFJYD.cs


注:本文中的ParamLibrary.Application.CmdParam.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。