Beispiel #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (gridView1.RowCount != 0)
            {
                var dc = new ClassSRMDataContext(Config.connection);

                int id = (int)gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Id");
                dc.AddQuastion((int)cmbClass.EditValue, id, cmbBook.Text);
                gridView1.DeleteSelectedRows();
                Hide();
                Close();
                PointBook.isQuastion = true;
                PointBook.bookIndex  = cmbBook.SelectedIndex;
                PointBook.StudentId  = id;
                PointBook.SchoolId   = (int)cmbClass.EditValue;
                new PointBook().ShowDialog();
            }
        }