private void btnPrint_Click(object sender, EventArgs e) { try { cn.Open(); SqlCommand cmd = new SqlCommand("Insert into CatsMarkSheetBlank (Name,ADM,KCPE,STREAM,FORM,Year) SELECT Name,ADM,KCPE,STREAM,FORM,Year from AddStudents where ADM NOT IN(select ADM from CatsMarkSheetBlank)", cn); cmd.ExecuteNonQuery(); MarkSheetGenerate frm = new MarkSheetGenerate(); frm.Show(); cn.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } cn.Close(); }
private void btnLoad_Click(object sender, EventArgs e) { MarkSheetGenerate frm = new MarkSheetGenerate(); frm.Show(); }