Exemple #1
0
 public Response icar_SetCallLimit(CmdParam.ParamType paramType_0, string string_1, string string_2, CmdParam.CommMode commMode_0, CallLimit callLimit_0)
 {
     Response response = new Response();
     base.logMsg.FunctionName = "icar_SetCallLimit";
     base.logMsg.Msg = "发送:类型-" + paramType_0.ToString() + ",车辆-" + string_1 + ",指令-" + callLimit_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 (callLimit_0.CheckData(out strErrorMsg) != 0)
     {
         response.ErrorMsg = strErrorMsg;
         return response;
     }
     if (base.isStartCommon())
     {
         foreach (Bussiness.CarInfo info in base.carInfoList)
         {
             try
             {
                 object callInPhone = callLimit_0.CallInPhone;
                 object callOutPhone = callLimit_0.CallOutPhone;
                 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, "发送", callLimit_0.OrderCode.ToString(), "等待", "", str);
                 SqlDataAccess access = new SqlDataAccess();
                 string str3 = string.Format(" insert into GisCarInfoTable_Tmp(carID, wrkID, orderID, carControlType, carControlMask, callInLst, callOutLst) values({0}, {1}, {2}, {3}, {4}, '{5}','{6}')", new object[] { info.CarId, base.WorkId, newOrderId, callLimit_0.FlagValue, callLimit_0.FlagMask, callLimit_0.CallInPhoneString, callLimit_0.CallOutPhoneString });
                 int num2 = access.insertBySql(str3);
                 if (num2 != 1)
                 {
                     base.alarmMsg.FunctionName = "icar_SetCallLimit";
                     base.alarmMsg.AlarmText = string.Concat(new object[] { "workid-", base.WorkId, ",simNum-", info.SimNum, ",OrderCode-", callLimit_0.OrderCode });
                     base.alarmMsg.Code = num2.ToString();
                     base.log.WriteAlarm(base.alarmMsg);
                 }
                 long num3 = SendBase.CarCmdSend.icar_SetCallLimit(base.WorkId, newOrderId, info.SimNum, callLimit_0.FlagValue, callLimit_0.FlagMask, ref callInPhone, ref callOutPhone);
                 if (num3 != 0L)
                 {
                     base.alarmMsg.FunctionName = "icar_SetCallLimit";
                     base.alarmMsg.AlarmText = string.Concat(new object[] { "workid-", base.WorkId, ",simNum-", info.SimNum, ",OrderCode-", callLimit_0.OrderCode });
                     base.alarmMsg.Code = num3.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;
 }
Exemple #2
0
 private CallLimit GetCallLimit()
 {
     CallLimit limit = new CallLimit();
     ArrayList list = new ArrayList();
     ArrayList list2 = new ArrayList();
     if (this.rdoCallInOpen.Checked)
     {
         list.Add(1);
         list2.Add(1);
     }
     else if (this.rdoCallInLimit.Checked)
     {
         list2.Add(1);
     }
     if (this.rdoCallOutOpen.Checked)
     {
         list.Add(2);
         list2.Add(2);
     }
     else if (this.rdoCallOutLimit.Checked)
     {
         list2.Add(2);
     }
     if (this.rdoRushOpen.Checked)
     {
         list.Add(4);
         list2.Add(4);
     }
     else if (this.rdoRushClose.Checked)
     {
         list2.Add(4);
     }
     limit.FlagValueList = list;
     limit.FlagMaskList = list2;
     if (this.txtCallIn.Lines.Length > m_iPhoneMaxCnt)
     {
         MessageBox.Show(string.Format("限制呼入电话号码列表的个数大于{0}个", m_iPhoneMaxCnt.ToString()));
         this.txtCallIn.Focus();
         return null;
     }
     if (this.txtCallOut.Lines.Length > m_iPhoneMaxCnt)
     {
         MessageBox.Show(string.Format("限制呼出电话号码列表的个数大于{0}个", m_iPhoneMaxCnt.ToString()));
         this.txtCallOut.Focus();
         return null;
     }
     foreach (string str in this.txtCallIn.Lines)
     {
         if ((str.Length <= 0) || (str.Length > 15))
         {
             MessageBox.Show("允许呼入列表中,电话号码的长度大于15,或者等于0");
             this.txtCallIn.Focus();
             return null;
         }
         limit.CallInList.Add(str);
     }
     foreach (string str2 in this.txtCallOut.Lines)
     {
         if ((str2.Length <= 0) || (str2.Length > 15))
         {
             MessageBox.Show("允许呼出列表中,电话号码的长度大于15,或者等于0");
             this.txtCallOut.Focus();
             return null;
         }
         limit.CallOutList.Add(str2);
     }
     limit.OrderCode = CmdParam.OrderCode.设置车台呼叫限制;
     return limit;
 }
Exemple #3
0
 public static Response DownData_SetCallLimit(CmdParam.ParamType ParamType, string CarValues, string CarPw, CmdParam.CommMode CommMode, CallLimit callLimit)
 {
     Response response;
     if (RemotingClient.app == null)
     {
         return RemotingClient.reResult;
     }
     try
     {
         response = RemotingClient.app.DownData_SetCallLimit(ParamType, CarValues, CarPw, CommMode, callLimit);
     }
     catch (Exception exception)
     {
         Record.execFileRecord("设置呼叫限制", exception.Message);
         response = RemotingClient.reResult;
     }
     return response;
 }
Exemple #4
0
 private void btnCall_Click(object sender, EventArgs e)
 {
     try
     {
         CallLimit callLimit = new CallLimit();
         callLimit = this.GetCallLimit();
         if (callLimit != null)
         {
             this.reResult = RemotingClient.DownData_SetCallLimit(CmdParam.ParamType.CarId, this.sCarId, "", CmdParam.CommMode.未知方式, callLimit);
             if (this.reResult.ResultCode != 0L)
             {
                 MessageBox.Show(this.reResult.ErrorMsg);
             }
             else
             {
                 this.execSaveCmnParam(this.tpCallParam);
                 this.showSucceedMsg();
             }
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message);
     }
 }
Exemple #5
0
 public Response DownData_SetCallLimit(CmdParam.ParamType ParamType, string CarValues, string CarPw, CmdParam.CommMode CommMode, CallLimit callLimit)
 {
     try
     {
         return this.myDownData.icar_SetCallLimit(ParamType, CarValues, CarPw, CommMode, callLimit);
     }
     catch (Exception exception)
     {
         this.m_LogHelper.WriteError(new ErrorMsg("RemotingServer", "DownData_SetCallLimit", exception.ToString()));
         return new Response();
     }
 }