public void MovementOut_01(string MHId, string TransactionId, MovementOut_01Doc aMovementOut_01Doc) { this.Invoke("MovementOut_01", new object[] { MHId, TransactionId, aMovementOut_01Doc }); return; }
public ArrayList InternalProcess(System.String MapiOutId) { ArrayList aMovementOut_01DocList = new ArrayList(); IDataReader r = db.ExecuteReader( "select" + " MAPI_OUT_MOVM_OUT_01.OPERATIONALCODE" + ",MAPI_OUT_MOVM_OUT_01.MOVEMENTORDERIDENTITY" + ",MAPI_OUT_MOVM_OUT_01.MOVEMENTORDERTYPE" + ",MAPI_OUT_MOVM_OUT_01.PRODUCTNUMBER" + ",MAPI_OUT_MOVM_OUT_01.TOLOCATIONADDRESS" + ",MAPI_OUT_MOVM_OUT_01.MOVEMENTPRIORITY" + ",MAPI_OUT_MOVM_OUT_01.PRODUCTIONLOTIDENTITY" + ",MAPI_OUT_MOVM_OUT_01.ITEMLOADIDENTITY" + " from MAPI_OUT_MOVM_OUT_01" + " where MAPI_OUT_MOVM_OUT_01.MAPI_OUT_ID = '" + MapiOutId + "'"); while (r.Read()) { MovementOut_01Doc aMovementOut_01Doc = new MovementOut_01Doc(); aMovementOut_01Doc.OPCODE = "1"; if (r.IsDBNull(0)) { aMovementOut_01Doc.OperationalCode = null; } else { aMovementOut_01Doc.OperationalCode = r.GetString(0); } if (r.IsDBNull(1)) { aMovementOut_01Doc.MovementOrderIdentity = null; } else { aMovementOut_01Doc.MovementOrderIdentity = r.GetInt32(1); } if (r.IsDBNull(2)) { aMovementOut_01Doc.MovementOrderType = null; } else { aMovementOut_01Doc.MovementOrderType = r.GetString(2); } if (r.IsDBNull(3)) { aMovementOut_01Doc.ProductNumber = null; } else { aMovementOut_01Doc.ProductNumber = r.GetString(3); } if (r.IsDBNull(4)) { aMovementOut_01Doc.ToLocationAddress = null; } else { aMovementOut_01Doc.ToLocationAddress = r.GetString(4); } if (r.IsDBNull(5)) { aMovementOut_01Doc.MovementPriority = null; } else { aMovementOut_01Doc.MovementPriority = r.GetInt32(5); } if (r.IsDBNull(6)) { aMovementOut_01Doc.ProductionLotIdentity = null; } else { aMovementOut_01Doc.ProductionLotIdentity = r.GetString(6); } if (r.IsDBNull(7)) { aMovementOut_01Doc.ItemLoadIdentity = null; } else { aMovementOut_01Doc.ItemLoadIdentity = r.GetString(7); } aMovementOut_01DocList.Add(aMovementOut_01Doc); } r.Close(); return(aMovementOut_01DocList); }
public System.IAsyncResult BeginMovementOut_01(string MHId, string TransactionId, MovementOut_01Doc aMovementOut_01Doc, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("MovementOut_01", new object[] { MHId, TransactionId, aMovementOut_01Doc }, callback, asyncState)); }
private string HandleMessageType(MAPI_OUT transfer) { string error = ""; try { Tracing.TraceEvent(TraceEventType.Verbose, 0, String.Format(" use Url = {0}", transfer.URL)); if (String.IsNullOrEmpty(transfer.URL)) { return("unknown url for " + transfer.MHID + " - " + transfer.MSG_ID); } sender.Url = transfer.URL; switch (transfer.MSG_ID) { case "MOVM_IN_01": { MovementIn_01Select handler = new MovementIn_01Select(this.db); MovementIn_01Doc message = handler.Process(transfer.MAPI_OUT_ID); if (message == null) { error = string.Format("{0} obj missing.", transfer.MSG_ID); } else { sender.MovementIn_01(transfer.MHID, transfer.MAPI_OUT_ID, message); } break; } case "MOVM_OUT_01": { MovementOut_01Select handler = new MovementOut_01Select(this.db); MovementOut_01Doc message = handler.Process(transfer.MAPI_OUT_ID); if (message == null) { error = string.Format("{0} obj missing.", transfer.MSG_ID); } else { sender.MovementOut_01(transfer.MHID, transfer.MAPI_OUT_ID, message); } break; } case "PRODUCT_01": { Product_01Select handler = new Product_01Select(this.db); Product_01Doc message = handler.Process(transfer.MAPI_OUT_ID); if (message == null) { error = string.Format("{0} obj missing.", transfer.MSG_ID); } else { sender.Product_01(transfer.MHID, transfer.MAPI_OUT_ID, message); } break; } case "STAT_UPD_01": { StatusUpdate_01Select handler = new StatusUpdate_01Select(this.db); StatusUpdate_01Doc message = handler.Process(transfer.MAPI_OUT_ID); if (message == null) { error = string.Format("{0} obj missing.", transfer.MSG_ID); } else { sender.StatusUpdate_01(transfer.MHID, transfer.MAPI_OUT_ID, message); } break; } default: error = string.Format("transfer type {0} not found", transfer.MSG_ID); break; } // switch (transfer.MSG_ID) } catch (UriFormatException e) { error = "The format of the URI is invalid. URL: " + transfer.URL + ", MAPI_OUT_ID: " + transfer.MAPI_OUT_ID + Environment.NewLine + e.Message + Environment.NewLine + e.StackTrace; } catch (InvalidOperationException e) { error = "Failed to reach " + sender.Url + " for " + transfer.MSG_ID + Environment.NewLine + e.Message + Environment.NewLine + e.StackTrace; } catch (System.Web.Services.Protocols.SoapException e) { error = "Interface mismatch. URL: " + sender.Url + ", MSG_ID: " + transfer.MSG_ID + ", MAPI_OUT_ID: " + transfer.MAPI_OUT_ID + Environment.NewLine + e.Message + Environment.NewLine + e.StackTrace; } catch (Exception e) { error = "Unexpected error. URL: " + sender.Url + ", MSG_ID: " + transfer.MSG_ID + ", MAPI_OUT_ID: " + transfer.MAPI_OUT_ID + Environment.NewLine + e.Message + Environment.NewLine + e.StackTrace; } return(error); }