protected static FR_Guid Execute(DbConnection Connection, DbTransaction Transaction, P_L5SR_PTSfSR Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            #region UserCode
            var returnValue = new FR_Guid();
            var paramQCI    = new P_L5SR_GQCIfRHId_1359()
            {
                HeaderID = Parameter.ReceiptHeaderID
            };

            var qualityControlItems = cls_Get_QualityControlItems_for_ReceiptHeaderID.Invoke(Connection, Transaction, paramQCI, securityTicket).Result;

            Guid[] articleIDs = qualityControlItems.Select(x => x.ProductID).Distinct().ToArray();

            var paramArticleStorage = new P_L3WH_GASfA_1924
            {
                ArticleID_List = articleIDs
            };
            var storages = CL3_Warehouse.Atomic.Retrieval.cls_Get_ArticleStorages_for_ArticleIDList.Invoke(Connection, Transaction, paramArticleStorage, securityTicket).Result.
                           Where(x => x.QLShelfID != Guid.Empty && x.IsPointOfSalesArea == true);

            foreach (var item in qualityControlItems)
            {
                var shelf = storages.FirstOrDefault(x => x.ArticleID == item.ProductID);
                if (shelf == null || shelf.ShelfID == Guid.Empty)
                {
                    continue;
                }

                var query = new CL1_LOG_RCP.ORM_LOG_RCP_Receipt_Position_QualityControlItem.Query
                {
                    LOG_RCP_Receipt_Position_QualityControlItem = item.LOG_RCP_Receipt_Position_QualityControlItem,
                    IsDeleted    = false,
                    Tenant_RefID = securityTicket.TenantID
                };
                var values = new CL1_LOG_RCP.ORM_LOG_RCP_Receipt_Position_QualityControlItem.Query
                {
                    Target_WRH_Shelf_RefID = shelf.ShelfID
                };
                CL1_LOG_RCP.ORM_LOG_RCP_Receipt_Position_QualityControlItem.Query.Update(Connection, Transaction, query, values);
            }

            return(returnValue);

            #endregion UserCode
        }
 ///<summary>
 /// Ivokes the method with the given Connection, leaving it open if no exceptions occured
 ///<summary>
 public static FR_Guid Invoke(DbConnection Connection, P_L5SR_PTSfSR Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
 {
     return(Invoke(Connection, null, null, Parameter, securityTicket));
 }
        ///<summary>
        /// Method Invocation of wrapper classes
        ///<summary>
        protected static FR_Guid Invoke(DbConnection Connection, DbTransaction Transaction, string ConnectionString, P_L5SR_PTSfSR 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_Preload_TargetShelves_for_StockReceipt", ex);
            }
            return(functionReturn);
        }