Пример #1
0
        private void shortcut_Click(object sender, RoutedEventArgs e)
        {
            AddStudent viewStudent = new AddStudent();

            (this.Parent as Grid).Children.Add(viewStudent);
            (this.Parent as Grid).Children.Remove(this);
        }
Пример #2
0
 private void Student_list_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         var        sels   = (student_list.SelectedItem as DataRowView)["reg_no"].ToString();
         AddStudent adstud = new AddStudent();
         adstud.stringaccmode(sels);
         (this.Parent as Grid).Children.Add(adstud);
         (this.Parent as Grid).Children.Remove(this);
     }
     catch (Exception)
     {
         //MessageBox.Show(ex.GetType().Name);
     }
 }