/// <summary> Called to save a pdu into the database </summary> /// <param name="dataTransaction"></param> /// <param name="logKey"></param> /// <param name="smscServiceId"></param> /// <param name="pduDirectionType"></param> /// <param name="commandLength"></param> /// <param name="commandSet"></param> /// <param name="commandStatus"></param> /// <param name="sequenceNumber"></param> /// <param name="details"></param> /// <param name="pduDataBlocks"></param> /// <returns> long </returns> public static Guid? Insert(DataTransaction dataTransaction, string logKey, int smscServiceId, PduDirectionTypes pduDirectionType, long commandLength, CommandSet commandSet, CommandStatus commandStatus, long sequenceNumber, List<PduPropertyDetail> details, List<byte[]> pduDataBlocks) { Guid? pduHeaderId = null; // Prepare the database call using (DbCommand dbCommand = dataTransaction.GetStoredProcCommand("spSMPP_Pdu_Insert")) { // Prepare the call dataTransaction.AddInParameterString(dbCommand, "LogKey", logKey); dataTransaction.AddInParameterInteger(dbCommand, "SMSCServiceID", smscServiceId); dataTransaction.AddInParameterShort(dbCommand, "Direction", (short) pduDirectionType); dataTransaction.AddInParameterLong(dbCommand, "CommandLength", commandLength); dataTransaction.AddInParameterString(dbCommand, "CommandId", commandSet.ToString()); dataTransaction.AddInParameterString(dbCommand, "CommandStatusId", commandStatus.ToString()); dataTransaction.AddInParameterLong(dbCommand, "SequenceNumber", sequenceNumber); dataTransaction.AddInParameterTable(dbCommand, "PduPropertyDetails", new PduPropertyDetails(details)); dataTransaction.AddInParameterTable(dbCommand, "PduDataBlocks", new SMSCPduDataBlocks(pduDataBlocks)); dataTransaction.AddOutParameterGuid(dbCommand, "PduHeaderId"); dataTransaction.ExecuteNonQuery(dbCommand); pduHeaderId = dataTransaction.GetParameterValueGuid(dbCommand, "PduHeaderId"); } return pduHeaderId; }
/// <summary> Called to save a pdu into the database </summary> /// <param name="dataTransaction"></param> /// <param name="logKey"></param> /// <param name="smscServiceId"></param> /// <param name="pduDirectionType"></param> /// <param name="commandLength"></param> /// <param name="commandSet"></param> /// <param name="commandStatus"></param> /// <param name="sequenceNumber"></param> /// <param name="details"></param> /// <param name="pduDataBlocks"></param> /// <returns> long </returns> public static Guid?Insert(DataTransaction dataTransaction, string logKey, int smscServiceId, PduDirectionTypes pduDirectionType, long commandLength, CommandSet commandSet, CommandStatus commandStatus, long sequenceNumber, List <PduPropertyDetail> details, List <byte[]> pduDataBlocks) { Guid?pduHeaderId = null; // Prepare the database call using (DbCommand dbCommand = dataTransaction.GetStoredProcCommand("spSMPP_Pdu_Insert")) { // Prepare the call dataTransaction.AddInParameterString(dbCommand, "LogKey", logKey); dataTransaction.AddInParameterInteger(dbCommand, "SMSCServiceID", smscServiceId); dataTransaction.AddInParameterShort(dbCommand, "Direction", (short)pduDirectionType); dataTransaction.AddInParameterLong(dbCommand, "CommandLength", commandLength); dataTransaction.AddInParameterString(dbCommand, "CommandId", commandSet.ToString()); dataTransaction.AddInParameterString(dbCommand, "CommandStatusId", commandStatus.ToString()); dataTransaction.AddInParameterLong(dbCommand, "SequenceNumber", sequenceNumber); dataTransaction.AddInParameterTable(dbCommand, "PduPropertyDetails", new PduPropertyDetails(details)); dataTransaction.AddInParameterTable(dbCommand, "PduDataBlocks", new SMSCPduDataBlocks(pduDataBlocks)); dataTransaction.AddOutParameterGuid(dbCommand, "PduHeaderId"); dataTransaction.ExecuteNonQuery(dbCommand); pduHeaderId = dataTransaction.GetParameterValueGuid(dbCommand, "PduHeaderId"); } return(pduHeaderId); }
public static StatusCode ToStatusCode(CommandStatus commandStatus) { StatusCode code; if (!Enum.TryParse(commandStatus.ToString(), out code)) { int csindex = (int)commandStatus; code = csindex > 4000 ? StatusCode.SmppClient_UnknownError : StatusCode.Esme_SystemError; } return(code); }
void Update() { //dropObjects.options.Clear(); textVision.text = sm.getStringVisionInformation(); textSmell.text = sm.getStringSmellInformation(); textHearing.text = sm.getStringHearInformation(); textTaste.text = sm.getStringTasteInformation(); textTouch.text = sm.getStringTouchInformation(); textSpeech.text = robotHProp.getSoundDetail(); Toggle auxSmellParToogle = groupToggleSmellParticles.GetActive(); sensesPanel.gameObject.active = groupToggleSensesPanel.GetActive(); if (auxSmellParToogle != null && auxSmellParToogle.gameObject.name.Equals(Constants.TGGL_SMLLPON)) { activateSmellParticles(true); } else { activateSmellParticles(false); } if (scm != null) { commandTextField.text = scm.getAtCommandName(); CommandStatus commandStatus = scm.getCurrentCommandStatus(); statusTextField.text = commandStatus.ToString(); switch (commandStatus) { case CommandStatus.Success: statusPanel.GetComponent <Image>().color = successColor; break; case CommandStatus.Running: statusPanel.GetComponent <Image>().color = runningColor; break; case CommandStatus.Fail: statusPanel.GetComponent <Image>().color = failColor; break; default: break; } } }
private void OnMarshalledResult(CommandStatus status) { this.groupBoxParameters.Enabled = true; this.textBoxStatus.Text = status.ToString(); }