Exemplo n.º 1
0
        ///<summary>
        /// Method Invocation of wrapper classes
        ///<summary>
        protected static FR_L6DD_GRGFRG_1006 Invoke(DbConnection Connection, DbTransaction Transaction, string ConnectionString, P_L6DD_GRGFRG_1006 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            bool cleanupConnection  = Connection == null;
            bool cleanupTransaction = Transaction == null;

            FR_L6DD_GRGFRG_1006 functionReturn = new FR_L6DD_GRGFRG_1006();

            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_RevisionGroup_For_RevisionGroupID", ex);
            }
            return(functionReturn);
        }
Exemplo n.º 2
0
        protected static FR_L6DD_GRGFRG_1006 Execute(DbConnection Connection, DbTransaction Transaction, P_L6DD_GRGFRG_1006 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null)
        {
            #region UserCode
            var returnValue = new FR_L6DD_GRGFRG_1006();
            returnValue.Result = new L6DD_GRGFRG_1006();
            P_L5DD_GDDFDD_1402 param = new P_L5DD_GDDFDD_1402();
            param.RevisionGroupID            = Parameter.RevisionGroupID;
            returnValue.Result.RevisionGroup = cls_Get_DueDiligence_For_DueDiligenceID.Invoke(Connection, Transaction, param, securityTicket).Result;

            P_L6DD_GRFRG_1005 buildingsParam = new P_L6DD_GRFRG_1005();
            buildingsParam.RevisionGroupID = Parameter.RevisionGroupID;
            returnValue.Result.Revisions   = cls_Get_Revisions_For_RevisionGroupID.Invoke(Connection, Transaction, buildingsParam, securityTicket).Result;
            return(returnValue);

            #endregion UserCode
        }