コード例 #1
0
        private questStatus delete(MasterPricingEntities dbContext, Quest.Functional.Logging.PortalRequestLogId portalRequestLogId)
        {
            // Initialize
            questStatus status = null;


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

                // Delete the record.
                dbContext.PortalRequestLogs.Remove(_portalRequestLog);
                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));
        }
コード例 #2
0
        public questStatus Delete(Quest.Functional.Logging.PortalRequestLogId portalRequestLogId)
        {
            // Initialize
            questStatus status = null;


            // Delete portalRequestLog
            status = _dbPortalRequestLogsMgr.Delete(portalRequestLogId);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
コード例 #3
0
        public questStatus Delete(DbMgrTransaction trans, Quest.Functional.Logging.PortalRequestLogId portalRequestLogId)
        {
            // Initialize
            questStatus status = null;


            // Perform delete in this transaction.
            status = delete((MasterPricingEntities)trans.DbContext, portalRequestLogId);
            if (!questStatusDef.IsSuccess(status))
            {
                RollbackTransaction(trans);
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
コード例 #4
0
        public questStatus Read(Quest.Functional.Logging.PortalRequestLogId portalRequestLogId, out Quest.Functional.Logging.PortalRequestLog portalRequestLog)
        {
            // Initialize
            portalRequestLog = null;
            questStatus status = null;


            // Read portalRequestLog
            status = _dbPortalRequestLogsMgr.Read(portalRequestLogId, out portalRequestLog);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
コード例 #5
0
        public questStatus Delete(Quest.Functional.Logging.PortalRequestLogId portalRequestLogId)
        {
            // Initialize
            questStatus status = null;


            // Perform delete.
            using (MasterPricingEntities dbContext = new MasterPricingEntities())
            {
                status = delete(dbContext, portalRequestLogId);
                if (!questStatusDef.IsSuccess(status))
                {
                    return(status);
                }
            }
            return(new questStatus(Severity.Success));
        }
コード例 #6
0
        public questStatus Read(DbMgrTransaction trans, Quest.Functional.Logging.PortalRequestLogId portalRequestLogId, out Quest.Functional.Logging.PortalRequestLog portalRequestLog)
        {
            // Initialize
            questStatus status = null;

            portalRequestLog = null;


            // Perform read.
            using (MasterPricingEntities dbContext = new MasterPricingEntities())
            {
                Quest.Services.Dbio.MasterPricing.PortalRequestLogs _portalRequestLog = null;
                status = read((MasterPricingEntities)trans.DbContext, portalRequestLogId, out _portalRequestLog);
                if (!questStatusDef.IsSuccess(status))
                {
                    return(status);
                }
                portalRequestLog = new Quest.Functional.Logging.PortalRequestLog();
                BufferMgr.TransferBuffer(_portalRequestLog, portalRequestLog);
            }
            return(new questStatus(Severity.Success));
        }
コード例 #7
0
        private questStatus read(MasterPricingEntities dbContext, Quest.Functional.Logging.PortalRequestLogId portalRequestLogId, out Quest.Services.Dbio.MasterPricing.PortalRequestLogs portalRequestLog)
        {
            // Initialize
            portalRequestLog = null;


            try
            {
                portalRequestLog = dbContext.PortalRequestLogs.Where(r => r.Id == portalRequestLogId.Id).SingleOrDefault();
                if (portalRequestLog == null)
                {
                    return(new questStatus(Severity.Error, String.Format("ERROR: {0}.{1}: {2}",
                                                                         this.GetType().Name, MethodBase.GetCurrentMethod().Name,
                                                                         String.Format("Id {0} not found", portalRequestLogId.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));
        }
コード例 #8
0
        public questStatus Create(DbMgrTransaction trans, Quest.Functional.Logging.PortalRequestLog portalRequestLog, out Quest.Functional.Logging.PortalRequestLogId portalRequestLogId)
        {
            // Initialize
            questStatus status = null;

            portalRequestLogId = null;


            // Data rules.


            // Create the portalRequestLog in this transaction.
            status = create((MasterPricingEntities)trans.DbContext, portalRequestLog, out portalRequestLogId);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
コード例 #9
0
        /*==================================================================================================================================
        * Properties
        *=================================================================================================================================*/
        #endregion


        #region Public Methods

        /*==================================================================================================================================
        * Public Methods
        *=================================================================================================================================*/
        public questStatus Create(Quest.Functional.Logging.PortalRequestLog portalRequestLog, out Quest.Functional.Logging.PortalRequestLogId portalRequestLogId)
        {
            // Initialize
            questStatus status = null;

            portalRequestLogId = null;


            // Data rules.


            // Create the portalRequestLog
            using (MasterPricingEntities dbContext = new MasterPricingEntities())
            {
                status = create(dbContext, portalRequestLog, out portalRequestLogId);
                if (!questStatusDef.IsSuccess(status))
                {
                    return(status);
                }
            }
            return(new questStatus(Severity.Success));
        }
コード例 #10
0
        /*==================================================================================================================================
        * Properties
        *=================================================================================================================================*/
        #endregion


        #region Public Methods

        /*==================================================================================================================================
        * Public Methods
        *=================================================================================================================================*/
        public questStatus Create(Quest.Functional.Logging.PortalRequestLog portalRequestLog, out Quest.Functional.Logging.PortalRequestLogId portalRequestLogId)
        {
            // Initialize
            portalRequestLogId = null;
            questStatus status = null;

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


            // Create portalRequestLog
            status = _dbPortalRequestLogsMgr.Create(portalRequestLog, out portalRequestLogId);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }