public void UpdateObjectiveQuestion() { BLLQuestion objbll = new BLLQuestion(); objbll.Id = (int)Session["ques_update"]; objbll.Answer_type = "Objective"; objbll.No_of_answer = cbnoofanswers.SelectedItem.ToString(); objbll.Topic = txttopic.Text; objbll.Question = txtquestion.Text; objbll.Ques_level = cblevel.SelectedItem.ToString(); objbll.Answer_a = txta.Text; objbll.Answer_b = txtb.Text; objbll.Answer_c = txtc.Text; objbll.Answer_d = txtd.Text; if (rba.Checked == true) { objbll.Correct_answer = "A"; } else if (rbb.Checked == true) { objbll.Correct_answer = "B"; } else if (rbc.Checked == true) { objbll.Correct_answer = "C"; } else { objbll.Correct_answer = "D"; } objbll.Modifiedby = user; int a = objbll.UpdateQuestion(objbll); if (a == 1) { lblresult.Text = "Question Update Successfully...."; BtnSave.Enabled = false; BtnNew.Enabled = true; txttopic.Focus(); Session["mode"] = null; } }
public void UpdateSubjectiveQuestion() { BLLQuestion objbll = new BLLQuestion(); objbll.Answer_type = "Subjective"; objbll.Topic = txttopic.Text; objbll.Question = txtquestion.Text; objbll.Ques_level = cblevel.SelectedItem.ToString(); objbll.Modifiedby = user; int a = objbll.UpdateQuestion(objbll); if (a == 1) { lblresult.Text = "Question Update Successfully...."; BtnSave.Enabled = false; BtnNew.Enabled = true; txttopic.Focus(); Session["mode"] = null; } }