예제 #1
0
 private void okButton_Click(object sender, EventArgs e)
 {
     db.ControlPoints.Add(new ControlPoint {
         Date = dateTimePicker1.Value.Date
     });
     db.SaveChanges();
     Close();
 }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "")
     {
         MessageBox.Show("Заполните все поля");
     }
     else
     {
         selectedSubject.Name = textBox1.Text;
         db.SaveChanges();
         Close();
     }
 }
예제 #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();
     }
 }
예제 #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();
     }
 }
예제 #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();
     }
 }
예제 #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();
     }
 }
예제 #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();
     }
 }
예제 #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();
     }
 }
예제 #9
0
 private void saveButton_Click(object sender, EventArgs e)
 {
     db.SaveChanges();
 }
예제 #10
0
 private void button1_Click(object sender, EventArgs e)
 {
     db.Teachers.Remove(selectedTeacher);
     db.SaveChanges();
     Close();
 }
예제 #11
0
 private void okButton_Click(object sender, EventArgs e)
 {
     db.ControlPoints.Remove(selectedCP);
     db.SaveChanges();
     Close();
 }
예제 #12
0
 private void button1_Click(object sender, EventArgs e)
 {
     db.Specialties.Remove(selectedSpecialty);
     db.SaveChanges();
     Close();
 }
예제 #13
0
 private void button1_Click(object sender, EventArgs e)
 {
     db.Groups.Remove(selectedGroup);
     db.SaveChanges();
     Close();
 }
예제 #14
0
 private void okButton_Click(object sender, EventArgs e)
 {
     selectedCP.Date = dateTimePicker1.Value.Date;
     db.SaveChanges();
     Close();
 }
예제 #15
0
 private void button1_Click(object sender, EventArgs e)
 {
     db.Departments.Remove(selectedDepartment);
     db.SaveChanges();
     Close();
 }