private questStatus update(MasterPricingEntities dbContext, Quest.Functional.Logging.LogSetting logSetting) { // Initialize questStatus status = null; try { // Read the record. LogSettingId logSettingId = new LogSettingId(logSetting.Id); Quest.Services.Dbio.MasterPricing.LogSettings _logSetting = null; status = read(dbContext, out _logSetting); if (!questStatusDef.IsSuccess(status)) { return(status); } // Update the record. BufferMgr.TransferBuffer(logSetting, _logSetting); 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)); }
/*================================================================================================================================== * Properties *=================================================================================================================================*/ #endregion #region Public Methods /*================================================================================================================================== * Public Methods *=================================================================================================================================*/ public questStatus Read(out Quest.Functional.Logging.LogSetting logSetting) { // Initialize logSetting = null; questStatus status = null; // Read logSetting status = _dbLogSettingsMgr.Read(out logSetting); if (!questStatusDef.IsSuccess(status)) { return(status); } return(new questStatus(Severity.Success)); }
public questStatus Update(DbMgrTransaction trans, Quest.Functional.Logging.LogSetting logSetting) { // Initialize questStatus status = null; bool bCreateTransaction = trans == null; // Perform update in this transaction. status = update((MasterPricingEntities)trans.DbContext, logSetting); if (!questStatusDef.IsSuccess(status)) { RollbackTransaction(trans); return(status); } return(new questStatus(Severity.Success)); }
public questStatus Update(Quest.Functional.Logging.LogSetting logSetting) { // Initialize questStatus status = null; // Perform update. using (MasterPricingEntities dbContext = new MasterPricingEntities()) { status = update(dbContext, logSetting); if (!questStatusDef.IsSuccess(status)) { return(status); } } return(new questStatus(Severity.Success)); }
public questStatus Update(Quest.Functional.Logging.LogSetting logSetting) { // Initialize questStatus status = null; // Date/time stamp update logSetting.LastModified = DateTime.Now; // Update logSetting status = _dbLogSettingsMgr.Update(logSetting); if (!questStatusDef.IsSuccess(status)) { return(status); } return(new questStatus(Severity.Success)); }
public questStatus Read(DbMgrTransaction trans, out Quest.Functional.Logging.LogSetting logSetting) { // Initialize questStatus status = null; logSetting = null; // Perform read. using (MasterPricingEntities dbContext = new MasterPricingEntities()) { Quest.Services.Dbio.MasterPricing.LogSettings _logSetting = null; status = read((MasterPricingEntities)trans.DbContext, out _logSetting); if (!questStatusDef.IsSuccess(status)) { return(status); } logSetting = new Quest.Functional.Logging.LogSetting(); BufferMgr.TransferBuffer(_logSetting, logSetting); } return(new questStatus(Severity.Success)); }