コード例 #1
0
ファイル: DownData.cs プロジェクト: lexzh/Myproject
 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;
 }
コード例 #2
0
ファイル: RemotingClient.cs プロジェクト: lexzh/Myproject
 public static Response DownData_RemoteDial(CmdParam.ParamType ParamType, string CarValues, string CarPw, CmdParam.CommMode CommMode, RemoteDial remoteDial)
 {
     Response response;
     if (RemotingClient.app == null)
     {
         return RemotingClient.reResult;
     }
     try
     {
         response = RemotingClient.app.DownData_RemoteDial(ParamType, CarValues, CarPw, CommMode, remoteDial);
     }
     catch (Exception exception)
     {
         Record.execFileRecord("点对点电召", exception.Message);
         response = RemotingClient.reResult;
     }
     return response;
 }
コード例 #3
0
ファイル: RemotingServer.cs プロジェクト: lexzh/Myproject
 public Response DownData_RemoteDial(CmdParam.ParamType ParamType, string CarValues, string CarPw, CmdParam.CommMode CommMode, RemoteDial remoteDial)
 {
     try
     {
         return this.myDownData.icar_RemoteDial(ParamType, CarValues, CarPw, CommMode, remoteDial);
     }
     catch (Exception exception)
     {
         this.m_LogHelper.WriteError(new ErrorMsg("RemotingServer", "DownData_RemoteDial", exception.ToString()));
         return new Response();
     }
 }