Beispiel #1
0
        private questStatus read(MasterPricingEntities dbContext, FilterColumnTablesetColumnId filterColumnTablesetColumnId, out Quest.Services.Dbio.MasterPricing.TablesetColumns tablesetColumn)
        {
            // Initialize
            questStatus status = null;

            tablesetColumn = null;


            try
            {
                tablesetColumn = dbContext.TablesetColumns.Where(r => r.EntityTypeId == filterColumnTablesetColumnId.EntityTypeId.Id &&
                                                                 r.TableSetEntityId == filterColumnTablesetColumnId.EntityId.Id &&
                                                                 r.Name == filterColumnTablesetColumnId.Name).SingleOrDefault();
                if (tablesetColumn == null)
                {
                    return(new questStatus(Severity.Error, String.Format("ERROR: {0}.{1}: {2}",
                                                                         this.GetType().Name, MethodBase.GetCurrentMethod().Name,
                                                                         String.Format("FilterColumnTablesetColumnId EntityTypeId: {0}  EntityId: {1}  Name: {2} not found",
                                                                                       filterColumnTablesetColumnId.EntityTypeId.Id, filterColumnTablesetColumnId.EntityId.Id, filterColumnTablesetColumnId.Name))));
                }
            }
            catch (System.Exception ex)
            {
                status = new questStatus(Severity.Fatal, String.Format("EXCEPTION: {0}.{1}: {2}",
                                                                       this.GetType().Name, MethodBase.GetCurrentMethod().Name,
                                                                       ex.InnerException != null ? ex.InnerException.Message : ex.Message));
                LogException(ex, status);
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
Beispiel #2
0
        public questStatus Read(DbMgrTransaction trans, FilterColumnTablesetColumnId filterColumnTablesetColumnId, out Quest.Functional.MasterPricing.TablesetColumn tablesetColumn)
        {
            // Initialize
            questStatus status = null;

            tablesetColumn = null;


            // Perform read
            Quest.Services.Dbio.MasterPricing.TablesetColumns _tablesetColumn = null;
            status = read((MasterPricingEntities)trans.DbContext, filterColumnTablesetColumnId, out _tablesetColumn);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            tablesetColumn = new Quest.Functional.MasterPricing.TablesetColumn();
            BufferMgr.TransferBuffer(_tablesetColumn, tablesetColumn);

            return(new questStatus(Severity.Success));
        }