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