Beispiel #1
0
        /*==================================================================================================================================
        * Private Methods
        *=================================================================================================================================*/
        private questStatus initialize()
        {
            // Initialize
            questStatus status = null;

            try
            {
                _dbFilterProceduresMgr = new DbFilterProceduresMgr(this.UserSession);
            }
            catch (System.Exception ex)
            {
                status = new questStatus(Severity.Fatal, String.Format("EXCEPTION: {0}.{1}: {2}",
                                                                       this.GetType().ToString(), MethodInfo.GetCurrentMethod().Name, ex.Message));
                throw new System.Exception(status.Message, ex);
            }
            return(new questStatus(Severity.Success));
        }
        public questStatus GetFilterProcedures(FilterId filterId, out List <FilterProcedure> filterProcedureList)
        {
            // Initialize
            questStatus status = null;

            filterProcedureList = null;


            DbFilterProceduresMgr dbFilterProceduresMgr = new DbFilterProceduresMgr(this.UserSession);

            status = dbFilterProceduresMgr.Read(filterId, out filterProcedureList);
            if (!questStatusDef.IsSuccessOrWarning(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
Beispiel #3
0
        //
        // Filter Procedure Utility Routines
        //
        public questStatus GetFilterProcedure(BulkUpdateRequest bulkUpdateRequest, string Action, out FilterProcedure filterProcedure)
        {
            // Initialize
            questStatus status = null;

            filterProcedure = null;


            // Get the filter procedures.
            FilterId filterId = new FilterId(bulkUpdateRequest.FilterId);
            List <FilterProcedure> filterProcedureList   = null;
            DbFilterProceduresMgr  dbFilterProceduresMgr = new DbFilterProceduresMgr(this.UserSession);

            status = dbFilterProceduresMgr.Read(filterId, out filterProcedureList);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }

            // Determine if given action exists.
            FilterProcedure UPDATEsproc = filterProcedureList.Find(delegate(FilterProcedure fp) { return(fp.Action == Action); });

            if (UPDATEsproc == null)
            {
                return(new questStatus(Severity.Warning, String.Format("No {0} filter procedure", Action)));
            }

            // Get parameters
            FilterProcedureId filterProcedureId = new FilterProcedureId(UPDATEsproc.Id);
            List <FilterProcedureParameter> filterProcedureParameterList   = null;
            DbFilterProcedureParametersMgr  dbFilterProcedureParametersMgr = new DbFilterProcedureParametersMgr(this.UserSession);

            status = dbFilterProcedureParametersMgr.Read(filterProcedureId, out filterProcedureParameterList);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }

            // Return filter procedure with parameters.
            UPDATEsproc.ParameterList = filterProcedureParameterList;
            filterProcedure           = UPDATEsproc;

            return(new questStatus(Severity.Success));
        }
        public questStatus GetDatabaseStoredProcedures(TablesetId tablesetId, out List <StoredProcedure> storedProcedureList)
        {
            // Initialize
            questStatus status = null;

            storedProcedureList = null;


            // Get tableset
            Tableset     tableset     = null;
            TablesetsMgr tablesetsMgr = new TablesetsMgr(this.UserSession);

            status = tablesetsMgr.Read(tablesetId, out tableset);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }


            // Get database
            Quest.Functional.MasterPricing.Database database = null;
            DatabaseId   databaseId   = new DatabaseId(tableset.DatabaseId);
            DatabasesMgr databasesMgr = new DatabasesMgr(this.UserSession);

            status = databasesMgr.Read(databaseId, out database);
            if (!questStatusDef.IsSuccessOrWarning(status))
            {
                return(status);
            }


            // Get database stored procedures
            DbFilterProceduresMgr dbFilterProceduresMgr = new DbFilterProceduresMgr(this.UserSession);

            status = GetDatabaseStoredProcedures(database, out storedProcedureList);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }