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

            FR_MD_GGPOSDfGPOSID_1546 functionReturn = new FR_MD_GGPOSDfGPOSID_1546();

            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_Gpos_Details_for_GposID", ex);
            }
            return(functionReturn);
        }
        protected static FR_MD_GGPOSDfGPOSID_1546 Execute(DbConnection Connection, DbTransaction Transaction, P_MD_GGPOSDfGPOSID_1546 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            #region UserCode
            var returnValue = new FR_MD_GGPOSDfGPOSID_1546();
            //Put your code here
            var gposBaseData = cls_Get_GPOS_BaseData_for_GPOSID.Invoke(Connection, Transaction, new P_MD_GGPOSBDfGPOSID_1544()
            {
                GposID = Parameter.GposID
            }, securityTicket).Result;
            if (gposBaseData != null)
            {
                returnValue.Result = new MD_GGPOSDfGPOSID_1546()
                {
                    FeeValue           = gposBaseData.FeeValue,
                    FromInjection      = gposBaseData.FromInjection,
                    GposID             = gposBaseData.GposID,
                    GposName           = gposBaseData.GposName,
                    GposNumber         = gposBaseData.GposNumber,
                    GposType           = gposBaseData.GposType,
                    ManagementFeeValue = gposBaseData.ManagementFeeValue,
                    WaiveWithOrder     = gposBaseData.WaiveWithOrder,
                    DrugIDs            = ORM_HEC_BIL_PotentialCode_2_HealthcareProduct.Query.Search(Connection, Transaction, new ORM_HEC_BIL_PotentialCode_2_HealthcareProduct.Query()
                    {
                        HEC_BIL_PotentialCode_RefID = Parameter.GposID,
                        Tenant_RefID = securityTicket.TenantID,
                        IsDeleted    = false
                    }).Select(cd => cd.HEC_Product_RefID).ToArray(),
                    DiagnoseIDs = ORM_HEC_BIL_PotentialCode_2_PotentialDiagnosis.Query.Search(Connection, Transaction, new ORM_HEC_BIL_PotentialCode_2_PotentialDiagnosis.Query()
                    {
                        HEC_BIL_PotentialCode_RefID = Parameter.GposID,
                        Tenant_RefID = securityTicket.TenantID,
                        IsDeleted    = false
                    }).Select(cd => cd.HEC_DIA_PotentialDiagnosis_RefID).ToArray()
                };
            }

            return(returnValue);

            #endregion UserCode
        }