Exemple #1
0
 private void ShowTextBoxes(string str)
 {
     HideTextBoxes();
     // show global atributts
     Name_textBox.Show();
     Name_input_textBox.Show();
     Mobile_textBox.Show();
     Mobile_input_textBox.Show();
     Email_OR_Address_textBox.Show();
     Email_OR_Address_input_textBox.Show();
     Tax_Number_textBox.Show();
     Tax_Number_input_textBox.Show();
     if (str.Equals("tenant"))
     {
         // Show Tenant only attributs
         Email_OR_Address_textBox.Text = "Email:";
         Apartment_textBox.Show();
         if (AddTenant || edit)
         {
             EnableAllWriteTextboxes();
             apart_comboBox.Show();
         }
         else
         {
             DisableAllWriteTextboxes();
             apart_input_textBox.Show();
         }
     }
     else if (str.Equals("sp"))
     {
         // Show Service Provider only attributs
         Email_OR_Address_textBox.Text = "Address:";
         Type_textBox.Show();
         if (AddSP || edit)
         {
             EnableAllWriteTextboxes();
             type_comboBox.Show();
             //TODO fill dropdown
         }
         else
         {
             DisableAllWriteTextboxes();
             Type_input_textBox.Show();
         }
     }
 }
Exemple #2
0
        private void HideTextBoxes()
        {
            // Hide Contact Info
            Name_textBox.Hide();
            Name_input_textBox.Hide();

            Mobile_textBox.Hide();
            Mobile_input_textBox.Hide();

            Email_OR_Address_textBox.Hide();
            Email_OR_Address_input_textBox.Hide();

            Type_textBox.Hide();
            Apartment_textBox.Hide();

            Type_input_textBox.Hide();
            apart_input_textBox.Hide();

            apart_comboBox.Hide();
            type_comboBox.Hide();

            Tax_Number_textBox.Hide();
            Tax_Number_input_textBox.Hide();
        }