private void Add_S()
        {
            StudentDBEntities db      = new StudentDBEntities();
            Student           student = new Student()
            {
                S_Name  = Name,
                S_Group = Group,
                S_Date  = Date
            };

            db.Students.Add(student);
            db.SaveChanges();
        }
        private void Add_T()
        {
            StudentDBEntities db      = new StudentDBEntities();
            ThemeDB           dnevnik = new ThemeDB()
            {
                Theme   = Theme_Add,
                Data    = Date_Add,
                Zadanie = Zadanie_Add
            };

            db.ThemeDBs.Add(dnevnik);
            db.SaveChanges();
        }
        private void Delete_Student_Click(object sender, RoutedEventArgs e)
        {
            StudentDBEntities db = new StudentDBEntities();
            var r = from d in db.Students
                    where d.Id == updatingStudentID
                    select d;
            Student obj = r.SingleOrDefault();

            if (obj != null)
            {
                MessageBoxResult result = MessageBox.Show("Удалить студента?", "StudInfo v2.0 b.3", MessageBoxButton.YesNo);
                switch (result)
                {
                case MessageBoxResult.Yes:
                    db.Students.Remove(obj);
                    db.SaveChanges();
                    MessageBox.Show("Студент успешно удален", "StudInfo v2.0 b.3");
                    break;
                }
            }
            db.SaveChanges();
            MessageBox.Show("Обновите окно для отображения изменений", "", MessageBoxButton.OK, MessageBoxImage.Warning);
        }
        private void Save_Student_Click(object sender, RoutedEventArgs e)
        {
            StudentDBEntities db = new StudentDBEntities();
            var r = from d in db.Students
                    where d.Id == updatingStudentID
                    select d;
            Student obj = r.SingleOrDefault();

            if (obj != null)
            {
                obj.S_Name = FIO_Student.Text.ToString();
                DateTime?DT_Date = Date_Student.SelectedDate;
                Date        = DT_Date.Value.ToShortDateString();
                obj.S_Date  = Date;
                obj.S_Group = Group_Student.Text.ToString();
            }
            db.SaveChanges();
            MessageBox.Show("Обновите окно для отображения изменений", "", MessageBoxButton.OK, MessageBoxImage.Warning);
        }