protected override void btnOK_Click(object sender, EventArgs e) { base.btnOK_Click(sender, e); if (!string.IsNullOrEmpty(base.sValue)) { this.getParam(); if (base.OrderCode == CmdParam.OrderCode.设置超速报警) { base.reResult = RemotingClient.DownData_SetSpeedAlarm(base.ParamType, base.sValue, base.sPw, CmdParam.CommMode.未知方式, this.m_SpeedAlarm); if (base.reResult.ResultCode != 0L) { MessageBox.Show(base.reResult.ErrorMsg); } else { base.DialogResult = DialogResult.OK; } } else { this.appRespone = RemotingClient.DownData_icar_SendRawPackage(this.appRequest, this.pvArg); if (this.appRespone.ResultCode != 0) { MessageBox.Show(this.appRespone.ResultMsg); } else { base.DialogResult = DialogResult.OK; } } } }
public AppRespone icar_SendIOCommand(AppRequest appRequest_0) { AppRespone respone = new AppRespone(); base.logMsg.FunctionName = "icar_SendIOCommand"; this.method_5(appRequest_0); if (this.method_7(appRequest_0, respone)) { int newOrderId = -1; long num2 = -1L; object obj2 = this.method_12(appRequest_0, respone); foreach (CarInfo info in base.carInfoList) { newOrderId = SendBase.CarCmdSend.GetNewOrderId(); try { base.SaveCmdParm(newOrderId.ToString() + "|" + info.CarId.ToString() + ";"); this.method_10(newOrderId, info.CarNum, appRequest_0); num2 = SendBase.CarCmdSend.icar_SendIOCommand(base.WorkId, newOrderId, info.SimNum, CmdParam.IodeviceType.南京通用计价器, ref obj2); if (num2 != 0L) { this.method_6(base.logMsg.FunctionName, info.SimNum, num2, (int)appRequest_0.OrderCode); } } catch (Exception exception) { base.errMsg.ErrorText = "下发消息指令时发生错误!"; base.log.WriteError(base.errMsg, exception); this.method_8(respone, base.errMsg.ErrorText); } } } return(respone); }
private void method_8(AppRespone appRespone_0, string string_1) { appRespone_0.ResultCode = -1; if (!string.IsNullOrEmpty(string_1)) { appRespone_0.ResultMsg = string_1; } }
protected override void btnOK_Click(object sender, EventArgs e) { base.btnOK_Click(sender, e); if (!string.IsNullOrEmpty(base.sValue) && this.getParam()) { this.appRespone = RemotingClient.DownData_icar_SendRawPackage(this.appRequest, this.pvArg); if (this.appRespone.ResultCode != 0) { MessageBox.Show(this.appRespone.ResultMsg); } else { base.DialogResult = DialogResult.OK; } } }
private object method_12(AppRequest appRequest_0, AppRespone appRespone_0) { object obj3; try { Packer packer = new Packer(); return(packer.packData(this.method_11(appRequest_0.ParamCont[0]))); } catch (Exception exception) { base.errMsg.ErrorText = "打包发生错误!"; base.log.WriteError(base.errMsg, exception); this.method_8(appRespone_0, base.errMsg.ErrorText); obj3 = appRespone_0; } return(obj3); }
private bool method_7(AppRequest appRequest_0, AppRespone appRespone_0) { bool flag = true; if (!base.CheckCar(appRequest_0.ParamType, appRequest_0.CarValues, appRequest_0.CarPw)) { flag = false; } if (flag && !base.isStartCommon()) { flag = false; } if (!flag) { this.method_8(appRespone_0, base.ErrorMsg); } return(flag); }
protected override void btnOK_Click(object sender, EventArgs e) { try { base.btnOK_Click(sender, e); if (!string.IsNullOrEmpty(base.sValue)) { this.getParam(); AppRespone respone = RemotingClient.Car_SetCommonCmd_Pass(this.m_appRequest); if (respone.ResultCode != 0) { MessageBox.Show(respone.ResultMsg); } else { base.DialogResult = DialogResult.OK; } } } catch (Exception exception) { MessageBox.Show(exception.Message); } }