private void button3_Click(object sender, EventArgs e) { EbookContext context = new EbookContext(); Student st = new Student(SecondName.Text, FirstName.Text, ThirdName.Text, BirthDate.Value, Group.Text, Status.Text); context.Students.Add(st); context.SaveChanges(); SecondName.Text = "Фамилия"; FirstName.Text = "Имя"; ThirdName.Text = "Отчество"; Zachetka.Text = "Номер зачетной книжки"; Group.Text = "Группа"; Status.Text = "Статус"; }
public Marks() { context = new EbookContext(); repo = new MarkRepository(context); InitializeComponent(); }
public SubjectAdd() { context = new EbookContext(); repo = new SubjectRepository(context); InitializeComponent(); }
public MarkRepository(EbookContext context) { this.context = context; }
public SubjectRepository(EbookContext context) { this.context = context; }
public Group_repository(EbookContext context) { this.context = context; }
public EmployeeRepository(EbookContext context) { this.context = context; }
public Autorization() { InitializeComponent(); context = new EbookContext(); }