Example #1
0
 // Delete exam
 private void MBtnDeleteExam_Click(object sender, EventArgs e)
 {
     if (bsListExam.Count > 0)
     {
         DialogResult result = MessageBox.Show("Bạn có thật sự muốn xoá kỳ thi?", "Xoá kỳ thi", MessageBoxButtons.YesNo);
         if (result == DialogResult.Yes)
         {
             var examId = (string)mGridListExam.SelectedRows[0].Cells[0].Value;
             DeleteExam?.Invoke(examId, null);
         }
     }
 }
    protected void txt_delete_Click(object sender, EventArgs e)
    {
        string a, b, c, d, f, g, h;

        a = txt_question.Text;
        b = txt_1.Text;
        c = txt_2.Text;
        d = txt_3.Text;
        f = txt_4.Text;
        g = dd1.SelectedValue;
        if (g == "CHOICE A")
        {
            h = b;
        }
        else if (g == "CHOICE B")
        {
            h = c;
        }
        else if (g == "CHOICE C")
        {
            h = d;
        }
        else
        {
            h = f;
        }
        int count = 0;

        DeleteExam.delete(name, id, ref count);
        txt_question.Text = "";
        txt_1.Text        = "";
        txt_2.Text        = "";
        txt_3.Text        = "";
        txt_4.Text        = "";
        lbl_number.Text   = count.ToString();
    }