Пример #1
0
 private void viewdata()
 {
     try
     {
         DataTable dt1       = new DataTable();
         DateTime  VisitDate = DateTime.Parse(txtDate.Text, provider, System.Globalization.DateTimeStyles.NoCurrentDateDefault).Date;
         dt1 = objFbBL.GetPatientDtlsForFeedback_ByVisitDateBAL(ddlInst.SelectedValue, VisitDate, Session["UsrName"].ToString(), ConnKey);
         if (dt1.Rows.Count > 0)
         {
             GvPatientDtls.DataSource = dt1;
             GvPatientDtls.DataBind();
             GvPatientDtls.Visible = true;
         }
         else
         {
             GvPatientDtls.DataSource = null;
             GvPatientDtls.DataBind();
             GvPatientDtls.Visible = true;
         }
     }
     catch (Exception ex)
     {
         ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString());
         Response.Redirect("~/Error.aspx");
     }
 }
    private void viewdata()
    {
        try
        {
            if (txtDate.Text.Trim() == "")
            {
                objCommon.ShowAlertMessage("Select Date");
                txtDate.Focus();
                return;
            }
            else
            {
                if (!objValidate.IsDate(txtDate.Text.Trim()))
                {
                    objCommon.ShowAlertMessage("Enter Valid Date");
                    txtDate.Focus();
                    return;
                }
            }
            DateTime  date = DateTime.Parse(txtDate.Text.Trim(), provider, System.Globalization.DateTimeStyles.NoCurrentDateDefault).Date;
            DataTable dt1  = new DataTable();

            dt1 = objPhar.AnimaldetailsBAL(Session["UniqueInstId"].ToString(), date, ConnKey);
            if (dt1.Rows.Count > 0)
            {
                GvPatientDtls.Visible    = true;
                GvPatientDtls.DataSource = dt1;
                GvPatientDtls.DataBind();
                lblMsg.Visible = false;
                if (dt1.Rows.Count > 0)
                {
                    GvPatientDtls.HeaderRow.Cells[0].Attributes["data-class"] = "expand";

                    //Attribute to hide column in Phone.
                    GvPatientDtls.HeaderRow.Cells[1].Attributes["data-hide"] = "phone";
                    GvPatientDtls.HeaderRow.Cells[2].Attributes["data-hide"] = "phone";
                    GvPatientDtls.HeaderRow.Cells[3].Attributes["data-hide"] = "phone";

                    //Adds THEAD and TBODY to GridView.
                    GvPatientDtls.HeaderRow.TableSection = TableRowSection.TableHeader;
                }
            }
            else
            {
                GvPatientDtls.Visible = false;
                lblMsg.Visible        = true;
                lblMsg.Text           = "No Records in selected date";
            }
        }


        catch (Exception ex)
        {
            ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString());
            Response.Redirect("~/Error.aspx");
        }
    }
Пример #3
0
 protected void txtDate_OnTextChnaged(object sender, EventArgs e)
 {
     trPatientDtls.Visible    = false;
     btnSubmit.Visible        = false;
     btnCloseFb.Visible       = false;
     GvPatientDtls.DataSource = null;
     GvPatientDtls.DataBind();
     GvPatientDtls.Visible = true;
     RefreshFields();
 }
Пример #4
0
 protected void ddlIns_OnSelectedIndexChanged(object sender, EventArgs e)
 {
     trPatientDtls.Visible    = false;
     btnSubmit.Visible        = false;
     btnCloseFb.Visible       = false;
     GvPatientDtls.DataSource = null;
     GvPatientDtls.DataBind();
     GvPatientDtls.Visible = true;
     RefreshFields();
 }
Пример #5
0
 protected void ddlDist_OnSelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         /*Bind Institutions By Dist Code*/
         DataTable ddt = objMstBL.GetInstByDistCodeBAL(ddlState.SelectedValue.ToString(), ddlDist.SelectedValue.ToString(), ConnKey);
         objCommon.BindDropDownLists(ddlInst, ddt, "InstitutionName", "Unique_InstId", "0");
         trPatientDtls.Visible    = false;
         btnSubmit.Visible        = false;
         btnCloseFb.Visible       = false;
         GvPatientDtls.DataSource = null;
         GvPatientDtls.DataBind();
         GvPatientDtls.Visible = true;
     }
     catch (Exception ex)
     {
         Response.Redirect("~/Error.aspx");
     }
 }
    private void viewdata()
    {
        try
        {
            if (txt_FregNo.Text.Trim() != "")
            {
                DataTable dt1 = new DataTable();
                //string Regno = "1";
                //DateTime RegDate = DateTime.Parse(txtDate.Text, provider, System.Globalization.DateTimeStyles.NoCurrentDateDefault).Date;
                dt1 = objDiag.getDiagDtlsRegBAL(Session["UniqueInstId"].ToString(), txt_FregNo.Text.Trim(), ConnKey);
                if (dt1.Rows.Count > 0)
                {
                    GvPatientDtls.DataSource = dt1;
                    GvPatientDtls.DataBind();
                    if (dt1.Rows.Count > 0)
                    {
                        GvPatientDtls.HeaderRow.Cells[1].Attributes["data-class"] = "expand";
                        //Attribute to hide column in Phone.
                        GvPatientDtls.HeaderRow.Cells[0].Attributes["data-hide"] = "phone";
                        GvPatientDtls.HeaderRow.Cells[2].Attributes["data-hide"] = "phone";
                        GvPatientDtls.HeaderRow.Cells[3].Attributes["data-hide"] = "phone";
                        GvPatientDtls.HeaderRow.Cells[4].Attributes["data-hide"] = "phone";

                        GvPatientDtls.HeaderRow.TableSection = TableRowSection.TableHeader;
                    }
                }
                else
                {
                    GvPatientDtls.DataSource = null;
                    GvPatientDtls.DataBind();
                }
            }
            else
            {
                DataTable dt1 = new DataTable();
                if (txtDate.Text.Trim() != "")
                {
                    if (!objValidate.IsDate(txtDate.Text.Trim()))
                    {
                        objCommon.ShowAlertMessage("Enter Valid Date");
                        txtDate.Focus();
                        return;
                    }
                }
                DateTime RegDate = DateTime.Parse(txtDate.Text, provider, System.Globalization.DateTimeStyles.NoCurrentDateDefault).Date;
                dt1 = objDiag.getDiagDtlsBAL(Session["UniqueInstId"].ToString(), RegDate, ConnKey);
                if (dt1.Rows.Count > 0)
                {
                    GvPatientDtls.DataSource = dt1;
                    GvPatientDtls.DataBind();
                }
                else
                {
                    GvPatientDtls.DataSource = null;
                    GvPatientDtls.DataBind();
                }
            }
        }
        catch (Exception ex)
        {
            ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString());
            Response.Redirect("~/Error.aspx");
        }
    }
Пример #7
0
    private void viewdata()
    {
        string RegNo;

        try
        {
            if (txtDate.Text.Trim() == "")
            {
                txtDate.Text = DateTime.Today.ToString("dd/MM/yyyy");
            }

            if (txtDate.Text.Trim() != "")
            {
                if (!objValidate.IsDate(txtDate.Text.Trim()))
                {
                    objCommon.ShowAlertMessage("Enter Valid Date");
                    txtDate.Focus();
                    return;
                }
            }


            ViewState["VisitDate"] = txtDate.Text.Trim();
            if (txt_FregNo.Text.Trim() != "")
            {
                RegNo = txt_FregNo.Text.Trim();
            }
            else
            {
                RegNo = "ALL";
            }

            DataTable dt1       = new DataTable();
            DateTime  VisitDate = DateTime.Parse(txtDate.Text, provider, System.Globalization.DateTimeStyles.NoCurrentDateDefault).Date;
            dt1 = objRptBL.GetPatientDtlsByRegNo_VisitDateBAL(UniqueInstId, RegNo, VisitDate, ConnKey);
            if (dt1.Rows.Count > 0)
            {
                GvPatientDtls.DataSource = dt1;
                GvPatientDtls.DataBind();
                GvPatientDtls.Visible = true;
                if (dt1.Rows.Count > 0)
                {
                    GvPatientDtls.HeaderRow.Cells[1].Attributes["data-class"] = "expand";

                    //Attribute to hide column in Phone.
                    GvPatientDtls.HeaderRow.Cells[0].Attributes["data-hide"] = "phone";
                    GvPatientDtls.HeaderRow.Cells[2].Attributes["data-hide"] = "phone";
                    GvPatientDtls.HeaderRow.Cells[3].Attributes["data-hide"] = "phone";
                    GvPatientDtls.HeaderRow.Cells[4].Attributes["data-hide"] = "phone";
                    //GvPatientDtls.HeaderRow.Cells[5].Attributes["data-hide"] = "phone";
                    //GvPatientDtls.HeaderRow.Cells[6].Attributes["data-hide"] = "phone";
                    //GvPatientDtls.HeaderRow.Cells[7].Attributes["data-hide"] = "phone";
                    //GvPatientDtls.HeaderRow.Cells[8].Attributes["data-hide"] = "phone";
                    //GvPatientDtls.HeaderRow.Cells[9].Attributes["data-hide"] = "phone";
                    //GvPatientDtls.HeaderRow.Cells[10].Attributes["data-hide"] = "phone";
                    //Adds THEAD and TBODY to GridView.
                    GvPatientDtls.HeaderRow.TableSection = TableRowSection.TableHeader;
                }
            }
            else
            {
                GvPatientDtls.DataSource = null;
                GvPatientDtls.DataBind();
                GvPatientDtls.Visible = true;
            }
        }
        catch (Exception ex)
        {
            ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString());
            Response.Redirect("~/Error.aspx");
        }
    }