///<summary>
        /// Method Invocation of wrapper classes
        ///<summary>
        protected static FR_L5SO_GRIfPID_1455_Array Invoke(DbConnection Connection, DbTransaction Transaction, string ConnectionString, P_L5SO_GRIfPID_1455 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            bool cleanupConnection  = Connection == null;
            bool cleanupTransaction = Transaction == null;

            FR_L5SO_GRIfPID_1455_Array functionReturn = new FR_L5SO_GRIfPID_1455_Array();

            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_Get_ReservationsInfo_for_ProductID", ex);
            }
            return(functionReturn);
        }
        protected static FR_L5SO_GRIfPID_1455_Array Execute(DbConnection Connection, DbTransaction Transaction, P_L5SO_GRIfPID_1455 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            //Leave UserCode region to enable user code saving
            #region UserCode
            var returnValue = new FR_L5SO_GRIfPID_1455_Array();
            //Put your code here

            List <L5SO_GRIfPID_1455> retVal = new List <L5SO_GRIfPID_1455>();

            var allReservation = cls_Get_Reservations_for_ProductID.Invoke(Connection, Transaction, new P_L5SO_GRfPID_1516 {
                ProductID = Parameter.ProductID
            }, securityTicket).Result;

            P_L3WH_GASCQfPL_1239 shelfContentQuantitiesParam = new P_L3WH_GASCQfPL_1239();
            shelfContentQuantitiesParam.ProductIDList    = new Guid[1];
            shelfContentQuantitiesParam.ProductIDList[0] = Parameter.ProductID;
            var shelfContentQuantities = cls_Get_All_ShelfContent_Quantities_for_ProductListID.Invoke(Connection, Transaction, shelfContentQuantitiesParam, securityTicket).Result;

            foreach (var reservation in allReservation)
            {
                L5SO_GRIfPID_1455 retItem = new L5SO_GRIfPID_1455();
                retItem.CMN_BPT_BusinessParticipantID = reservation.CMN_BPT_BusinessParticipantID;
                retItem.CompanyName_Line1             = reservation.CompanyName_Line1;
                retItem.LOG_SHP_Shipment_HeaderID     = reservation.LOG_SHP_Shipment_HeaderID;
                retItem.LOG_SHP_Shipment_PositionID   = reservation.LOG_SHP_Shipment_PositionID;
                retItem.PositionQuantity      = shelfContentQuantities.Select(x => x.Sum_Quantity_Current).FirstOrDefault();
                retItem.ReservedQuantity      = shelfContentQuantities.Select(x => x.Sum_R_ReservedQuantity).FirstOrDefault();
                retItem.ShipmentHeader_Number = reservation.ShipmentHeader_Number;

                retVal.Add(retItem);
            }

            returnValue.Result = retVal.ToArray();

            return(returnValue);

            #endregion UserCode
        }