protected static FR_Guid Execute(DbConnection Connection, DbTransaction Transaction, P_L5SO_CSOS_1148 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            #region UserCode
            var returnValue = new FR_Guid();

            var shipmentHeader = new CL1_LOG_SHP.ORM_LOG_SHP_Shipment_Header();
            shipmentHeader.Load(Connection, Transaction, Parameter.LOG_SHP_Shipment_HeaderID);

            if (Parameter.IsReadyForPicking != null)
            {
                shipmentHeader.IsReadyForPicking = (Boolean)Parameter.IsReadyForPicking;

                var param = new P_L2SH_SSSH_1210();
                param.ShipmentHeaderID     = Parameter.LOG_SHP_Shipment_HeaderID;
                param.ShipmentHeaderStatus = EShipmentStatus.ReadyForPicking;

                cls_Save_ShipmentStatusHistory.Invoke(Connection, Transaction, param, securityTicket);
            }
            if (Parameter.IsPartiallyReadyForPicking != null)
            {
                shipmentHeader.IsPartiallyReadyForPicking = (Boolean)Parameter.IsPartiallyReadyForPicking;

                var param = new P_L2SH_SSSH_1210();
                param.ShipmentHeaderID     = Parameter.LOG_SHP_Shipment_HeaderID;
                param.ShipmentHeaderStatus = EShipmentStatus.PartiallyReadyForPicking;

                cls_Save_ShipmentStatusHistory.Invoke(Connection, Transaction, param, securityTicket);
            }
            if (Parameter.IsManuallyCleared_ForPicking != null)
            {
                shipmentHeader.IsManuallyCleared_ForPicking = (Boolean)Parameter.IsManuallyCleared_ForPicking;

                var param = new P_L2SH_SSSH_1210();
                param.ShipmentHeaderID     = Parameter.LOG_SHP_Shipment_HeaderID;
                param.ShipmentHeaderStatus = EShipmentStatus.ManuallyClearedForPicking;

                cls_Save_ShipmentStatusHistory.Invoke(Connection, Transaction, param, securityTicket);
            }
            if (Parameter.HasPickingStarted != null)
            {
                shipmentHeader.HasPickingStarted = (Boolean)Parameter.HasPickingStarted;

                var param = new P_L2SH_SSSH_1210();
                param.ShipmentHeaderID     = Parameter.LOG_SHP_Shipment_HeaderID;
                param.ShipmentHeaderStatus = EShipmentStatus.PickingStarted;

                cls_Save_ShipmentStatusHistory.Invoke(Connection, Transaction, param, securityTicket);
            }
            if (Parameter.HasPickingFinished != null)
            {
                shipmentHeader.HasPickingFinished = (Boolean)Parameter.HasPickingFinished;

                var param = new P_L2SH_SSSH_1210();
                param.ShipmentHeaderID     = Parameter.LOG_SHP_Shipment_HeaderID;
                param.ShipmentHeaderStatus = EShipmentStatus.PickingFinished;

                cls_Save_ShipmentStatusHistory.Invoke(Connection, Transaction, param, securityTicket);
            }
            if (Parameter.IsBilled != null)
            {
                shipmentHeader.IsBilled = (Boolean)Parameter.IsBilled;

                var param = new P_L2SH_SSSH_1210();
                param.ShipmentHeaderID     = Parameter.LOG_SHP_Shipment_HeaderID;
                param.ShipmentHeaderStatus = EShipmentStatus.Billed;

                cls_Save_ShipmentStatusHistory.Invoke(Connection, Transaction, param, securityTicket);
            }

            if (Parameter.IsShipped != null)
            {
                shipmentHeader.IsShipped = (Boolean)Parameter.IsShipped;

                var param = new P_L2SH_SSSH_1210();
                param.ShipmentHeaderID     = Parameter.LOG_SHP_Shipment_HeaderID;
                param.ShipmentHeaderStatus = EShipmentStatus.Shipped;

                cls_Save_ShipmentStatusHistory.Invoke(Connection, Transaction, param, securityTicket);
            }

            if (Parameter.IsDeleted != null)
            {
                var param = new P_L2SH_SSSH_1210();
                param.ShipmentHeaderID     = Parameter.LOG_SHP_Shipment_HeaderID;
                param.ShipmentHeaderStatus = EShipmentStatus.Deleted;

                cls_Save_ShipmentStatusHistory.Invoke(Connection, Transaction, param, securityTicket);
            }

            shipmentHeader.Save(Connection, Transaction);

            return(returnValue);

            #endregion UserCode
        }
 ///<summary>
 /// Invokes the method for the given Connection, and Transaction, leaving them open/not commited if no exceptions occured
 ///<summary>
 public static FR_Guid Invoke(DbConnection Connection, DbTransaction Transaction, P_L5SO_CSOS_1148 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
 {
     return(Invoke(Connection, Transaction, null, Parameter, securityTicket));
 }
        ///<summary>
        /// Method Invocation of wrapper classes
        ///<summary>
        protected static FR_Guid Invoke(DbConnection Connection, DbTransaction Transaction, string ConnectionString, P_L5SO_CSOS_1148 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            bool cleanupConnection  = Connection == null;
            bool cleanupTransaction = Transaction == null;

            FR_Guid functionReturn = new FR_Guid();

            try
            {
                if (cleanupConnection == true)
                {
                    Connection = CSV2Core_MySQL.Support.DBSQLSupport.CreateConnection(ConnectionString);
                    Connection.Open();
                }
                if (cleanupTransaction == true)
                {
                    Transaction = Connection.BeginTransaction();
                }

                functionReturn = Execute(Connection, Transaction, Parameter, securityTicket);

                #region Cleanup Connection/Transaction
                //Commit the transaction
                if (cleanupTransaction == true)
                {
                    Transaction.Commit();
                }
                //Close the connection
                if (cleanupConnection == true)
                {
                    Connection.Close();
                }
                #endregion
            }
            catch (Exception ex)
            {
                try
                {
                    if (cleanupTransaction == true && Transaction != null)
                    {
                        Transaction.Rollback();
                    }
                }
                catch { }

                try
                {
                    if (cleanupConnection == true && Connection != null)
                    {
                        Connection.Close();
                    }
                }
                catch { }

                throw new Exception("Exception occured in method cls_Change_ShippigOrderHeader_Status", ex);
            }
            return(functionReturn);
        }
 ///<summary>
 /// Opens the connection/transaction for the given connectionString, and closes them when complete
 ///<summary>
 public static FR_Guid Invoke(string ConnectionString, P_L5SO_CSOS_1148 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
 {
     return(Invoke(null, null, ConnectionString, Parameter, securityTicket));
 }