Beispiel #1
0
 private void ReadingsForm_Load(object sender, EventArgs e)
 {
     Gas_input_textBox.Hide();
     Light_input_textBox.Hide();
     Water_input_textBox.Hide();
     Mobile_input_textBox.Hide();
     Tenant_Name_input_textBox.Hide();
     Tenant_Name_textBox.Hide();
     Mobile_textBox.Hide();
     Water_textBox.Hide();
     Light_textBox.Hide();
     Gas_textBox.Hide();
     Fill_Apart();
     currentAppart = apart_listBox.SelectedIndex;
 }
Beispiel #2
0
        private void ShowReadings()
        {
            if (currentAppart != -1)
            {
                foreach (Apartment a in apList)
                {
                    if (a.Index == currentAppart)
                    {
                        Tenant_Name_input_textBox.Text     = a.owner.Name;
                        Tenant_Name_input_textBox.ReadOnly = true;
                        Tenant_Name_input_textBox.Enabled  = false;
                        Mobile_input_textBox.Text          = a.owner.Mobile;
                        Mobile_input_textBox.ReadOnly      = true;
                        Mobile_input_textBox.Enabled       = false;
                        Water_input_textBox.Text           = a.ReadWater;
                        Water_input_textBox.ReadOnly       = true;
                        Water_input_textBox.Enabled        = false;
                        Light_input_textBox.Text           = a.ReadLight;
                        Light_input_textBox.ReadOnly       = true;
                        Light_input_textBox.Enabled        = false;
                        Gas_input_textBox.Text             = a.ReadGas;
                        Gas_input_textBox.ReadOnly         = true;
                        Gas_input_textBox.Enabled          = false;

                        Gas_input_textBox.Show();
                        Light_input_textBox.Show();
                        Water_input_textBox.Show();
                        Mobile_input_textBox.Show();
                        Tenant_Name_input_textBox.Show();
                        Tenant_Name_textBox.Show();
                        Tenant_Name_textBox.ReadOnly = true;
                        Tenant_Name_textBox.Enabled  = false;
                        Mobile_textBox.Show();
                        Mobile_textBox.ReadOnly = true;
                        Mobile_textBox.Enabled  = false;
                        Water_textBox.Show();
                        Water_textBox.ReadOnly = true;
                        Water_textBox.Enabled  = false;
                        Light_textBox.Show();
                        Light_textBox.ReadOnly = true;
                        Light_textBox.Enabled  = false;
                        Gas_textBox.Show();
                        Gas_textBox.ReadOnly = true;
                        Gas_textBox.Enabled  = false;
                    }
                }
            }
        }