コード例 #1
0
 private void newStudentButton_ItemClick(object sender, ItemClickEventArgs e)
 {
     var newStudent = new StudentsForm(this) { StartPosition = FormStartPosition.CenterParent, Text = @"Student [new]" };
     Properties.Settings.Default.formType = "new";
     Properties.Settings.Default.Save();
     newStudent.ShowDialog();
 }
コード例 #2
0
 public void stdEdit()
 {
     Properties.Settings.Default.formType = "edit";
     Properties.Settings.Default.stdID =
         studentsGridUC1.studentsGridView.GetRowCellValue(studentsGridUC1.studentsGridView.FocusedRowHandle,
             "_id").ToString();
     Properties.Settings.Default.stdLastID = studentsGridUC1.studentsGridView.GetRowCellValue(studentsGridUC1.studentsGridView.FocusedRowHandle,
             "_id").ToString();
     Properties.Settings.Default.stdFullname = studentsGridUC1.studentsGridView.GetRowCellValue(studentsGridUC1.studentsGridView.FocusedRowHandle,
             "fullname").ToString();
     Properties.Settings.Default.Save();
     var newStudent = new StudentsForm(this) { StartPosition = FormStartPosition.CenterParent, Text = @"Student edit"};
     newStudent.ShowDialog();
 }