/// <summary> /// Helper method to set the type-combobox with the correct Enum values /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void comboBox3_SelectedIndexChanged(object sender, EventArgs e) { if (comboBoxCategory.SelectedItem.Equals(Category.Residential)) { comboBoxType.DataSource = TypeRes.GetValues(typeof(TypeRes)); } else { comboBoxType.DataSource = TypeCom.GetValues(typeof(TypeCom)); } }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <param name="cubicMeterCapacity"></param> /// <param name="lf"></param> /// <param name="image"></param> /// <param name="address"></param> /// <param name="cat"></param> /// <param name="typeAll"></param> public Warehouse(string id, string cubicMeterCapacity, LegalForms lf, Bitmap image, Address address, Category cat, TypeAll typeAll) { this.Address = address; this.Id = id; this.TypeAll = typeAll; this.typeCom = TypeCom.Warehouse; // The unique attribute for this class this.cubicMeterCapacity = cubicMeterCapacity; UniqueAttribute = cubicMeterCapacity; this.LegalForm = lf; this.Image = image; this.Category = cat; }
public Shop(string id, string typeOfShop, LegalForms lf, Bitmap image, Address address, Category cat, TypeAll typeAll) { this.Address = address; this.Id = id; this.TypeAll = typeAll; this.typeCom = TypeCom.Shop; // The unique attribute for this class this.typeOfShop = typeOfShop; UniqueAttribute = typeOfShop; this.LegalForm = lf; this.Image = image; this.Category = cat; }