/// <summary>
 /// Gets the value of one of this object's properties.
 /// </summary>
 public object GetValue(FieldNameConstants field, object defaultValue)
 {
     if (field == FieldNameConstants.Discount)
     {
         return(this.Discount);
     }
     if (field == FieldNameConstants.ExtendedPrice)
     {
         return((this.ExtendedPrice == null) ? defaultValue : this.ExtendedPrice);
     }
     if (field == FieldNameConstants.OrderID)
     {
         return(this.OrderID);
     }
     if (field == FieldNameConstants.ProductID)
     {
         return(this.ProductID);
     }
     if (field == FieldNameConstants.ProductName)
     {
         return(this.ProductName);
     }
     if (field == FieldNameConstants.Quantity)
     {
         return(this.Quantity);
     }
     if (field == FieldNameConstants.UnitPrice)
     {
         return(this.UnitPrice);
     }
     throw new Exception("Field '" + field.ToString() + "' not found!");
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets the value of one of this object's properties.
 /// </summary>
 public object GetValue(FieldNameConstants field, object defaultValue)
 {
     if (field == FieldNameConstants.Country)
     {
         return((this.Country == null) ? defaultValue : this.Country);
     }
     if (field == FieldNameConstants.FirstName)
     {
         return((this.FirstName == null) ? defaultValue : this.FirstName);
     }
     if (field == FieldNameConstants.LastName)
     {
         return((this.LastName == null) ? defaultValue : this.LastName);
     }
     if (field == FieldNameConstants.OrderID)
     {
         return((this.OrderID == null) ? defaultValue : this.OrderID);
     }
     if (field == FieldNameConstants.SaleAmount)
     {
         return((this.SaleAmount == null) ? defaultValue : this.SaleAmount);
     }
     if (field == FieldNameConstants.ShippedDate)
     {
         return((this.ShippedDate == null) ? defaultValue : this.ShippedDate);
     }
     throw new Exception("Field '" + field.ToString() + "' not found!");
 }
        /// <summary>
        /// Gets the maximum size of the field value.
        /// </summary>
        public static int GetMaxLength(FieldNameConstants field)
        {
            switch (field)
            {
            case FieldNameConstants.Discount:
                return(0);

            case FieldNameConstants.ExtendedPrice:
                return(0);

            case FieldNameConstants.OrderID:
                return(0);

            case FieldNameConstants.ProductID:
                return(0);

            case FieldNameConstants.ProductName:
                return(80);

            case FieldNameConstants.Quantity:
                return(0);

            case FieldNameConstants.UnitPrice:
                return(0);
            }
            return(0);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Gets the maximum size of the field value.
        /// </summary>
        public static int GetMaxLength(FieldNameConstants field)
        {
            switch (field)
            {
            case FieldNameConstants.ProductName:
                return(80);

            case FieldNameConstants.UnitPrice:
                return(0);
            }
            return(0);
        }
 /// <summary>
 /// Gets the value of one of this object's properties.
 /// </summary>
 public object GetValue(FieldNameConstants field, object defaultValue)
 {
     if (field == FieldNameConstants.CategoryName)
     {
         return(this.CategoryName);
     }
     if (field == FieldNameConstants.CategorySales)
     {
         return((this.CategorySales == null) ? defaultValue : this.CategorySales);
     }
     throw new Exception("Field '" + field.ToString() + "' not found!");
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Gets the maximum size of the field value.
        /// </summary>
        public static int GetMaxLength(FieldNameConstants field)
        {
            switch (field)
            {
            case FieldNameConstants.ProductName:
                return(50);

            case FieldNameConstants.Total:
                return(0);
            }
            return(0);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Gets the value of one of this object's properties.
 /// </summary>
 public object GetValue(FieldNameConstants field, object defaultValue)
 {
     if (field == FieldNameConstants.ProductName)
     {
         return((this.ProductName == null) ? defaultValue : this.ProductName);
     }
     if (field == FieldNameConstants.Total)
     {
         return((this.Total == null) ? defaultValue : this.Total);
     }
     throw new Exception("Field '" + field.ToString() + "' not found!");
 }
        /// <summary>
        /// Gets the maximum size of the field value.
        /// </summary>
        public static int GetMaxLength(FieldNameConstants field)
        {
            switch (field)
            {
            case FieldNameConstants.CategoryName:
                return(30);

            case FieldNameConstants.CategorySales:
                return(0);
            }
            return(0);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Gets the maximum size of the field value.
        /// </summary>
        public static int GetMaxLength(FieldNameConstants field)
        {
            switch (field)
            {
            case FieldNameConstants.OrderID:
                return(0);

            case FieldNameConstants.Subtotal:
                return(0);
            }
            return(0);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Gets the system type of a field on this object
        /// </summary>
        public static System.Type GetFieldType(FieldNameConstants field)
        {
            if (field.GetType() != typeof(FieldNameConstants))
            {
                throw new Exception("The '" + field.GetType().ReflectedType.ToString() + ".FieldNameConstants' value is not valid. The field parameter must be of type 'Acme.Northwind.EFDAL.Entity.CustOrderHist.FieldNameConstants'.");
            }

            switch ((FieldNameConstants)field)
            {
            case FieldNameConstants.ProductName: return(typeof(string));

            case FieldNameConstants.Total: return(typeof(int?));
            }
            return(null);
        }
        /// <summary>
        /// Gets the system type of a field on this object
        /// </summary>
        public static System.Type GetFieldType(FieldNameConstants field)
        {
            if (field.GetType() != typeof(FieldNameConstants))
            {
                throw new Exception("The '" + field.GetType().ReflectedType.ToString() + ".FieldNameConstants' value is not valid. The field parameter must be of type 'Acme.Northwind.EFDAL.Entity.TenMostExpensiveProducts.FieldNameConstants'.");
            }

            switch ((FieldNameConstants)field)
            {
            case FieldNameConstants.Products: return(typeof(string));

            case FieldNameConstants.UnitPrice: return(typeof(decimal?));
            }
            return(null);
        }
Ejemplo n.º 12
0
 /// <summary>
 /// Gets the value of one of this object's properties.
 /// </summary>
 public object GetValue(FieldNameConstants field, object defaultValue)
 {
     if (field == FieldNameConstants.CategoryID)
     {
         return((this.CategoryID == null) ? defaultValue : this.CategoryID);
     }
     if (field == FieldNameConstants.CategoryName)
     {
         return(this.CategoryName);
     }
     if (field == FieldNameConstants.Discontinued)
     {
         return(this.Discontinued);
     }
     if (field == FieldNameConstants.ProductID)
     {
         return(this.ProductID);
     }
     if (field == FieldNameConstants.ProductName)
     {
         return(this.ProductName);
     }
     if (field == FieldNameConstants.QuantityPerUnit)
     {
         return((this.QuantityPerUnit == null) ? defaultValue : this.QuantityPerUnit);
     }
     if (field == FieldNameConstants.ReorderLevel)
     {
         return((this.ReorderLevel == null) ? defaultValue : this.ReorderLevel);
     }
     if (field == FieldNameConstants.SupplierID)
     {
         return((this.SupplierID == null) ? defaultValue : this.SupplierID);
     }
     if (field == FieldNameConstants.UnitPrice)
     {
         return((this.UnitPrice == null) ? defaultValue : this.UnitPrice);
     }
     if (field == FieldNameConstants.UnitsInStock)
     {
         return((this.UnitsInStock == null) ? defaultValue : this.UnitsInStock);
     }
     if (field == FieldNameConstants.UnitsOnOrder)
     {
         return((this.UnitsOnOrder == null) ? defaultValue : this.UnitsOnOrder);
     }
     throw new Exception("Field '" + field.ToString() + "' not found!");
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Gets the value of one of this object's properties.
 /// </summary>
 public object GetValue(FieldNameConstants field, object defaultValue)
 {
     if (field == FieldNameConstants.OrderID)
     {
         return(this.OrderID);
     }
     if (field == FieldNameConstants.ShippedDate)
     {
         return((this.ShippedDate == null) ? defaultValue : this.ShippedDate);
     }
     if (field == FieldNameConstants.Subtotal)
     {
         return((this.Subtotal == null) ? defaultValue : this.Subtotal);
     }
     throw new Exception("Field '" + field.ToString() + "' not found!");
 }
Ejemplo n.º 14
0
        /// <summary>
        /// Gets the maximum size of the field value.
        /// </summary>
        public static int GetMaxLength(FieldNameConstants field)
        {
            switch (field)
            {
            case FieldNameConstants.City:
                return(30);

            case FieldNameConstants.CompanyName:
                return(80);

            case FieldNameConstants.ContactName:
                return(60);

            case FieldNameConstants.Relationship:
                return(9);
            }
            return(0);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Gets the maximum size of the field value.
        /// </summary>
        public static int GetMaxLength(FieldNameConstants field)
        {
            switch (field)
            {
            case FieldNameConstants.OrderDate:
                return(0);

            case FieldNameConstants.OrderID:
                return(0);

            case FieldNameConstants.RequiredDate:
                return(0);

            case FieldNameConstants.ShippedDate:
                return(0);
            }
            return(0);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Gets the maximum size of the field value.
        /// </summary>
        public static int GetMaxLength(FieldNameConstants field)
        {
            switch (field)
            {
            case FieldNameConstants.City:
                return(30);

            case FieldNameConstants.CompanyName:
                return(80);

            case FieldNameConstants.Country:
                return(30);

            case FieldNameConstants.CustomerID:
                return(10);
            }
            return(0);
        }
        /// <summary>
        /// Gets the maximum size of the field value.
        /// </summary>
        public static int GetMaxLength(FieldNameConstants field)
        {
            switch (field)
            {
            case FieldNameConstants.CompanyName:
                return(80);

            case FieldNameConstants.OrderID:
                return(0);

            case FieldNameConstants.SaleAmount:
                return(0);

            case FieldNameConstants.ShippedDate:
                return(0);
            }
            return(0);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Gets the system type of a field on this object
        /// </summary>
        public static System.Type GetFieldType(FieldNameConstants field)
        {
            if (field.GetType() != typeof(FieldNameConstants))
            {
                throw new Exception("The '" + field.GetType().ReflectedType.ToString() + ".FieldNameConstants' value is not valid. The field parameter must be of type 'Acme.Northwind.EFDAL.Entity.SalesbyYear.FieldNameConstants'.");
            }

            switch ((FieldNameConstants)field)
            {
            case FieldNameConstants.OrderID: return(typeof(int?));

            case FieldNameConstants.ShippedDate: return(typeof(DateTime?));

            case FieldNameConstants.Subtotal: return(typeof(decimal?));

            case FieldNameConstants.Year: return(typeof(string));
            }
            return(null);
        }
Ejemplo n.º 19
0
 /// <summary>
 /// Gets the value of one of this object's properties.
 /// </summary>
 public object GetValue(FieldNameConstants field, object defaultValue)
 {
     if (field == FieldNameConstants.City)
     {
         return((this.City == null) ? defaultValue : this.City);
     }
     if (field == FieldNameConstants.CompanyName)
     {
         return((this.CompanyName == null) ? defaultValue : this.CompanyName);
     }
     if (field == FieldNameConstants.Country)
     {
         return((this.Country == null) ? defaultValue : this.Country);
     }
     if (field == FieldNameConstants.CustomerID)
     {
         return((this.CustomerID == null) ? defaultValue : this.CustomerID);
     }
     throw new Exception("Field '" + field.ToString() + "' not found!");
 }
Ejemplo n.º 20
0
        /// <summary>
        /// Gets the maximum size of the field value.
        /// </summary>
        public static int GetMaxLength(FieldNameConstants field)
        {
            switch (field)
            {
            case FieldNameConstants.CategoryName:
                return(30);

            case FieldNameConstants.Discontinued:
                return(0);

            case FieldNameConstants.ProductName:
                return(80);

            case FieldNameConstants.QuantityPerUnit:
                return(40);

            case FieldNameConstants.UnitsInStock:
                return(0);
            }
            return(0);
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Gets the system type of a field on this object
        /// </summary>
        public static System.Type GetFieldType(FieldNameConstants field)
        {
            if (field.GetType() != typeof(FieldNameConstants))
            {
                throw new Exception("The '" + field.GetType().ReflectedType.ToString() + ".FieldNameConstants' value is not valid. The field parameter must be of type 'Acme.Northwind.EFDAL.Entity.CustOrdersDetail.FieldNameConstants'.");
            }

            switch ((FieldNameConstants)field)
            {
            case FieldNameConstants.Discount: return(typeof(int?));

            case FieldNameConstants.ExtendedPrice: return(typeof(decimal?));

            case FieldNameConstants.ProductName: return(typeof(string));

            case FieldNameConstants.Quantity: return(typeof(short?));

            case FieldNameConstants.UnitPrice: return(typeof(decimal?));
            }
            return(null);
        }
Ejemplo n.º 22
0
        /// <summary>
        /// Gets the maximum size of the field value.
        /// </summary>
        public static int GetMaxLength(FieldNameConstants field)
        {
            switch (field)
            {
            case FieldNameConstants.CategoryID:
                return(0);

            case FieldNameConstants.CategoryName:
                return(30);

            case FieldNameConstants.Discontinued:
                return(0);

            case FieldNameConstants.ProductID:
                return(0);

            case FieldNameConstants.ProductName:
                return(80);

            case FieldNameConstants.QuantityPerUnit:
                return(40);

            case FieldNameConstants.ReorderLevel:
                return(0);

            case FieldNameConstants.SupplierID:
                return(0);

            case FieldNameConstants.UnitPrice:
                return(0);

            case FieldNameConstants.UnitsInStock:
                return(0);

            case FieldNameConstants.UnitsOnOrder:
                return(0);
            }
            return(0);
        }
Ejemplo n.º 23
0
 /// <summary>
 /// Gets the value of one of this object's properties.
 /// </summary>
 public object GetValue(FieldNameConstants field, object defaultValue)
 {
     if (field == FieldNameConstants.CategoryName)
     {
         return(this.CategoryName);
     }
     if (field == FieldNameConstants.Discontinued)
     {
         return(this.Discontinued);
     }
     if (field == FieldNameConstants.ProductName)
     {
         return(this.ProductName);
     }
     if (field == FieldNameConstants.QuantityPerUnit)
     {
         return((this.QuantityPerUnit == null) ? defaultValue : this.QuantityPerUnit);
     }
     if (field == FieldNameConstants.UnitsInStock)
     {
         return((this.UnitsInStock == null) ? defaultValue : this.UnitsInStock);
     }
     throw new Exception("Field '" + field.ToString() + "' not found!");
 }
Ejemplo n.º 24
0
        /// <summary>
        /// Gets the maximum size of the field value.
        /// </summary>
        public static int GetMaxLength(FieldNameConstants field)
        {
            switch (field)
            {
            case FieldNameConstants.Country:
                return(50);

            case FieldNameConstants.FirstName:
                return(50);

            case FieldNameConstants.LastName:
                return(50);

            case FieldNameConstants.OrderID:
                return(0);

            case FieldNameConstants.SaleAmount:
                return(0);

            case FieldNameConstants.ShippedDate:
                return(0);
            }
            return(0);
        }
Ejemplo n.º 25
0
        /// <summary>
        /// Gets the system type of a field on this object
        /// </summary>
        public static System.Type GetFieldType(FieldNameConstants field)
        {
            var o = new Alphabeticallistofproducts();

            return(((nHydrate.EFCore.DataAccess.IReadOnlyBusinessObject)o).GetFieldType(field));
        }
        /// <summary>
        /// Gets the system type of a field on this object
        /// </summary>
        public static System.Type GetFieldType(FieldNameConstants field)
        {
            var o = new SalesTotalsbyAmount();

            return(((nHydrate.EFCore.DataAccess.IReadOnlyBusinessObject)o).GetFieldType(field));
        }
Ejemplo n.º 27
0
        /// <summary>
        /// Gets the system type of a field on this object
        /// </summary>
        public static System.Type GetFieldType(FieldNameConstants field)
        {
            var o = new ProductsAboveAveragePrice();

            return(((nHydrate.EFCore.DataAccess.IReadOnlyBusinessObject)o).GetFieldType(field));
        }
Ejemplo n.º 28
0
 /// <summary>
 /// Gets the value of one of this object's properties.
 /// </summary>
 public object GetValue(FieldNameConstants field)
 {
     return(GetValue(field, null));
 }
        /// <summary>
        /// Gets the system type of a field on this object
        /// </summary>
        public static System.Type GetFieldType(FieldNameConstants field)
        {
            var o = new CategorySalesfor1997();

            return(((nHydrate.EFCore.DataAccess.IReadOnlyBusinessObject)o).GetFieldType(field));
        }
Ejemplo n.º 30
0
        /// <summary>
        /// Gets the system type of a field on this object
        /// </summary>
        public static System.Type GetFieldType(FieldNameConstants field)
        {
            var o = new QuarterlyOrders();

            return(((nHydrate.EFCore.DataAccess.IReadOnlyBusinessObject)o).GetFieldType(field));
        }