Example #1
0
        public void InputDataFromFrmAddSot()
        {
            Cars_class    t3 = new Cars_class();
            Drivers_class t2 = new Drivers_class();

            t3.Nomer_taxometra = textBox5.Text;
            t3.Whoes_avto      = comboBox4.Text;
            if (comboBox4.Text == "Сотрудника")
            {
                t3.Name_avto = textBox6.Text;
            }
            else
            {
                t3.Name_avto = comboBox1.Text;
            }
            t3.Gos_name     = textBox10.Text;
            t3.Color_avto   = textBox11.Text;
            t3.Strahovka_ot = maskedTextBox4.Text;
            t3.Strahovka_do = maskedTextBox3.Text;
            cars_Class.Add(t3);

            t2.Name            = textBox2.Text;
            t2.Familia         = textBox3.Text;
            t2.Pasport         = textBox4.Text;
            t2.Adress          = textBox1.Text;
            t2.Telephone       = maskedTextBox2.Text;
            t2.Date_year       = maskedTextBox1.Text;
            t2.Nomer_taxometra = textBox5.Text;
            t2.Stach_robot     = Convert.ToInt32(textBox7.Text);
            driver_class.Add(t2);
        }
        public void InputDataFromFrmAddSot()
        {
            Drivers_class t  = new Drivers_class();
            Cars_class    t2 = new Cars_class();

            t.Name            = textBox2.Text;
            t.Familia         = textBox3.Text;
            t.Adress          = textBox1.Text;
            t.Pasport         = textBox4.Text;
            t.Telephone       = maskedTextBox2.Text;
            t.Date_year       = maskedTextBox1.Text;
            t.Nomer_taxometra = textBox5.Text;
            t.Stach_robot     = Convert.ToInt32(textBox7.Text);
            driver_class.Add(t);

            t2.Whoes_avto = comboBox4.Text;

            t2.Gos_name     = textBox10.Text;
            t2.Color_avto   = textBox11.Text;
            t2.Type_avto    = textBox12.Text;
            t2.Strahovka_ot = maskedTextBox4.Text;
            t2.Strahovka_do = maskedTextBox3.Text;

            if (comboBox1.Visible == true)
            {
                t2.Name_avto = comboBox1.Text;
            }
            else
            {
                t2.Name_avto = textBox6.Text;
            }
            cars_Class.Add(t2);
        }