Example #1
0
        /// <summary>
        /// In forms constructor the not necessarily labels and tetxboxes are hiding
        /// from the form. Then the combobox for location(CmbLocation) is filling
        /// from the location(location) table.
        /// </summary>
        public EditLocation()
        {
            InitializeComponent();

            label2.Hide();
            label3.Hide();
            label4.Hide();
            label5.Hide();
            label6.Hide();
            label7.Hide();
            TbxAddressNumber.Hide();
            TbxAdressName.Hide();
            TbxLat.Hide();
            TbxLong.Hide();
            TbxPostalCode.Hide();
            CmbMunicipality.Hide();
            BtnEdit.Hide();

            CmbLocation.DataSource    = DCom.GetData("SELECT ID, CONCAT(Address_Name, ', ', Municipality) AS ADDRESS  FROM location");
            CmbLocation.DisplayMember = "ADDRESS";
            CmbLocation.ValueMember   = "ID";
        }