Beispiel #1
0
        private questStatus delete(MasterPricingEntities dbContext, Quest.Functional.Logging.BulkUpdateLogId bulkUpdateLogId)
        {
            // Initialize
            questStatus status = null;


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

                // Delete the record.
                dbContext.BulkUpdateLogs.Remove(_bulkUpdateLog);
                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.BulkUpdateLogId bulkUpdateLogId)
        {
            // Initialize
            questStatus status = null;


            // Delete bulkUpdateLog
            status = _dbBulkUpdateLogsMgr.Delete(bulkUpdateLogId);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
Beispiel #3
0
        public questStatus Delete(DbMgrTransaction trans, Quest.Functional.Logging.BulkUpdateLogId bulkUpdateLogId)
        {
            // Initialize
            questStatus status = null;


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


            // Read bulkUpdateLog
            status = _dbBulkUpdateLogsMgr.Read(bulkUpdateLogId, out bulkUpdateLog);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
Beispiel #5
0
        public questStatus Delete(Quest.Functional.Logging.BulkUpdateLogId bulkUpdateLogId)
        {
            // Initialize
            questStatus status = null;


            // Perform delete.
            using (MasterPricingEntities dbContext = new MasterPricingEntities())
            {
                status = delete(dbContext, bulkUpdateLogId);
                if (!questStatusDef.IsSuccess(status))
                {
                    return(status);
                }
            }
            return(new questStatus(Severity.Success));
        }
Beispiel #6
0
        public questStatus Read(DbMgrTransaction trans, Quest.Functional.Logging.BulkUpdateLogId bulkUpdateLogId, out Quest.Functional.Logging.BulkUpdateLog bulkUpdateLog)
        {
            // Initialize
            questStatus status = null;

            bulkUpdateLog = null;


            // Perform read.
            using (MasterPricingEntities dbContext = new MasterPricingEntities())
            {
                Quest.Services.Dbio.MasterPricing.BulkUpdateLogs _bulkUpdateLog = null;
                status = read((MasterPricingEntities)trans.DbContext, bulkUpdateLogId, out _bulkUpdateLog);
                if (!questStatusDef.IsSuccess(status))
                {
                    return(status);
                }
                bulkUpdateLog = new Quest.Functional.Logging.BulkUpdateLog();
                BufferMgr.TransferBuffer(_bulkUpdateLog, bulkUpdateLog);
            }
            return(new questStatus(Severity.Success));
        }
Beispiel #7
0
        private questStatus read(MasterPricingEntities dbContext, Quest.Functional.Logging.BulkUpdateLogId bulkUpdateLogId, out Quest.Services.Dbio.MasterPricing.BulkUpdateLogs bulkUpdateLog)
        {
            // Initialize
            bulkUpdateLog = null;


            try
            {
                bulkUpdateLog = dbContext.BulkUpdateLogs.Where(r => r.Id == bulkUpdateLogId.Id).SingleOrDefault();
                if (bulkUpdateLog == null)
                {
                    return(new questStatus(Severity.Error, String.Format("ERROR: {0}.{1}: {2}",
                                                                         this.GetType().Name, MethodBase.GetCurrentMethod().Name,
                                                                         String.Format("Id {0} not found", bulkUpdateLogId.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));
        }
Beispiel #8
0
        public questStatus Create(DbMgrTransaction trans, Quest.Functional.Logging.BulkUpdateLog bulkUpdateLog, out Quest.Functional.Logging.BulkUpdateLogId bulkUpdateLogId)
        {
            // Initialize
            questStatus status = null;

            bulkUpdateLogId = null;


            // Data rules.


            // Create the bulkUpdateLog in this transaction.
            status = create((MasterPricingEntities)trans.DbContext, bulkUpdateLog, out bulkUpdateLogId);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
Beispiel #9
0
        /*==================================================================================================================================
        * Properties
        *=================================================================================================================================*/
        #endregion


        #region Public Methods

        /*==================================================================================================================================
        * Public Methods
        *=================================================================================================================================*/
        public questStatus Create(Quest.Functional.Logging.BulkUpdateLog bulkUpdateLog, out Quest.Functional.Logging.BulkUpdateLogId bulkUpdateLogId)
        {
            // Initialize
            questStatus status = null;

            bulkUpdateLogId = null;


            // Data rules.


            // Create the bulkUpdateLog
            using (MasterPricingEntities dbContext = new MasterPricingEntities())
            {
                status = create(dbContext, bulkUpdateLog, out bulkUpdateLogId);
                if (!questStatusDef.IsSuccess(status))
                {
                    return(status);
                }
            }
            return(new questStatus(Severity.Success));
        }
        /*==================================================================================================================================
        * Properties
        *=================================================================================================================================*/
        #endregion


        #region Public Methods

        /*==================================================================================================================================
        * Public Methods
        *=================================================================================================================================*/
        public questStatus Create(Quest.Functional.Logging.BulkUpdateLog bulkUpdateLog, out Quest.Functional.Logging.BulkUpdateLogId bulkUpdateLogId)
        {
            // Initialize
            bulkUpdateLogId = null;
            questStatus status = null;

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


            // Create bulkUpdateLog
            status = _dbBulkUpdateLogsMgr.Create(bulkUpdateLog, out bulkUpdateLogId);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }