Beispiel #1
0
 protected void btnSave_Click(Object Sender, EventArgs e)
 {
     oProjectRequest.DeleteQuestionsClass(intQuestion);
     foreach (TreeNode oNode in oTreeview.Nodes)
     {
         if (oNode.Checked == true)
         {
             oProjectRequest.AddQuestionsClass(intQuestion, Int32.Parse(oNode.Value));
         }
     }
     Reload();
 }
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     if (boolAdd)
     {
         string strDisplay = oRequest.MaximumProjectRequestQuestions();
         int    intDisplay = 0;
         if (strDisplay != "")
         {
             intDisplay = Int32.Parse(strDisplay);
         }
         int intQuestionID = oRequest.AddQuestion(txtQuestion.Text, txtQuestion.Text, intDisplay + 1, (hdnEnabled.Value.ToString() == "true" ? 1 : 0), (hdnRequired.Value.ToString() == "true" ? 1 : 0));
         oRequest.AddQuestionsClass(intQuestionID, Int32.Parse(drpClass.SelectedValue));
         oRequest.AddQA(strBase, intOrganizationId, intQuestionID);
     }
     else
     {
         oRequest.UpdateQuestionsClass(intQuestionId, Int32.Parse(drpClass.SelectedValue));
         oRequest.UpdateQuestion(intQuestionId, txtQuestion.Text.Trim(), txtQuestion.Text.Trim(), (hdnEnabled.Value.ToString() == "true" ? 1 : 0), (hdnRequired.Value.ToString() == "true" ? 1 : 0));
     }
     Redirect();
 }