コード例 #1
0
 protected void LoadQuestionPaper(string questions)
 {
     try
     {
         SMHR_TRAINING_QUESTIONBANK oSMHR_TRAINING_QUESTIONBANK = new SMHR_TRAINING_QUESTIONBANK();
         oSMHR_TRAINING_QUESTIONBANK.OPERATION             = operation.Select3;
         oSMHR_TRAINING_QUESTIONBANK.QuestionBank_Question = questions;
         DataTable dt = BLL.get_QuestionBank(oSMHR_TRAINING_QUESTIONBANK);
         Session["Questions"] = dt;
         PagedDataSource objPagedDataSource = new PagedDataSource();
         objPagedDataSource.DataSource       = dt.DefaultView;
         objPagedDataSource.CurrentPageIndex = 0;
         objPagedDataSource.PageSize         = 1;
         objPagedDataSource.AllowPaging      = true;
         dl_QuestionPaper.DataSource         = objPagedDataSource;
         //dl_QuestionPaper.ItemCommand += new DataListCommandEventHandler(dl_QuestionPaper_ItemCommand);
         dl_QuestionPaper.DataBind();
         Session["PagedDataSource"] = objPagedDataSource;
         btnPrevious.Enabled        = false;
         if (dt.Rows.Count > 1)
         {
             btnNext.Enabled = true;
         }
         else
         {
             btnNext.Enabled = false;
         }
     }
     catch (Exception ex)
     {
         //Utils.HandleWebException(ex, this);
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Frm_Assessment", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
     }
 }
コード例 #2
0
 protected void radChapters_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
 {
     try
     {
         SMHR_TRAINING_QUESTIONBANK _obj_Question = new SMHR_TRAINING_QUESTIONBANK();
         _obj_Question.OPERATION = operation.Select2;
         _obj_Question.QuestionBank_ChapterID       = Convert.ToInt32(radChapters.SelectedValue);
         _obj_Question.QuestionBank_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
         radQuestions.DataSource     = BLL.get_QuestionBank(_obj_Question);
         radQuestions.DataTextField  = "Questionbank_question";
         radQuestions.DataValueField = "QuestionBank_ID";
         radQuestions.DataBind();
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_TrainingFeedBack", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
     }
 }