Exemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            Form ifrm = new Сотрудники();

            ifrm.Show();
            this.Hide();
        }
Exemplo n.º 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "" || textBox3.Text == "" || textBox2.Text == "")
     {
         label1.Text = "Введите данные!";
     }
     else
     {
         DataRow row;
         row = this.maketDataSet2.Employees.NewRow();
         row["idDepartments"]  = comboBox1.SelectedValue;
         row["Surname"]        = textBox1.Text;
         row["NameEmp"]        = textBox3.Text;
         row["Patronymic"]     = textBox5.Text;
         row["Position"]       = textBox2.Text;
         row["AcademicDegree"] = comboBox2.SelectedValue;
         row["AcademicTitle"]  = comboBox3.SelectedValue;
         this.maketDataSet2.Employees.Rows.Add(row);
         this.employeesTableAdapter1.Update(this.maketDataSet2.Employees);
         Form ifrm = new Сотрудники();
         ifrm.Show();
         this.Hide();
     }
 }