예제 #1
0
 public FilterItem()
 {
     JoinList       = new List <FilterItemJoin>();
     OperationList  = new List <FilterOperation>();
     Lookup         = new Lookup();
     TypeList       = new TypeList();
     TablesetColumn = new TablesetColumn();
     FilterColumn   = new FilterColumn();
 }
예제 #2
0
        public questStatus Update(DbMgrTransaction trans, Quest.Functional.MasterPricing.TablesetColumn tablesetColumn)
        {
            // Initialize
            questStatus status             = null;
            bool        bCreateTransaction = trans == null;


            // Perform update in this transaction.
            status = update((MasterPricingEntities)trans.DbContext, tablesetColumn);
            if (!questStatusDef.IsSuccess(status))
            {
                RollbackTransaction(trans);
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
예제 #3
0
        public questStatus Update(Quest.Functional.MasterPricing.TablesetColumn tablesetColumn)
        {
            // Initialize
            questStatus status = null;


            // Perform update.
            using (MasterPricingEntities dbContext = new MasterPricingEntities())
            {
                status = update(dbContext, tablesetColumn);
                if (!questStatusDef.IsSuccess(status))
                {
                    return(status);
                }
            }
            return(new questStatus(Severity.Success));
        }
예제 #4
0
        public questStatus Create(DbMgrTransaction trans, Quest.Functional.MasterPricing.TablesetColumn tablesetColumn, out TablesetColumnId tablesetColumnId)
        {
            // Initialize
            questStatus status = null;

            tablesetColumnId = null;


            // Data rules.


            // Create the tablesetColumn in this transaction.
            status = create((MasterPricingEntities)trans.DbContext, tablesetColumn, out tablesetColumnId);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            return(new questStatus(Severity.Success));
        }
예제 #5
0
        /*----------------------------------------------------------------------------------------------------------------------------------
        * TablesetColumns
        *---------------------------------------------------------------------------------------------------------------------------------*/
        private questStatus create(MasterPricingEntities dbContext, Quest.Functional.MasterPricing.TablesetColumn tablesetColumn, out TablesetColumnId tablesetColumnId)
        {
            // Initialize
            questStatus status = null;

            tablesetColumnId = null;


            // Perform create
            try
            {
                Quest.Services.Dbio.MasterPricing.TablesetColumns _tablesetColumn = new Quest.Services.Dbio.MasterPricing.TablesetColumns();
                BufferMgr.TransferBuffer(tablesetColumn, _tablesetColumn);
                dbContext.TablesetColumns.Add(_tablesetColumn);
                dbContext.SaveChanges();
                if (_tablesetColumn.Id == 0)
                {
                    return(new questStatus(Severity.Error, "Quest.Functional.MasterPricing.TablesetColumn not created"));
                }
                tablesetColumnId = new TablesetColumnId(_tablesetColumn.Id);
            }
            catch (DbEntityValidationException ex)
            {
                var    errorMessages    = ex.EntityValidationErrors.SelectMany(x => x.ValidationErrors).Select(x => x.ErrorMessage);
                String fullErrorMessage = string.Join("; ", errorMessages);
                String exceptionMessage = string.Concat(ex.Message, fullErrorMessage);

                status = new questStatus(Severity.Fatal, String.Format("EXCEPTION: {0}.{1}: {2}",
                                                                       this.GetType().Name, MethodBase.GetCurrentMethod().Name,
                                                                       exceptionMessage));
                LogException(ex, status);
                return(status);
            }
            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));
        }
예제 #6
0
        public questStatus Read(DbMgrTransaction trans, TablesetColumnId tablesetColumnId, 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, tablesetColumnId, out _tablesetColumn);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }
            tablesetColumn = new Quest.Functional.MasterPricing.TablesetColumn();
            BufferMgr.TransferBuffer(_tablesetColumn, tablesetColumn);

            return(new questStatus(Severity.Success));
        }
예제 #7
0
        /*==================================================================================================================================
        * Properties
        *=================================================================================================================================*/
        #endregion


        #region Public Methods

        /*==================================================================================================================================
        * Public Methods
        *=================================================================================================================================*/
        public questStatus Create(Quest.Functional.MasterPricing.TablesetColumn tablesetColumn, out TablesetColumnId tablesetColumnId)
        {
            // Initialize
            questStatus status = null;

            tablesetColumnId = null;


            // Data rules.


            // Create the tablesetColumn
            using (MasterPricingEntities dbContext = new MasterPricingEntities())
            {
                status = create(dbContext, tablesetColumn, out tablesetColumnId);
                if (!questStatusDef.IsSuccess(status))
                {
                    return(status);
                }
            }
            return(new questStatus(Severity.Success));
        }
예제 #8
0
        public questStatus Read(FilterColumnTablesetColumnId filterColumnTablesetColumnId, out Quest.Functional.MasterPricing.TablesetColumn tablesetColumn)
        {
            // Initialize
            questStatus status = null;

            tablesetColumn = null;


            // Perform read
            using (MasterPricingEntities dbContext = new MasterPricingEntities())
            {
                Quest.Services.Dbio.MasterPricing.TablesetColumns _tablesetColumn = null;
                status = read(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));
        }
예제 #9
0
 public FilterColumn()
 {
     TablesetColumn   = new TablesetColumn();
     ParentEntityType = new EntityType();
 }