Пример #1
0
 protected void BindProgramsInfo()
 {
     try
     {
         DataTable dt = new DataTable();
         dt = objBL_ExamMaster.BL_BindQuestion(objML_ExamMaster);
         if (dt.Rows.Count > 0)
         {
             GrdQuestion.AllowPaging = true;
             GrdQuestion.DataSource  = dt;
             GrdQuestion.DataBind();
         }
     }
     catch (Exception ex)
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('" + ex.Message.ToString() + "');", true);
     }
 }
Пример #2
0
 protected void Search(object sender, EventArgs e)
 {
     try
     {
         DataTable dt = new DataTable();
         objML_ExamMaster.ID = txtSearch.Text != "" ? txtSearch.Text : null;
         dt = objBL_ExamMaster.BL_SerachQuestion(objML_ExamMaster);
         if (dt.Rows.Count > 0)
         {
             GrdQuestion.AllowPaging = false;
             GrdQuestion.DataSource  = dt;
             GrdQuestion.DataBind();
         }
         else
         {
             ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('No Data Found')", true);
         }
     }
     catch (Exception ex)
     {
         ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('" + ex.Message.ToString() + "');", true);
     }
 }