Exemple #1
0
        private questStatus delete(MasterPricingEntities dbContext, Quest.Functional.Logging.FilterLogId filterLogId)
        {
            // Initialize
            questStatus status = null;


            try
            {
                // Read the record.
                Quest.Services.Dbio.MasterPricing.FilterLogs _filterLog = null;
                status = read(dbContext, filterLogId, out _filterLog);
                if (!questStatusDef.IsSuccess(status))
                {
                    return(status);
                }

                // Delete the record.
                dbContext.FilterLogs.Remove(_filterLog);
                dbContext.SaveChanges();
            }
            catch (System.Exception ex)
            {
                return(new questStatus(Severity.Fatal, String.Format("EXCEPTION: {0}.{1}: {2}",
                                                                     this.GetType().Name, MethodBase.GetCurrentMethod().Name,
                                                                     ex.InnerException != null ? ex.InnerException.Message : ex.Message)));
            }
            return(new questStatus(Severity.Success));
        }
        public questStatus Delete(Quest.Functional.Logging.FilterLogId filterLogId)
        {
            // Initialize
            questStatus status = null;


            // Delete filterLog
            status = _dbFilterLogsMgr.Delete(filterLogId);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
Exemple #3
0
        public questStatus Delete(DbMgrTransaction trans, Quest.Functional.Logging.FilterLogId filterLogId)
        {
            // Initialize
            questStatus status = null;


            // Perform delete in this transaction.
            status = delete((MasterPricingEntities)trans.DbContext, filterLogId);
            if (!questStatusDef.IsSuccess(status))
            {
                RollbackTransaction(trans);
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
        public questStatus Read(Quest.Functional.Logging.FilterLogId filterLogId, out Quest.Functional.Logging.FilterLog filterLog)
        {
            // Initialize
            filterLog = null;
            questStatus status = null;


            // Read filterLog
            status = _dbFilterLogsMgr.Read(filterLogId, out filterLog);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
Exemple #5
0
        public questStatus Delete(Quest.Functional.Logging.FilterLogId filterLogId)
        {
            // Initialize
            questStatus status = null;


            // Perform delete.
            using (MasterPricingEntities dbContext = new MasterPricingEntities())
            {
                status = delete(dbContext, filterLogId);
                if (!questStatusDef.IsSuccess(status))
                {
                    return(status);
                }
            }
            return(new questStatus(Severity.Success));
        }
        /*==================================================================================================================================
        * Properties
        *=================================================================================================================================*/
        #endregion


        #region Public Methods

        /*==================================================================================================================================
        * Public Methods
        *=================================================================================================================================*/
        public questStatus Create(Quest.Functional.Logging.FilterLog filterLog, out Quest.Functional.Logging.FilterLogId filterLogId)
        {
            // Initialize
            filterLogId = null;
            questStatus status = null;

            // Date/time stamp it
            filterLog.Created = DateTime.Now;


            // Create filterLog
            status = _dbFilterLogsMgr.Create(filterLog, out filterLogId);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
Exemple #7
0
        /*==================================================================================================================================
        * Properties
        *=================================================================================================================================*/
        #endregion


        #region Public Methods

        /*==================================================================================================================================
        * Public Methods
        *=================================================================================================================================*/
        public questStatus Create(Quest.Functional.Logging.FilterLog filterLog, out Quest.Functional.Logging.FilterLogId filterLogId)
        {
            // Initialize
            questStatus status = null;

            filterLogId = null;


            // Data rules.


            // Create the filterLog
            using (MasterPricingEntities dbContext = new MasterPricingEntities())
            {
                status = create(dbContext, filterLog, out filterLogId);
                if (!questStatusDef.IsSuccess(status))
                {
                    return(status);
                }
            }
            return(new questStatus(Severity.Success));
        }
Exemple #8
0
        public questStatus Read(DbMgrTransaction trans, Quest.Functional.Logging.FilterLogId filterLogId, out Quest.Functional.Logging.FilterLog filterLog)
        {
            // Initialize
            questStatus status = null;

            filterLog = null;


            // Perform read.
            using (MasterPricingEntities dbContext = new MasterPricingEntities())
            {
                Quest.Services.Dbio.MasterPricing.FilterLogs _filterLog = null;
                status = read((MasterPricingEntities)trans.DbContext, filterLogId, out _filterLog);
                if (!questStatusDef.IsSuccess(status))
                {
                    return(status);
                }
                filterLog = new Quest.Functional.Logging.FilterLog();
                BufferMgr.TransferBuffer(_filterLog, filterLog);
            }
            return(new questStatus(Severity.Success));
        }
Exemple #9
0
        private questStatus read(MasterPricingEntities dbContext, Quest.Functional.Logging.FilterLogId filterLogId, out Quest.Services.Dbio.MasterPricing.FilterLogs filterLog)
        {
            // Initialize
            filterLog = null;


            try
            {
                filterLog = dbContext.FilterLogs.Where(r => r.Id == filterLogId.Id).SingleOrDefault();
                if (filterLog == null)
                {
                    return(new questStatus(Severity.Error, String.Format("ERROR: {0}.{1}: {2}",
                                                                         this.GetType().Name, MethodBase.GetCurrentMethod().Name,
                                                                         String.Format("Id {0} not found", filterLogId.Id))));
                }
            }
            catch (System.Exception ex)
            {
                return(new questStatus(Severity.Fatal, String.Format("EXCEPTION: {0}.{1}: {2}",
                                                                     this.GetType().Name, MethodBase.GetCurrentMethod().Name,
                                                                     ex.InnerException != null ? ex.InnerException.Message : ex.Message)));
            }
            return(new questStatus(Severity.Success));
        }
Exemple #10
0
        public questStatus Create(DbMgrTransaction trans, Quest.Functional.Logging.FilterLog filterLog, out Quest.Functional.Logging.FilterLogId filterLogId)
        {
            // Initialize
            questStatus status = null;

            filterLogId = null;


            // Data rules.


            // Create the filterLog in this transaction.
            status = create((MasterPricingEntities)trans.DbContext, filterLog, out filterLogId);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }