protected static FR_L5AR_GABIfAID_0950 Execute(DbConnection Connection, DbTransaction Transaction, P_L5AR_GABIfAID_0950 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            var returnStatus = new FR_L5AR_GABIfAID_0950();

            DbCommand command = Connection.CreateCommand();

            command.Connection  = Connection;
            command.Transaction = Transaction;
            var commandLocation = "CL5_APOAdmin_Articles.Atomic.Retrieval.SQL.cls_Get_ArticleBasicInfo_for_ArticleID.sql";

            command.CommandText = new System.IO.StreamReader(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(commandLocation)).ReadToEnd();
            CSV2Core_MySQL.Support.DBSQLSupport.SetParameter(command, "ticket", securityTicket);
            command.CommandTimeout = QueryTimeout;

            CSV2Core_MySQL.Support.DBSQLSupport.SetParameter(command, "ArticleID", Parameter.ArticleID);



            List <L5AR_GABIfAID_0950_raw> results = new List <L5AR_GABIfAID_0950_raw>();
            var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(Connection, Transaction);
            var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader());

            try
            {
                reader.SetOrdinals(new string[] { "CMN_PRO_ProductID", "Product_Name_DictID", "Product_Description_DictID", "Product_Number", "DefaultStorageTemperature_max_in_kelvin", "DefaultStorageTemperature_min_in_kelvin", "ProducerName", "DefaultExpirationPeriod_in_sec", "ProductSuccessor_RefID", "ProductCode_Value", "ProductDosageForm_RefID", "ApplicableSalesTax_RefID", "ProductType_RefID", "PackageContent_Amount", "PackageContent_DisplayLabel", "PackageContent_MeasuredInUnit_RefID", "Product_Name_Successor", "CMN_PRO_ProductGroup_RefID", "DosageForm_Name_DictID", "ProductITL", "ISOCode", "IsStorage_CoolingRequired", "IsStorage_BatchNumberMandatory", "IsStorage_ExpiryDateMandatory", "IsProductPartOfDefaultStock", "IsProduct_AddictiveDrug", "ProductAdditionalInfoXML", "IsPlaceholderArticle", "CMN_PRO_ProductGroupID", "GlobalPropertyMatchingID" });
                while (reader.Read())
                {
                    L5AR_GABIfAID_0950_raw resultItem = new L5AR_GABIfAID_0950_raw();
                    //0:Parameter CMN_PRO_ProductID of type Guid
                    resultItem.CMN_PRO_ProductID = reader.GetGuid(0);
                    //1:Parameter Product_Name of type Dict
                    resultItem.Product_Name             = reader.GetDictionary(1);
                    resultItem.Product_Name.SourceTable = "cmn_pro_products";
                    loader.Append(resultItem.Product_Name);
                    //2:Parameter Product_Description of type Dict
                    resultItem.Product_Description             = reader.GetDictionary(2);
                    resultItem.Product_Description.SourceTable = "cmn_pro_products";
                    loader.Append(resultItem.Product_Description);
                    //3:Parameter Product_Number of type String
                    resultItem.Product_Number = reader.GetString(3);
                    //4:Parameter DefaultStorageTemperature_max_in_kelvin of type Double
                    resultItem.DefaultStorageTemperature_max_in_kelvin = reader.GetDouble(4);
                    //5:Parameter DefaultStorageTemperature_min_in_kelvin of type Double
                    resultItem.DefaultStorageTemperature_min_in_kelvin = reader.GetDouble(5);
                    //6:Parameter ProducerName of type String
                    resultItem.ProducerName = reader.GetString(6);
                    //7:Parameter DefaultExpirationPeriod_in_sec of type int
                    resultItem.DefaultExpirationPeriod_in_sec = reader.GetInteger(7);
                    //8:Parameter ProductSuccessor_RefID of type Guid
                    resultItem.ProductSuccessor_RefID = reader.GetGuid(8);
                    //9:Parameter ProductCode_Value of type String
                    resultItem.ProductCode_Value = reader.GetString(9);
                    //10:Parameter ProductDosageForm_RefID of type Guid
                    resultItem.ProductDosageForm_RefID = reader.GetGuid(10);
                    //11:Parameter ApplicableSalesTax_RefID of type Guid
                    resultItem.ApplicableSalesTax_RefID = reader.GetGuid(11);
                    //12:Parameter ProductType_RefID of type Guid
                    resultItem.ProductType_RefID = reader.GetGuid(12);
                    //13:Parameter PackageContent_Amount of type Double
                    resultItem.PackageContent_Amount = reader.GetDouble(13);
                    //14:Parameter PackageContent_DisplayLabel of type String
                    resultItem.PackageContent_DisplayLabel = reader.GetString(14);
                    //15:Parameter PackageContent_MeasuredInUnit_RefID of type Guid
                    resultItem.PackageContent_MeasuredInUnit_RefID = reader.GetGuid(15);
                    //16:Parameter Product_Name_Successor of type Dict
                    resultItem.Product_Name_Successor             = reader.GetDictionary(16);
                    resultItem.Product_Name_Successor.SourceTable = "cmn_pro_products";
                    loader.Append(resultItem.Product_Name_Successor);
                    //17:Parameter CMN_PRO_ProductGroup_RefID of type Guid
                    resultItem.CMN_PRO_ProductGroup_RefID = reader.GetGuid(17);
                    //18:Parameter DosageForm_Name_DictID of type Dict
                    resultItem.DosageForm_Name_DictID             = reader.GetDictionary(18);
                    resultItem.DosageForm_Name_DictID.SourceTable = "hec_product_dosageforms";
                    loader.Append(resultItem.DosageForm_Name_DictID);
                    //19:Parameter ProductITL of type String
                    resultItem.ProductITL = reader.GetString(19);
                    //20:Parameter ISOCode of type String
                    resultItem.ISOCode = reader.GetString(20);
                    //21:Parameter IsStorage_CoolingRequired of type Boolean
                    resultItem.IsStorage_CoolingRequired = reader.GetBoolean(21);
                    //22:Parameter IsStorage_BatchNumberMandatory of type Boolean
                    resultItem.IsStorage_BatchNumberMandatory = reader.GetBoolean(22);
                    //23:Parameter IsStorage_ExpiryDateMandatory of type Boolean
                    resultItem.IsStorage_ExpiryDateMandatory = reader.GetBoolean(23);
                    //24:Parameter IsProductPartOfDefaultStock of type Boolean
                    resultItem.IsProductPartOfDefaultStock = reader.GetBoolean(24);
                    //25:Parameter IsProduct_AddictiveDrug of type Boolean
                    resultItem.IsProduct_AddictiveDrug = reader.GetBoolean(25);
                    //26:Parameter ProductAdditionalInfoXML of type String
                    resultItem.ProductAdditionalInfoXML = reader.GetString(26);
                    //27:Parameter IsPlaceholderArticle of type Boolean
                    resultItem.IsPlaceholderArticle = reader.GetBoolean(27);
                    //28:Parameter CMN_PRO_ProductGroupID of type Guid
                    resultItem.CMN_PRO_ProductGroupID = reader.GetGuid(28);
                    //29:Parameter GlobalPropertyMatchingID of type String
                    resultItem.GlobalPropertyMatchingID = reader.GetString(29);

                    results.Add(resultItem);
                }
            }
            catch (Exception ex)
            {
                reader.Close();
                throw new Exception("Exception occured durng data retrieval in method cls_Get_ArticleBasicInfo_for_ArticleID", ex);
            }
            reader.Close();
            //Load all the dictionaries from the datatables
            loader.Load();

            returnStatus.Result = L5AR_GABIfAID_0950_raw.Convert(results).FirstOrDefault();

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

            FR_L5AR_GABIfAID_0950 functionReturn = new FR_L5AR_GABIfAID_0950();

            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_ArticleBasicInfo_for_ArticleID", ex);
            }
            return(functionReturn);
        }
 ///<summary>
 /// Opens the connection/transaction for the given connectionString, and closes them when complete
 ///<summary>
 public static FR_L5AR_GABIfAID_0950 Invoke(string ConnectionString, P_L5AR_GABIfAID_0950 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
 {
     return(Invoke(null, null, ConnectionString, Parameter, securityTicket));
 }