Exemple #1
0
 private void okButton_Click(object sender, EventArgs e)
 {
     db.ControlPoints.Add(new ControlPoint {
         Date = dateTimePicker1.Value.Date
     });
     db.SaveChanges();
     Close();
 }
Exemple #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "")
     {
         MessageBox.Show("Заполните все поля");
     }
     else
     {
         selectedSubject.Name = textBox1.Text;
         db.SaveChanges();
         Close();
     }
 }
Exemple #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "")
     {
         MessageBox.Show("Заполните все поля");
     }
     else
     {
         selectedGroup.Number    = Convert.ToInt32(textBox1.Text);
         selectedGroup.Specialty = selectedSpecialty;
         db.SaveChanges();
         Close();
     }
 }
Exemple #4
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "")
     {
         MessageBox.Show("Заполните все поля");
     }
     else
     {
         db.Teachers.Add(new Teacher {
             FirstName = textBox1.Text, MiddleName = textBox2.Text, LastName = textBox3.Text, Subjects = teacherSubjects.Remove(teacherSubjects.Length - 1)
         });
         db.SaveChanges();
         Close();
     }
 }
Exemple #5
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "")
     {
         MessageBox.Show("Заполните все поля");
     }
     else
     {
         db.Specialties.Add(new Specialty {
             Name = textBox1.Text, Department = selectedDepartment
         });
         db.SaveChanges();
         Close();
     }
 }
Exemple #6
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "")
     {
         MessageBox.Show("Заполните все поля");
     }
     else
     {
         db.Students.Add(new Student {
             FirstName = textBox1.Text, MiddleName = textBox2.Text, LastName = textBox3.Text, Enterance = dateTimePicker1.Value.Date, Group = selectedGroup
         });
         db.SaveChanges();
         Close();
     }
 }
Exemple #7
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "")
     {
         MessageBox.Show("Заполните все поля");
     }
     else
     {
         selectedTeacher.FirstName  = textBox1.Text;
         selectedTeacher.MiddleName = textBox2.Text;
         selectedTeacher.LastName   = textBox3.Text;
         selectedTeacher.Subjects   = teacherSubjects.Remove(teacherSubjects.Length - 1);
         db.SaveChanges();
         Close();
     }
 }
Exemple #8
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "")
     {
         MessageBox.Show("Заполните все поля");
     }
     else
     {
         selectedStudent.Group      = selectedGroup;
         selectedStudent.Enterance  = dateTimePicker1.Value.Date;
         selectedStudent.FirstName  = textBox1.Text;
         selectedStudent.MiddleName = textBox2.Text;
         selectedStudent.LastName   = textBox3.Text;
         db.SaveChanges();
         Close();
     }
 }
Exemple #9
0
 private void saveButton_Click(object sender, EventArgs e)
 {
     db.SaveChanges();
 }
Exemple #10
0
 private void button1_Click(object sender, EventArgs e)
 {
     db.Teachers.Remove(selectedTeacher);
     db.SaveChanges();
     Close();
 }
Exemple #11
0
 private void okButton_Click(object sender, EventArgs e)
 {
     db.ControlPoints.Remove(selectedCP);
     db.SaveChanges();
     Close();
 }
Exemple #12
0
 private void button1_Click(object sender, EventArgs e)
 {
     db.Specialties.Remove(selectedSpecialty);
     db.SaveChanges();
     Close();
 }
Exemple #13
0
 private void button1_Click(object sender, EventArgs e)
 {
     db.Groups.Remove(selectedGroup);
     db.SaveChanges();
     Close();
 }
Exemple #14
0
 private void okButton_Click(object sender, EventArgs e)
 {
     selectedCP.Date = dateTimePicker1.Value.Date;
     db.SaveChanges();
     Close();
 }
Exemple #15
0
 private void button1_Click(object sender, EventArgs e)
 {
     db.Departments.Remove(selectedDepartment);
     db.SaveChanges();
     Close();
 }