Example #1
0
    protected void getTestDatesByRegNo()
    {
        try
        {
            DataTable dt = objDiag.GetTestDatesByRegNoBAL(txtRegno.Text.Trim(), ConnKey);
            if (dt.Rows.Count > 0)
            {
                GvVisitDates.Visible    = true;
                GvVisitDates.DataSource = dt;
                GvVisitDates.DataBind();
                if (dt.Rows.Count > 0)
                {
                    GvVisitDates.HeaderRow.Cells[0].Attributes["data-class"] = "expand";

                    GvVisitDates.HeaderRow.TableSection = TableRowSection.TableHeader;
                }
                lblNoRecordFound.Visible = false;
            }
            else
            {
                lblNoRecordFound.Visible = true;
                GvVisitDates.Visible     = false;
            }
        }
        catch (Exception ex)
        {
            ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString());
            Response.Redirect("~/Error.aspx");
        }
    }
 protected void getVisitDatesByRegNo()
 {
     try
     {
         DataTable dt = ObjIns.GetVisitDatesByRegNoBAL(txtRegno.Text.Trim(), ConnKey);
         if (dt.Rows.Count > 0)
         {
             GvVisitDates.DataSource = dt;
             GvVisitDates.DataBind();
         }
     }
     catch (Exception ex)
     {
         ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString());
         Response.Redirect("~/Error.aspx");
     }
 }