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

            FR_L5SO_GASPwABIfPC_1135_Array functionReturn = new FR_L5SO_GASPwABIfPC_1135_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_AllShippmentPositions_with_ArticleBasicInfo_for_PickingControl", ex);
            }
            return(functionReturn);
        }
        protected static FR_L5SO_GASPwABIfPC_1135_Array Execute(DbConnection Connection, DbTransaction Transaction, P_L5SO_GASPwABIfPC_1135 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            #region UserCode
            var returnValue          = new FR_L5SO_GASPwABIfPC_1135_Array();
            var articlesFromPosition = new List <Guid>();

            var paramP = new CL5_APOLogistic_ShippingOrder.Atomic.Retrieval.P_L5SO_GASPfPC_1725
            {
                ShippmentHeaderID = Parameter.ShippmentHeaderID
            };
            var positions = cls_Get_All_ShippmentPositions_for_PickingControl.Invoke(Connection, Transaction, paramP, securityTicket).Result.ToList();
            foreach (var item in positions)
            {
                articlesFromPosition.Add(item.CMN_PRO_Product_RefID);
            }

            #region Get Article
            var paramA = new CL3_Articles.Atomic.Retrieval.P_L3AR_GAfAL_0942
            {
                ProductID_List = articlesFromPosition.Distinct().ToArray()
            };
            var articles = new List <L3AR_GAfAL_0942>();
            if (paramA.ProductID_List.Length > 0)
            {
                articles = CL3_Articles.Atomic.Retrieval.cls_Get_Articles_for_ArticleList.Invoke(Connection, Transaction, paramA, securityTicket).Result.ToList();
            }
            #endregion

            var results = new List <L5SO_GASPwABIfPC_1135>();
            foreach (var pos in positions)
            {
                var positionArticles = new L5SO_GASPwABIfPC_1135();
                positionArticles.Position = pos;
                positionArticles.Articles = articles.Where(ar => ar.CMN_PRO_ProductID == pos.CMN_PRO_Product_RefID).Single();
                results.Add(positionArticles);
            }

            returnValue.Result = results.ToArray();
            return(returnValue);

            #endregion UserCode
        }