private void build(System.Reflection.PropertyInfo property, System.Data.Linq.Mapping.ColumnAttribute attribute, Table table, SpecificationEnum specification) { this._key = (attribute.Name != null ? attribute.Name : attribute.Storage.Substring(1)).Trim(); if (this._key == property.Name) { throw new Gale.Exception.GaleException("API008", property.Name); } this._name = char.ToLower(property.Name[0]) + property.Name.Substring(1); this._type = property.PropertyType; this._table = table; this._specification = specification; this._selected = false; if (attribute.IsPrimaryKey) { _specification = SpecificationEnum.Pk; table.SetPrimaryKey(this); if (attribute.IsPrimaryKey && table.IsForeign == false) { this._selected = true; } } }
public bool Equals(SpecificationEnum obj) { if ((object)obj == null) { return(false); } return(StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value)); }
private void AddEnumRow(object sender, RoutedEventArgs e) { // Creates a new specification enum to bind on SpecificationEnum newEnum = new SpecificationEnum(); // Adds a localized enumeration value to the new SpecificationEnum for each language foreach (var lang in LanguageList) { newEnum.LocalizedEnumValues.Add( new LocalizedEnumValue { LanguageID = lang.ID }); } // Adds the specificationEnum to the list and refreshes the grid SpecificationEnumList.Add(newEnum); dgEnumeration.ItemsSource = SpecificationEnumList; dgEnumeration.DataContext = SpecificationEnumList; }
public Field(System.Reflection.PropertyInfo property, System.Data.Linq.Mapping.ColumnAttribute attribute, Table table, SpecificationEnum specification) { build(property, attribute, table, specification); }
private void build(System.Reflection.PropertyInfo property, System.Data.Linq.Mapping.ColumnAttribute attribute, Table table, SpecificationEnum specification) { this._key = (attribute.Name != null ? attribute.Name : attribute.Storage.Substring(1)).Trim(); if (this._key == property.Name) { throw new Gale.Exception.GaleException("API008",property.Name); } this._name = char.ToLower(property.Name[0]) + property.Name.Substring(1); this._type = property.PropertyType; this._table = table; this._specification = specification; this._selected = false; if (attribute.IsPrimaryKey) { _specification = SpecificationEnum.Pk; table.SetPrimaryKey(this); if (attribute.IsPrimaryKey && table.IsForeign == false) { this._selected = true; } } }