Пример #1
0
 private void tsbtnDel_Click(object sender, EventArgs e)
 {
     if (dataGridView1.CurrentCell != null)
     {
         if (MessageBox.Show("是否删除记录?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
         {
             try
             {
                 ScoreBll.ScoreDel(dataGridView1.CurrentRow.Cells[2].Value.ToString());
                 MessageBox.Show("删除成功");
                 dataGridView1.DataSource = ScoreBll.ScoreFillDs("").Tables[0];
                 getcolumn();
             }
             catch (Exception ee)
             {
                 MessageBox.Show("删除失败!" + ee);
                 throw;
             }
         }
     }
 }
Пример #2
0
 private void tsbtnSerch_Click(object sender, EventArgs e)
 {
     dataGridView1.DataSource = ScoreBll.ScoreFillDs(tscboPaper.ComboBox.SelectedValue.ToString()).Tables[0];
     getcolumn();
 }
Пример #3
0
 private void frmScoreManage_Load(object sender, EventArgs e)
 {
     dataGridView1.DataSource = ScoreBll.ScoreFillDs("").Tables[0];
     getcolumn();
     PaperBll.FillcboPaper(tscboPaper.ComboBox);
 }