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(); }
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(); }