Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="reader"></param>
        internal VLFile(DbDataReader reader)
        {
            this.Client           = reader.GetInt32(0);
            this.FileId           = reader.GetGuid(1);
            this.Survey           = reader.GetInt32(2);
            this.OriginalFileName = reader.GetString(3);
            this.ManagedFileName  = reader.GetString(4);
            this.Extension        = reader.GetString(5);
            this.Size             = reader.GetInt32(6);
            this.Status           = (VLFileStatus)reader.GetByte(7);
            this.AttributeFlags   = reader.GetInt32(8);
            if (!reader.IsDBNull(9))
            {
                this.InventoryPath = reader.GetString(9);
            }
            if (!reader.IsDBNull(10))
            {
                this.Width = reader.GetInt16(10);
            }
            if (!reader.IsDBNull(11))
            {
                this.Height = reader.GetInt16(11);
            }

            /*Κάνουμε εμείς initialize τα πεδία της base class (LrObject), για να μην την αφήσουμε
             * να αναζητήσει το ordinal με την ονομασία της κολώνας*/
            this.CreateDT              = reader.GetDateTime(12);
            this.CreateByPrincipal     = reader.GetInt32(13);
            this.LastUpdateDT          = this.CreateDT;
            this.LastUpdateByPrincipal = this.CreateByPrincipal;


            this.EntityState = EntityState.Unchanged;
        }
Esempio n. 2
0
 public static string GetNumberString(System.Int16?value)
 {
     if (value == null)
     {
         return("");
     }
     return(value.Value.ToString("g", m_NumberFormatProvider));
 }
        public override void SetProperty(string name, object value)
        {
            esColumnMetadata col = this.Meta.Columns.FindByPropertyName(name);

            if (col != null)
            {
                if (value == null || value is System.String)
                {
                    // Use the strongly typed property
                    switch (name)
                    {
                    case "StoreId": this.str().StoreId = (string)value; break;

                    case "PaymentProviderId": this.str().PaymentProviderId = (string)value; break;
                    }
                }
                else
                {
                    switch (name)
                    {
                    case "StoreId":

                        if (value == null || value is System.Int32)
                        {
                            this.StoreId = (System.Int32?)value;
                        }
                        OnPropertyChanged(StorePaymentProviderMetadata.PropertyNames.StoreId);
                        break;

                    case "PaymentProviderId":

                        if (value == null || value is System.Int16)
                        {
                            this.PaymentProviderId = (System.Int16?)value;
                        }
                        OnPropertyChanged(StorePaymentProviderMetadata.PropertyNames.PaymentProviderId);
                        break;


                    default:
                        break;
                    }
                }
            }
            else if (this.ContainsColumn(name))
            {
                this.SetColumn(name, value);
            }
            else
            {
                throw new Exception("SetProperty Error: '" + name + "' not found");
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Sets properties and attributes of class in accordance with Binary definition.
        /// </summary>
        /// <param name="Definition">Binary definition</param>
        public override Task FromXml(XmlElement Definition)
        {
            if (System.Int16.TryParse(Definition.InnerText, out System.Int16 Value))
            {
                this.value  = Value;
                this.script = null;
            }
            else
            {
                this.value  = null;
                this.script = new Expression(Definition.InnerText);
            }

            return(Task.CompletedTask);
        }
Esempio n. 5
0
        public static System.Int16?ToInt16Nullable(object x, bool useDefaultForNull = false, System.Int16 @default = default(System.Int16))
        {
            System.Int16?result = null;

            try
            {
                var s = x as string;

                if (!(DBNull.Value.Equals(x) || x == null || (s != null && string.IsNullOrWhiteSpace(s))))
                {
                    result = System.Convert.ToInt16(x);
                }
            }
            catch
            { }

            if (result == null && useDefaultForNull)
            {
                result = @default;
            }

            return(result);
        }
Esempio n. 6
0
 public static IQueryable <Nsun.Domain.DataContent.UserInfo> ByAge(this IQueryable <Nsun.Domain.DataContent.UserInfo> queryable, System.Int16?age)
 {
     // support nulls
     return(age == null
         ? queryable.Where(u => u.Age == null)
         : queryable.Where(u => u.Age == age));
 }
        /// <summary>
        ///     Gets rows from the datasource based on the IX_WorkOrder_ScrapReasonID index.
        /// </summary>
        /// <param name="start">Row number at which to start reading.</param>
        /// <param name="pageLength">Number of rows to return.</param>
        /// <param name="_scrapReasonId">Reason for inspection failure.</param>
        /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
        /// <param name="count">out parameter to get total records for query</param>
        /// <remarks></remarks>
        /// <returns>Returns an instance of the <see cref="Nettiers.AdventureWorks.Entities.TList&lt;WorkOrder&gt;"/> class.</returns>
        public override Nettiers.AdventureWorks.Entities.TList <WorkOrder> GetByScrapReasonId(TransactionManager transactionManager, System.Int16?_scrapReasonId, int start, int pageLength, out int count)
        {
            try
            {
                WsProxy.AdventureWorksServices proxy = new WsProxy.AdventureWorksServices();
                proxy.Url = Url;
                WsProxy.WorkOrder[] items = proxy.WorkOrderProvider_GetByScrapReasonId(_scrapReasonId, start, pageLength, out count);

                return(Convert(items));
            }
            catch (SoapException soex)
            {
                System.Diagnostics.Debug.WriteLine(soex);
                throw soex;
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex);
                throw ex;
            }
        }
Esempio n. 8
0
 /// <summary>
 ///     Gets rows from the datasource based on the IX_WorkOrder_ScrapReasonID index.
 /// </summary>
 /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
 /// <param name="_scrapReasonId">Reason for inspection failure.</param>
 /// <param name="start">Row number at which to start reading, the first row is 0.</param>
 /// <param name="pageLength">Number of rows to return.</param>
 /// <param name="count">The total number of records.</param>
 /// <returns>Returns an instance of the <see cref="TList&lt;WorkOrder&gt;"/> class.</returns>
 public abstract TList <WorkOrder> GetByScrapReasonId(TransactionManager transactionManager, System.Int16?_scrapReasonId, int start, int pageLength, out int count);
 ///<summary>
 /// Creates a new <see cref="AlphabeticalListOfProductsBase"/> instance.
 ///</summary>
 ///<param name="_productId"></param>
 ///<param name="_productName"></param>
 ///<param name="_supplierId"></param>
 ///<param name="_categoryId"></param>
 ///<param name="_quantityPerUnit"></param>
 ///<param name="_unitPrice"></param>
 ///<param name="_unitsInStock"></param>
 ///<param name="_unitsOnOrder"></param>
 ///<param name="_reorderLevel"></param>
 ///<param name="_discontinued"></param>
 ///<param name="_categoryName"></param>
 public AlphabeticalListOfProductsBase(System.Int32 _productId, System.String _productName, System.Int32? _supplierId, System.Int32? _categoryId, System.String _quantityPerUnit, System.Decimal? _unitPrice, System.Int16? _unitsInStock, System.Int16? _unitsOnOrder, System.Int16? _reorderLevel, System.Boolean _discontinued, System.String _categoryName)
 {
     this._productId = _productId;
     this._productName = _productName;
     this._supplierId = _supplierId;
     this._categoryId = _categoryId;
     this._quantityPerUnit = _quantityPerUnit;
     this._unitPrice = _unitPrice;
     this._unitsInStock = _unitsInStock;
     this._unitsOnOrder = _unitsOnOrder;
     this._reorderLevel = _reorderLevel;
     this._discontinued = _discontinued;
     this._categoryName = _categoryName;
 }
        public static object ConvertValue(object value, Field.FieldType toFieldType)
        {
            object convertedValue = null;

            try
            {
                switch (toFieldType)
                {
                case ESRI.ArcGIS.Client.Field.FieldType.Integer:
                case ESRI.ArcGIS.Client.Field.FieldType.OID:
                    //typeof(System.Int32?);
                    int intValue = Convert.ToInt32(value);
                    convertedValue = new System.Int32?(intValue);
                    break;

                case ESRI.ArcGIS.Client.Field.FieldType.SmallInteger:
                    //typeof(System.Int16?);
                    short shortValue = Convert.ToInt16(value);
                    convertedValue = new System.Int16?(shortValue);
                    break;

                case ESRI.ArcGIS.Client.Field.FieldType.Double:
                    //typeof(System.Double?);
                    double doubleValue = Convert.ToDouble(value);
                    convertedValue = new System.Double?(doubleValue);
                    break;

                case ESRI.ArcGIS.Client.Field.FieldType.Single:
                    //typeof(System.Single?);
                    float floatValue = Convert.ToSingle(value);
                    convertedValue = new System.Single?(floatValue);
                    break;

                case ESRI.ArcGIS.Client.Field.FieldType.String:
                case ESRI.ArcGIS.Client.Field.FieldType.GlobalID:
                case ESRI.ArcGIS.Client.Field.FieldType.GUID:
                case ESRI.ArcGIS.Client.Field.FieldType.XML:
                    //typeof(System.String);
                    string stringValue = Convert.ToString(value);
                    convertedValue = stringValue;
                    break;

                case ESRI.ArcGIS.Client.Field.FieldType.Date:
                    //typeof(System.DateTime?);
                    DateTime dateTimeValue = Convert.ToDateTime(value);
                    convertedValue = new System.DateTime?(dateTimeValue);
                    break;

                case ESRI.ArcGIS.Client.Field.FieldType.Geometry:
                case ESRI.ArcGIS.Client.Field.FieldType.Blob:
                case ESRI.ArcGIS.Client.Field.FieldType.Raster:
                case ESRI.ArcGIS.Client.Field.FieldType.Unknown:
                    //typeof(System.Object);
                    convertedValue = value;
                    break;

                default:
                    //typeof(System.Object);
                    convertedValue = value;
                    break;
                }
            }
            catch (Exception)
            {
                convertedValue = null;
            }

            return(convertedValue);
        }
Esempio n. 11
0
 partial void OnAgeChanged(System.Int16?value);
Esempio n. 12
0
 partial void OnAgeChanging(System.Int16?newValue, System.Int16?oldValue);
Esempio n. 13
0
        /// <summary>
        ///     Gets rows from the datasource based on the IX_WorkOrder_ScrapReasonID index.
        /// </summary>
        /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
        /// <param name="_scrapReasonId">Reason for inspection failure.</param>
        /// <param name="start">Row number at which to start reading.</param>
        /// <param name="pageLength">Number of rows to return.</param>
        /// <param name="count">out parameter to get total records for query.</param>
        /// <returns>Returns an instance of the <see cref="TList&lt;WorkOrder&gt;"/> class.</returns>
        /// <remarks></remarks>
        /// <exception cref="System.Exception">The command could not be executed.</exception>
        /// <exception cref="System.Data.DataException">The <paramref name="transactionManager"/> is not open.</exception>
        /// <exception cref="System.Data.Common.DbException">The command could not be executed.</exception>
        public override TList <WorkOrder> GetByScrapReasonId(TransactionManager transactionManager, System.Int16?_scrapReasonId, int start, int pageLength, out int count)
        {
            SqlDatabase database       = new SqlDatabase(this._connectionString);
            DbCommand   commandWrapper = StoredProcedureProvider.GetCommandWrapper(database, "Production.usp_adwTiers_WorkOrder_GetByScrapReasonId", _useStoredProcedure);

            database.AddInParameter(commandWrapper, "@ScrapReasonId", DbType.Int16, _scrapReasonId);

            IDataReader       reader = null;
            TList <WorkOrder> tmp    = new TList <WorkOrder>();

            try
            {
                //Provider Data Requesting Command Event
                OnDataRequesting(new CommandEventArgs(commandWrapper, "GetByScrapReasonId", tmp));

                if (transactionManager != null)
                {
                    reader = Utility.ExecuteReader(transactionManager, commandWrapper);
                }
                else
                {
                    reader = Utility.ExecuteReader(database, commandWrapper);
                }

                //Create collection and fill
                Fill(reader, tmp, start, pageLength);
                count = -1;
                if (reader.NextResult())
                {
                    if (reader.Read())
                    {
                        count = reader.GetInt32(0);
                    }
                }

                //Provider Data Requested Command Event
                OnDataRequested(new CommandEventArgs(commandWrapper, "GetByScrapReasonId", tmp));
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }

                commandWrapper = null;
            }

            return(tmp);

            //return rows;
        }
Esempio n. 14
0
        public static object ConvertValue(object value, Field.FieldType toFieldType)
        {
            object convertedValue = null;
              try
              {
            switch (toFieldType)
            {
              case ESRI.ArcGIS.Client.Field.FieldType.Integer:
              case ESRI.ArcGIS.Client.Field.FieldType.OID:
            //typeof(System.Int32?);
            int intValue = Convert.ToInt32(value);
            convertedValue = new System.Int32?(intValue);
            break;
              case ESRI.ArcGIS.Client.Field.FieldType.SmallInteger:
            //typeof(System.Int16?);
            short shortValue = Convert.ToInt16(value);
            convertedValue = new System.Int16?(shortValue);
            break;
              case ESRI.ArcGIS.Client.Field.FieldType.Double:
            //typeof(System.Double?);
            double doubleValue = Convert.ToDouble(value);
            convertedValue = new System.Double?(doubleValue);
            break;
              case ESRI.ArcGIS.Client.Field.FieldType.Single:
            //typeof(System.Single?);
            float floatValue = Convert.ToSingle(value);
            convertedValue = new System.Single?(floatValue);
            break;
              case ESRI.ArcGIS.Client.Field.FieldType.String:
              case ESRI.ArcGIS.Client.Field.FieldType.GlobalID:
              case ESRI.ArcGIS.Client.Field.FieldType.GUID:
              case ESRI.ArcGIS.Client.Field.FieldType.XML:
            //typeof(System.String);
            string stringValue = Convert.ToString(value);
            convertedValue = stringValue;
            break;
              case ESRI.ArcGIS.Client.Field.FieldType.Date:
            //typeof(System.DateTime?);
            DateTime dateTimeValue = Convert.ToDateTime(value);
            convertedValue = new System.DateTime?(dateTimeValue);
            break;
              case ESRI.ArcGIS.Client.Field.FieldType.Geometry:
              case ESRI.ArcGIS.Client.Field.FieldType.Blob:
              case ESRI.ArcGIS.Client.Field.FieldType.Raster:
              case ESRI.ArcGIS.Client.Field.FieldType.Unknown:
            //typeof(System.Object);
            convertedValue = value;
            break;
              default:
            //typeof(System.Object);
            convertedValue = value;
            break;
            }
              }
              catch (Exception)
              {
            convertedValue = null;
              }

              return convertedValue;
        }
Esempio n. 15
0
        public static IQueryable <Nsun.Domain.DataContent.UserInfo> ByAge(this IQueryable <Nsun.Domain.DataContent.UserInfo> queryable, ComparisonOperator comparisonOperator, System.Int16?age)
        {
            if (age == null && comparisonOperator != ComparisonOperator.Equals && comparisonOperator != ComparisonOperator.NotEquals)
            {
                throw new ArgumentNullException("age", "Parameter 'age' cannot be null with the specified ComparisonOperator.  Parameter 'comparisonOperator' must be ComparisonOperator.Equals or ComparisonOperator.NotEquals to support null.");
            }

            switch (comparisonOperator)
            {
            case ComparisonOperator.GreaterThan:
                return(queryable.Where(u => u.Age > age));

            case ComparisonOperator.GreaterThanOrEquals:
                return(queryable.Where(u => u.Age >= age));

            case ComparisonOperator.LessThan:
                return(queryable.Where(u => u.Age < age));

            case ComparisonOperator.LessThanOrEquals:
                return(queryable.Where(u => u.Age <= age));

            case ComparisonOperator.NotEquals:
                return(age == null
                        ? queryable.Where(u => u.Age != null)
                        : queryable.Where(u => u.Age != age));

            default:
                return(age == null
                        ? queryable.Where(u => u.Age == null)
                        : queryable.Where(u => u.Age == age));
            }
        }
Esempio n. 16
0
        public static IQueryable <Nsun.Domain.DataContent.UserInfo> ByAge(this IQueryable <Nsun.Domain.DataContent.UserInfo> queryable, System.Int16?age, params System.Int16?[] additionalValues)
        {
            var ageList = new List <System.Int16?> {
                age
            };

            if (additionalValues != null)
            {
                ageList.AddRange(additionalValues);
            }
            else
            {
                ageList.Add(null);
            }

            if (ageList.Count == 1)
            {
                return(queryable.ByAge(ageList[0]));
            }

            return(queryable.ByAge(ageList));
        }
Esempio n. 17
0
        /// <summary>
        ///     Gets rows from the datasource based on the primary key IX_WorkOrder_ScrapReasonID index.
        /// </summary>
        /// <param name="_scrapReasonId">Reason for inspection failure.</param>
        /// <returns>Returns an instance of the <see cref="TList&lt;WorkOrder&gt;"/> class.</returns>
        public TList <WorkOrder> GetByScrapReasonId(System.Int16?_scrapReasonId)
        {
            int count = -1;

            return(GetByScrapReasonId(null, _scrapReasonId, 0, int.MaxValue, out count));
        }
Esempio n. 18
0
        /// <summary>
        ///     Gets rows from the datasource based on the IX_WorkOrder_ScrapReasonID index.
        /// </summary>
        /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
        /// <param name="_scrapReasonId">Reason for inspection failure.</param>
        /// <remarks></remarks>
        /// <returns>Returns an instance of the <see cref="TList&lt;WorkOrder&gt;"/> class.</returns>
        public TList <WorkOrder> GetByScrapReasonId(TransactionManager transactionManager, System.Int16?_scrapReasonId)
        {
            int count = -1;

            return(GetByScrapReasonId(transactionManager, _scrapReasonId, 0, int.MaxValue, out count));
        }
Esempio n. 19
0
        /// <summary>
        ///     Gets rows from the datasource based on the IX_WorkOrder_ScrapReasonID index.
        /// </summary>
        /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
        /// <param name="_scrapReasonId">Reason for inspection failure.</param>
        /// <param name="start">Row number at which to start reading, the first row is 0.</param>
        /// <param name="pageLength">Number of rows to return.</param>
        /// <remarks></remarks>
        /// <returns>Returns an instance of the <see cref="TList&lt;WorkOrder&gt;"/> class.</returns>
        public TList <WorkOrder> GetByScrapReasonId(TransactionManager transactionManager, System.Int16?_scrapReasonId, int start, int pageLength)
        {
            int count = -1;

            return(GetByScrapReasonId(transactionManager, _scrapReasonId, start, pageLength, out count));
        }
        public override void SetProperty(string name, object value)
        {
            esColumnMetadata col = this.Meta.Columns.FindByPropertyName(name);

            if (col != null)
            {
                if (value == null || value is System.String)
                {
                    // Use the strongly typed property
                    switch (name)
                    {
                    case "Id": this.str().Id = (string)value; break;

                    case "ShippingServiceId": this.str().ShippingServiceId = (string)value; break;

                    case "Name": this.str().Name = (string)value; break;

                    case "DisplayName": this.str().DisplayName = (string)value; break;

                    case "IsEnabled": this.str().IsEnabled = (string)value; break;

                    case "SortOrder": this.str().SortOrder = (string)value; break;
                    }
                }
                else
                {
                    switch (name)
                    {
                    case "Id":

                        if (value == null || value is System.Int32)
                        {
                            this.Id = (System.Int32?)value;
                        }
                        OnPropertyChanged(ShippingServiceRateTypeMetadata.PropertyNames.Id);
                        break;

                    case "ShippingServiceId":

                        if (value == null || value is System.Int32)
                        {
                            this.ShippingServiceId = (System.Int32?)value;
                        }
                        OnPropertyChanged(ShippingServiceRateTypeMetadata.PropertyNames.ShippingServiceId);
                        break;

                    case "IsEnabled":

                        if (value == null || value is System.Boolean)
                        {
                            this.IsEnabled = (System.Boolean?)value;
                        }
                        OnPropertyChanged(ShippingServiceRateTypeMetadata.PropertyNames.IsEnabled);
                        break;

                    case "SortOrder":

                        if (value == null || value is System.Int16)
                        {
                            this.SortOrder = (System.Int16?)value;
                        }
                        OnPropertyChanged(ShippingServiceRateTypeMetadata.PropertyNames.SortOrder);
                        break;


                    default:
                        break;
                    }
                }
            }
            else if (this.ContainsColumn(name))
            {
                this.SetColumn(name, value);
            }
            else
            {
                throw new Exception("SetProperty Error: '" + name + "' not found");
            }
        }
Esempio n. 21
0
 /// <summary>
 ///     Gets rows from the datasource based on the IX_WorkOrder_ScrapReasonID index.
 /// </summary>
 /// <param name="_scrapReasonId">Reason for inspection failure.</param>
 /// <param name="start">Row number at which to start reading, the first row is 0.</param>
 /// <param name="pageLength">Number of rows to return.</param>
 /// <param name="count">out parameter to get total records for query</param>
 /// <remarks></remarks>
 /// <returns>Returns an instance of the <see cref="TList&lt;WorkOrder&gt;"/> class.</returns>
 public TList <WorkOrder> GetByScrapReasonId(System.Int16?_scrapReasonId, int start, int pageLength, out int count)
 {
     return(GetByScrapReasonId(null, _scrapReasonId, start, pageLength, out count));
 }
Esempio n. 22
0
 //[002] code start
 /// <summary>
 /// Update
 /// Calls [usp_update_SalesOrderLine]
 /// </summary>
 public abstract bool Update(System.Int32?salesOrderLineId, System.String part, System.Int32?manufacturerNo, System.String dateCode, System.Int32?packageNo, System.Int32?quantity, System.Double?price, System.DateTime?datePromised, System.DateTime?requiredDate, System.String instructions, System.Int32?productNo, System.String taxable, System.String customerPart, System.Boolean?shipAsap, System.Boolean?inactive, System.Byte?rohs, System.String notes, System.Int32?updatedBy, System.Byte?productSource, System.DateTime?poDeliveryDate, System.Int16?serialNo, System.String mslLevel, System.String ContractNo, System.Boolean?printHazardous, bool?isFormChanged);
        public override void SetProperty(string name, object value)
        {
            esColumnMetadata col = this.Meta.Columns.FindByPropertyName(name);

            if (col != null)
            {
                if (value == null || value is System.String)
                {
                    // Use the strongly typed property
                    switch (name)
                    {
                    case "RateId": this.str().RateId = (string)value; break;

                    case "CountryCode": this.str().CountryCode = (string)value; break;

                    case "Region": this.str().Region = (string)value; break;

                    case "WeightMin": this.str().WeightMin = (string)value; break;

                    case "WeightMax": this.str().WeightMax = (string)value; break;

                    case "Cost": this.str().Cost = (string)value; break;

                    case "RateTypeId": this.str().RateTypeId = (string)value; break;

                    case "RateTypeName": this.str().RateTypeName = (string)value; break;

                    case "RateTypeDisplayName": this.str().RateTypeDisplayName = (string)value; break;

                    case "RateTypeIsEnabled": this.str().RateTypeIsEnabled = (string)value; break;

                    case "RateTypeSortOrder": this.str().RateTypeSortOrder = (string)value; break;
                    }
                }
                else
                {
                    switch (name)
                    {
                    case "RateId":

                        if (value == null || value is System.Int32)
                        {
                            this.RateId = (System.Int32?)value;
                        }
                        OnPropertyChanged(vShippingServiceRatesMetadata.PropertyNames.RateId);
                        break;

                    case "WeightMin":

                        if (value == null || value is System.Decimal)
                        {
                            this.WeightMin = (System.Decimal?)value;
                        }
                        OnPropertyChanged(vShippingServiceRatesMetadata.PropertyNames.WeightMin);
                        break;

                    case "WeightMax":

                        if (value == null || value is System.Decimal)
                        {
                            this.WeightMax = (System.Decimal?)value;
                        }
                        OnPropertyChanged(vShippingServiceRatesMetadata.PropertyNames.WeightMax);
                        break;

                    case "Cost":

                        if (value == null || value is System.Decimal)
                        {
                            this.Cost = (System.Decimal?)value;
                        }
                        OnPropertyChanged(vShippingServiceRatesMetadata.PropertyNames.Cost);
                        break;

                    case "RateTypeId":

                        if (value == null || value is System.Int32)
                        {
                            this.RateTypeId = (System.Int32?)value;
                        }
                        OnPropertyChanged(vShippingServiceRatesMetadata.PropertyNames.RateTypeId);
                        break;

                    case "RateTypeIsEnabled":

                        if (value == null || value is System.Boolean)
                        {
                            this.RateTypeIsEnabled = (System.Boolean?)value;
                        }
                        OnPropertyChanged(vShippingServiceRatesMetadata.PropertyNames.RateTypeIsEnabled);
                        break;

                    case "RateTypeSortOrder":

                        if (value == null || value is System.Int16)
                        {
                            this.RateTypeSortOrder = (System.Int16?)value;
                        }
                        OnPropertyChanged(vShippingServiceRatesMetadata.PropertyNames.RateTypeSortOrder);
                        break;


                    default:
                        break;
                    }
                }
            }
            else if (this.ContainsColumn(name))
            {
                this.SetColumn(name, value);
            }
            else
            {
                throw new Exception("SetProperty Error: '" + name + "' not found");
            }
        }