public virtual bool SetData(COPSMsg message) { bool result = true; trace.Write(TraceLevel.Debug, "CDatM::SetData"); try { if (message == null) { throw new ArgumentNullException(nameof(message), "Invalid input parameter"); } m_iTelType = message.GetCmd(); m_dtHdDate = message.GetAtt().GetOPSDate("dtx", m_dtHdDate); m_iIdentifier = message.GetAtt().GetInt("id", m_iIdentifier); m_iPriority = message.GetAtt().GetInt("pty", m_iPriority); m_iInUnit = message.GetElm().GetInt("u", m_iInUnit); } catch (Exception error) { trace.Write(TraceLevel.Error, error.ToLogString()); } return(result); }
public override bool SetData(COPSMsg message) { bool result = true; trace.Write(TraceLevel.Debug, "CDatM1::SetData"); try { if (message == null) { throw new ArgumentNullException(nameof(message), "Invalid input parameter"); } base.SetData(message); m_strInVehicleID = message.GetElm().GetOPSPlate("m"); m_dtInDate = message.GetElm().GetOPSDate("d", m_dtInDate); m_iInOperType = message.GetElm().GetInt("o", m_iInOperType); m_iInArticleDef = message.GetElm().GetInt("ad", m_iInArticleDef); m_iInArticle = message.GetElm().GetInt("a", m_iInArticle); m_iInGroup = message.GetElm().GetInt("g", m_iInGroup); m_lOutImportAcc = message.GetElm().GetLong("q", m_lOutImportAcc); m_iPaymentType = message.GetElm().GetInt("pt", m_iPaymentType); m_dtInMaxDate = message.GetElm().GetOPSDate("d2", m_dtInMaxDate); int iInComputeTimeLimits = 0; iInComputeTimeLimits = message.GetElm().GetInt("cdl", iInComputeTimeLimits); m_bInComputeTimeLimits = (iInComputeTimeLimits == 1); int iRoundMoney = 1; iRoundMoney = message.GetElm().GetInt("rmon", iRoundMoney); m_bRoundMoney = (iRoundMoney == 1); m_lInMaxTime = message.GetElm().GetLong("t", m_lInMaxTime); int iInHistOnlyWithSamePaymentType = 0; iInHistOnlyWithSamePaymentType = message.GetElm().GetInt("spt", iInHistOnlyWithSamePaymentType); m_bInHistOnlyWithSamePaymentType = (iInHistOnlyWithSamePaymentType == 1); int iMinEqMax = 0; iMinEqMax = message.GetElm().GetInt("mineqmax", iMinEqMax); m_bMinEqMax = (iMinEqMax == 1); m_lInAddFreeMinutesQuantity = message.GetElm().GetLong("aft", m_lInAddFreeMinutesQuantity); m_lInAddFreeMoneyQuantity = message.GetElm().GetLong("afm", m_lInAddFreeMoneyQuantity); int iTemp = 0; iTemp = message.GetElm().GetInt("ctst", iTemp); m_bInCalculateTimeSteps = (iTemp != 0); iTemp = 0; iTemp = message.GetElm().GetInt("cqst", iTemp); m_bInCalculateQuantitySteps = (iTemp != 0); if (m_bInCalculateQuantitySteps) { m_bInCalculateTimeSteps = false; } m_iInCalculateSteps_StepValue = message.GetElm().GetInt("stv", m_iInCalculateSteps_StepValue); } catch (Exception error) { trace.Write(TraceLevel.Error, error.ToLogString()); } return(result); }