Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     vATSession = (ATSession)Session["User"];
     if (vATSession == null)
     {
         Response.Redirect("Default.aspx");
     }
     if (!IsPostBack)
     {
         try
         {
             ValidateUserAccess();
         }
         catch (Exception xe) { ShowMsg(xe); }
     }
 }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID = Request.QueryString["ID"];

        if (!IsPostBack)
        {
            try
            {
                ValidateUserAccess();
                ATCommon.FillDrpDown(DDLCAT, DBManager.Get(new Hashtable(), "CMB_DIS_CAT_MASTER"), "Select Category Name", "DCAT_NAME", "DCAT_ID", "0");

                if (vID != null)
                {
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("ID", vID);
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_PRODUCT_ID"));
                    if (vDR != null)
                    {
                        TXTID.Value        = vDR["PRODM_ID"].ToString();
                        PROD_NAME_TXT.Text = vDR["PRODM_NAME"].ToString();
                        //PROD_MRP_TXT.Text = vDR["PRODM_MRP"].ToString();
                        //PROD_RTP_TXT.Text = vDR["PRODM_RET_PRICE"].ToString();
                        //PROD_STK_TXT.Text = vDR["PRODM_STK_PRICE"].ToString();
                        //PROD_SYN_TXT.Text = vDR["PRODM_SYNP"].ToString();
                        TXT_LINK.Text               = vDR["PRODM_LINK"].ToString();
                        DDLCAT.SelectedItem.Text    = vDR["DCAT_NAME"].ToString();
                        DDLSUBCAT.SelectedItem.Text = vDR["DSCAT_DESC"].ToString();
                        HiddenField1.Value          = vDR["DCAT_ID"].ToString();
                        HiddenField2.Value          = vDR["DSCAT_ID"].ToString();
                        HiddenField3.Value          = vDR["DCAT_NAME"].ToString();
                        HiddenField4.Value          = vDR["DSCAT_DESC"].ToString();
                        VIDEO_LINK.Text             = vDR["PRODM_VIDEO_LINK"].ToString();
                    }
                    else
                    {
                        ShowMsg("Invalid Product ID");
                    }
                }
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
Ejemplo n.º 3
0
 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "modify")
     {
         vATSession = (ATSession)Session["User"];
         if (!vATSession.UserType.Equals("ADMIN"))
         {
             int       index      = Convert.ToInt16(e.CommandArgument);
             Label     PTF_ID     = (Label)GridView1.Rows[index].FindControl("PTF_ID");
             Hashtable vHashtable = new Hashtable();
             vHashtable.Add("PTF_ID", PTF_ID.Text);
             vHashtable.Add("PTP_ID", PTP_ID.Value);
             DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_PT_PROFILE_NEW"));
             if (vDR != null)
             {
                 TXTID.Value                = vDR["PTF_ID"].ToString();
                 PTP_TXT.Text               = vDR["PTP_NAME"].ToString();
                 COND_ID.SelectedValue      = vDR["PTF_CONDID"].ToString();
                 DEVCOND_ID.SelectedValue   = vDR["PTF_DEVID"].ToString();
                 PTP_COND_DESC.Text         = vDR["PTF_CONDESC"].ToString();
                 PTP_DEV_DESC.Text          = vDR["PTF_DEVDESC"].ToString();
                 PTP_REL_DESC.Text          = vDR["PTF_RELDESC"].ToString();
                 RELATION_DDL.SelectedValue = vDR["PTF_RELATION"].ToString();
             }
         }
         else if (vATSession.UserType.Equals("ADMIN"))
         {
             int       index      = Convert.ToInt16(e.CommandArgument);
             Label     PTF_ID     = (Label)GridView1.Rows[index].FindControl("PTF_ID");
             Hashtable vHashtable = new Hashtable();
             vHashtable.Add("PTF_ID", PTF_ID.Text);
             vHashtable.Add("PTP_ID", PTP_ID.Value);
             DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_PT_PROFILE_NEW"));
             if (vDR != null)
             {
                 TXTID.Value                = vDR["PTF_ID"].ToString();
                 PTP_TXT.Text               = vDR["PTP_NAME"].ToString();
                 COND_ID.SelectedValue      = vDR["PTF_CONDID"].ToString();
                 DEVCOND_ID.SelectedValue   = vDR["PTF_DEVID"].ToString();
                 PTP_COND_DESC.Text         = vDR["PTF_CONDESC"].ToString();
                 PTP_DEV_DESC.Text          = vDR["PTF_DEVDESC"].ToString();
                 PTP_REL_DESC.Text          = vDR["PTF_RELDESC"].ToString();
                 RELATION_DDL.SelectedValue = vDR["PTF_RELATION"].ToString();
             }
         }
     }
 }
Ejemplo n.º 4
0
    public DataTable GetUser(ATSession pATSession)
    {
        if (pATSession.UserType == "ORGANIZATION")
        {
            String vID = pATSession.Login;

            Hashtable vHashtable2 = new Hashtable();
            vHashtable2.Add("USR_LOGIN", vID);
            DataRow   vDR  = RetDR(DBManager.Get(vHashtable2, "GET_USER"));
            DataTable vDT3 = DBManager.Get(vHashtable2, "GET_USER");
            return(vDT3);
        }

        Hashtable vHashtable = new Hashtable();

        return(DBManager.Get(vHashtable, "GET_USER_INFO"));
    }
Ejemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID = Request.QueryString["ID"];

        string strPreviousPage = string.Empty;

        if (Request.UrlReferrer != null)
        {
            strPreviousPage = Request.UrlReferrer.Segments[Request.UrlReferrer.Segments.Length - 1];
        }
        if (strPreviousPage == "")
        {
            Response.Redirect("~/Default.aspx");
        }

        if (!IsPostBack)
        {
            try
            {
                ValidateUserAccess();
                if (vID != null)
                {
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("ADHD_ID", vID);
                    vHashtable.Add("TYPE", "GET");
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_ADHD_MASTER"));
                    if (vDR != null)
                    {
                        TXTID.Value    = vDR["ADHD_ID"].ToString();
                        ADHD_TXT.Text  = vDR["ADHD_NAME"].ToString();
                        TRAIT_TXT.Text = vDR["ADHD_TRAIT"].ToString();
                    }
                    else
                    {
                        ShowMsg("Invalid ADHD ID");
                    }
                }
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
Ejemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];

        Hashtable vloght = new Hashtable();

        if (vATSession != null)
        {
            vloght.Add("LOG_ID", vATSession.LOG_ID);
            vloght.Add("LOG_EMP_ID", vATSession.EMP_ID);
            vloght.Add("LOG_LOGIN", vATSession.Login);
            DBManager.ExecInsUps(vloght, "UPDATE_LOGSESSION", (ATSession)Session["User"]);
        }

        Session["User"] = null;
        Session.Abandon();
        Response.Redirect("~/Default.aspx");
    }
Ejemplo n.º 7
0
    protected String GetHomeUrl()
    {
        string    homePageUrl = string.Empty;
        ATSession vATSession  = (ATSession)Session["User"];

        if (vATSession == null)
        {
            Response.Redirect("default.aspx");
        }
        if (vATSession != null)
        {
            if (vATSession.UserType == "ADMIN")
            {
                homePageUrl = "~/Admin_Welcome.aspx";
            }
            else if (vATSession.UserType == "DOCTOR" || vATSession.UserType == "Doctor")
            {
                homePageUrl = "~/doctor_welcome.aspx";
            }
            else if (vATSession.UserType == "ORGANIZATION" || vATSession.UserType == "Organization")
            {
                homePageUrl = "~/Organization_Welcome.aspx";
            }
            else if (vATSession.UserType == "Paediatrician")
            {
                homePageUrl = "~/Paediatrician_Welcome.aspx";
            }
            else if (vATSession.UserType == "PATIENT" || vATSession.UserType == "Patient")
            {
                homePageUrl = "~/Patient_Welcome.aspx";
            }
            else if (vATSession.UserType == "PARENT" || vATSession.UserType == "Parent")
            {
                homePageUrl = "~/Parent_Welcome.aspx";
            }
            else if (vATSession.UserType == "THERAPIST" || vATSession.UserType == "Therapist")
            {
                homePageUrl = "~/Therapist_Welcome.aspx";
            }
        }
        return(homePageUrl);
    }
Ejemplo n.º 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID = Request.QueryString["ID"];

        if (!IsPostBack)
        {
            try
            {
                ValidateUserAccess();

                ATCommon.FillDrpDown(DDLDOCTER, DBManager.Get(new Hashtable(), "CMB_CUST_MASTER"), "Select Docter Name", "CUST_NAME", "CUST_ID", "0");
                ATCommon.FillDrpDown(DDLSCREEN, DBManager.Get(new Hashtable(), "CMB_SCREEN_TEMPLATE"), "Select Screen Name", "SCTP_NAME", "SCTP_ID", "0");

                if (vID != null)
                {
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("PTS_ID", vID);
                    vHashtable.Add("TYPE", "GET");
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_PT_SCREEN"));
                    if (vDR != null)
                    {
                        TXTID.Value             = vDR["PTS_ID"].ToString();
                        DDLDOCTER.SelectedValue = vDR["PTS_CUSTID"].ToString();
                        DDLSCREEN.SelectedValue = vDR["PTS_SCTPID"].ToString();
                        INPUT_TXT.Text          = vDR["PTS_INPUT"].ToString();
                        Textarea1.Value         = vDR["PTS_REMARKS"].ToString();
                    }
                    else
                    {
                        ShowMsg("Invalid Patient ID");
                    }
                }
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID             = Request.QueryString["ID"];
        string strPreviousPage = string.Empty;

        if (Request.UrlReferrer != null)
        {
            strPreviousPage = Request.UrlReferrer.Segments[Request.UrlReferrer.Segments.Length - 1];
        }
        if (strPreviousPage == "")
        {
            Response.Redirect("~/Default.aspx");
        }

        if (!IsPostBack)
        {
            try
            {
                if (vID != null)
                {
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("@DIS_ID", vID);
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_ID"));
                    if (vDR != null)
                    {
                    }
                    else
                    {
                        ShowMsg("Invalid Patient ID");
                    }
                }
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
Ejemplo n.º 10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];

        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID = Request.QueryString["ID"];

        if (!IsPostBack)
        {
            try
            {
                ValidateUserAccess();
                ATCommon.FillDrpDown(DDLDCAT, DBManager.Get(new Hashtable(), "GET_DCAT_ID"), "Select Category", "DCAT_NAME", "DCAT_ID", "0");

                if (vID != null)
                {
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("DSCAT_ID", vID);
                    vHashtable.Add("TYPE", "GET");
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_DIS_SUBCAT_MASTER"));
                    if (vDR != null)
                    {
                        TXTID.Value           = vDR["DSCAT_ID"].ToString();
                        DSCAT_DESC_TXT.Text   = vDR["DSCAT_DESC"].ToString();
                        DDLDCAT.SelectedValue = vDR["DSCAT_DCATID"].ToString();
                    }
                    else
                    {
                        ShowMsg("Invalid Category ID");
                    }
                }
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
Ejemplo n.º 11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID = Request.QueryString["ID"];

        if (!IsPostBack)
        {
            try
            {
                ValidateUserAccess();
                ATCommon.FillDrpDown(DDLDIS, DBManager.Get(new Hashtable(), "CMB_DIS_MASTER"), "Select Disorder Name", "DIS_NAME", "DIS_ID", "0");
                if (vID != null)
                {
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("SGM_ID", vID);
                    vHashtable.Add("TYPE", "GET");
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_SEVERITY_GROUP_MASTER"));
                    if (vDR != null)
                    {
                        TXTID.Value          = vDR["SGM_ID"].ToString();
                        DDLDIS.SelectedValue = vDR["DIS_ID"].ToString();
                        DESCRIPTION_TXT.Text = vDR["SGM_DISC"].ToString();
                        FROM_TXT.Text        = vDR["SGM_FROMVALUE"].ToString();
                        TO_TXT.Text          = vDR["SGM_TOVALUE"].ToString();
                    }
                    else
                    {
                        ShowMsg("Invalid Severity ID");
                    }
                }
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];

        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID = Request.QueryString["ID"];

        if (!IsPostBack)
        {
            try
            {
                ValidateUserAccess();
                ATCommon.FillDrpDown(DDLDAGECAT, DBManager.Get(new Hashtable(), "GET_AGE_GRP_ID"), "Select Category", "AGRP_GROUP", "AGRP_ID", "0");

                if (vID != null)
                {
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("SCTP_ID", vID);
                    vHashtable.Add("TYPE", "GET");
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_SCREEN_TEMPLATE"));
                    if (vDR != null)
                    {
                        TXTID.Value = vDR["SCTP_ID"].ToString();
                        DDLDAGECAT.SelectedValue = vDR["SCTP_AGDISID"].ToString();
                        SCREEN_TXT.Text          = vDR["SCTP_NAME"].ToString();
                    }
                    else
                    {
                        ShowMsg("Invalid Screen ID");
                    }
                }
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
Ejemplo n.º 13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     vATSession = (ATSession)Session["User"];
     if (vATSession == null)
     {
         Response.Redirect("Default.aspx");
     }
     if (!IsPostBack)
     {
         try
         {
             ValidateUserAccess();
             Hashtable vHashtable = new Hashtable();
             vHashtable.Add("IEPA_ID", "0");
             vHashtable.Add("TYPE", "GETALL");
             DataTable vDT = DBManager.Get(vHashtable, "GET_IEP_SKILL_MASTER");
             DataTable dt  = DBManager.Get(vHashtable, "GET_IEP_SKILL_MASTER");
             GridView1.DataSource = dt;
             GridView1.DataBind();
         }
         catch (Exception xe) { ShowMsg(xe); }
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID = Request.QueryString["id"];

        if (!IsPostBack)
        {
            try
            {
                ValidateUserAccess();
                Label1.Text = "You may choose the Test template given against each Disorder. You can fill the data based on your patients current condition. The choosen test and the data entered will be complied and shown in the PDF report of your Patient." +
                              "<br><b>Suggested Tests</b>- Battery of tests corresponding to each disorder is given for your reference. Its totally optional whether to choose our suggested tests or not.</ br>" +
                              "<br><b>Disclaimer:</b> NerdNerdy is not providing the assessor the actual test material for the given standardized tests  VSMS, CARS-2, & DST.  The test template is provided to so that the Assessor can put and record the data of his/her pateint, thus reducing the time and effort. In these templates NerdNerdy has not substituted the actual test material.</ br>";

                ATCommon.FillDrpDown(DDLDIS, DBManager.Get(new Hashtable(), "CMB_DIS_MASTER"), "Select Disorder Name", "DIS_NAME", "DIS_ID", "0");
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
Ejemplo n.º 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID = Request.QueryString["ID"];

        if (!IsPostBack)
        {
            try
            {
                ValidateUserAccess();
                ATCommon.FillDrpDown(COUNTRY_DDL, DBManager.Get(new Hashtable(), "CMB_COUNTRY_MASTER"), "Select Country Name", "COUNTRY_NAME", "COUNTRY_ID", "0");
                if (vID != null)
                {
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("STATE_ID", vID);
                    vHashtable.Add("TYPE", "GET");
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_STATE_MASTER"));
                    if (vDR != null)
                    {
                        TXTID.Value    = vDR["STATE_ID"].ToString();
                        STATE_TXT.Text = vDR["STATE_NAME"].ToString();
                        COUNTRY_DDL.SelectedItem.Text = vDR["COUNTRY_NAME"].ToString();
                        HiddenField1.Value            = vDR["COUNTRY_ID"].ToString();
                    }
                    else
                    {
                        ShowMsg("Invalid State Name");
                    }
                }
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
Ejemplo n.º 16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        String vID  = Request.QueryString["id"];
        String vID1 = Request.QueryString["id1"];

        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        ValidateUserAccess();
        if (vATSession.UserType == "ADMIN")
        {
            Hashtable vHashtable4 = new Hashtable();
            vHashtable4.Add("CUSTID", vID);
            vHashtable4.Add("CUST_ORGANIZATION_NAME", vID1);
            DataTable dt = DBManager.Get(vHashtable4, "GET_PT_PERSONAL_NEW");
            GridView1.DataSource = dt;
            GridView1.DataBind();
            cust1.Visible       = true;
            Div1.Visible        = false;
            login_pop.Visible   = false;
            LinkButton1.Visible = false;
        }
        else if (vATSession.UserType == "Organization" || vATSession.UserType == "ORGANIZATION")
        {
            Hashtable vHashtable4 = new Hashtable();
            vHashtable4.Add("CUSTID", vID);
            vHashtable4.Add("CUST_ORGANIZATION_NAME", vID1);
            DataTable dt = DBManager.Get(vHashtable4, "GET_PT_PERSONAL_NEW");
            GridView1.DataSource = dt;
            GridView1.DataBind();
            cust1.Visible = true;
            Div1.Visible  = false;
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     vATSession = (ATSession)Session["User"];
     if (vATSession == null)
     {
         Response.Redirect("Default.aspx");
     }
     if (!IsPostBack)
     {
         try
         {
             ValidateUserAccess();
             if (vATSession.UserType == "ORGANIZATION")
             {
                 GridView1.HeaderRow.Cells[07].Visible = false;
                 foreach (GridViewRow gdr in GridView1.Rows)
                 {
                     gdr.Cells[07].Visible = false;
                 }
             }
         }
         catch (Exception xe) { ShowMsg(xe); }
     }
 }
Ejemplo n.º 18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID = Request.QueryString["ID"];

        if (!IsPostBack)
        {
            try
            {
                ValidateUserAccess();
                Hashtable vHashtable = new Hashtable();
                vHashtable.Add("RECOM_ID", "0");
                vHashtable.Add("TYPE", "GETALL");
                DataTable vDT = DBManager.Get(vHashtable, "GET_RECOMMENDATION");
                GridView1.DataSource = vDT;
                GridView1.DataBind();
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
Ejemplo n.º 19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID = Request.QueryString["ID"];

        if (!IsPostBack)
        {
            dt = new DataTable();
            DataColumn coldisname = new DataColumn();
            coldisname.DataType   = Type.GetType("System.String");
            coldisname.ColumnName = "AGDD_AGDMID";
            dt.Columns.Add(coldisname);

            DataColumn coltypgroup = new DataColumn();
            coltypgroup.DataType   = Type.GetType("System.String");
            coltypgroup.ColumnName = "AGDD_DOBSID";
            dt.Columns.Add(coltypgroup);

            DataColumn coltypgroup1 = new DataColumn();
            coltypgroup1.DataType   = Type.GetType("System.String");
            coltypgroup1.ColumnName = "AGDD_DSCATID";
            dt.Columns.Add(coltypgroup1);

            DataColumn coldcname = new DataColumn();
            coldcname.DataType   = Type.GetType("System.String");
            coldcname.ColumnName = "DCAT_NAME";
            dt.Columns.Add(coldcname);

            DataColumn coldesc = new DataColumn();
            coldesc.DataType   = Type.GetType("System.String");
            coldesc.ColumnName = "DSCAT_DESC";
            dt.Columns.Add(coldesc);

            DataColumn coldobdes = new DataColumn();
            coldobdes.DataType   = Type.GetType("System.String");
            coldobdes.ColumnName = "DOBS_DESC";
            dt.Columns.Add(coldobdes);

            DataColumn coldID = new DataColumn();
            coldID.DataType   = Type.GetType("System.String");
            coldID.ColumnName = "AGDD_ID";
            dt.Columns.Add(coldID);

            ViewState["datagrid"] = dt;
            BindGrid();
            Clear();

            DDLDIS.Enabled = true;
            DDLAGE.Enabled = true;

            try
            {
                ValidateUserAccess();

                ATCommon.FillDrpDown(DDLDIS, DBManager.Get(new Hashtable(), "CMB_DIS_MASTER"), "Select Disorder Name", "DIS_NAME", "DIS_ID", "0");
                ATCommon.FillDrpDown(DDLAGE, DBManager.Get(new Hashtable(), "CMB_AGE_GRP_MASTER"), "Select Group Name", "AGRP_GROUP", "AGRP_ID", "0");
                ATCommon.FillDrpDown(DDLCAT, DBManager.Get(new Hashtable(), "CMB_DIS_CAT_MASTER"), "Select Category Name", "DCAT_NAME", "DCAT_ID", "0");
                //ATCommon.FillDrpDown(DDLSUBCAT, DBManager.Get(new Hashtable(), "CMB_DIS_SUBCAT_MASTER"), "Select Sub Category Name", "DSCAT_DESC", "DSCAT_ID", "0");
                ATCommon.FillDrpDown(DDLOBSER, DBManager.Get(new Hashtable(), "CMB_DIS_OBSV_MASTER"), "Select Observation Name", "DOBS_DESC", "DOBS_ID", "0");
                ATCommon.FillDrpDown(ANALYSIS_DDL, DBManager.Get(new Hashtable(), "CMB_ANALYSIS_MASTER"), "Select Analysis Name", "ANM_NAME", "ANM_ID", "0");

                if (vID != null)
                {
                    Hashtable vHashtable1 = new Hashtable();
                    vHashtable1.Add("ID", vID);
                    dt = DBManager.Get(vHashtable1, "GET_AGDIS_DETAIL");
                    ViewState["datagrid"] = dt;
                    BindGrid();
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("AGDM_ID", vID);
                    vHashtable.Add("TYPE", "GET");
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_AGDIS_MASTER_NEW"));

                    if (vDR != null)
                    {
                        TXTID.Value                = vDR["AGDM_ID"].ToString();
                        DDLDIS.SelectedValue       = vDR["AGDM_DISID"].ToString();
                        DDLAGE.SelectedValue       = vDR["AGDM_AGRPID"].ToString();
                        DDLAGE.SelectedItem.Text   = vDR["AGRP_GROUP"].ToString();
                        ANALYSIS_DDL.SelectedValue = vDR["AGDM_ANMID"].ToString();
                        DDLAGE.Enabled             = false;
                        DDLDIS.Enabled             = false;
                        ANALYSIS_DDL.Enabled       = false;
                        btnAdd.Visible             = false;
                        btnSave.Visible            = false;
                        AGE_GRP.Enabled            = false;
                    }
                    else
                    {
                        ShowMsg("Invalid Age ID");
                    }
                }
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
Ejemplo n.º 20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID = Request.QueryString["ID"];

        if (!IsPostBack)
        {
            try
            {
                ValidateUserAccess();
                ATCommon.FillDrpDown(CUST_COUNTRY_DDL, DBManager.Get(new Hashtable(), "CMB_COUNTRY_MASTER"), "Select Country Name", "COUNTRY_NAME", "COUNTRY_ID", "0");
                Hashtable vHashtable1 = new Hashtable();
                vHashtable1.Add("STATE_ID", RegioanlHQ_DDL.SelectedValue.ToString());
                Hashtable vHashta = new Hashtable();
                vHashta.Add("STATE_ID", RegioanlHQ_DDL.SelectedValue);
                ATCommon.FillDrpDown(RegioanlHQ_DDL, DBManager.Get(vHashta, "CMB_State"), "Select State Name", "STATE_NAME", "STATE_ID", "");
                if (vID != null)
                {
                    if (vATSession.UserType == "ORGANIZATION" || vATSession.UserType == "Organization")
                    {
                        Hashtable vHashtable = new Hashtable();
                        vHashtable.Add("CUST_MOBILE", vID);
                        DataRow vDR2 = RetDR(DBManager.Get(vHashtable, "GET_CUSTOMER_MOBILENO"));
                        if (vDR2 != null)
                        {
                            TXTID.Value = vDR2["CUST_ID"].ToString();
                        }

                        Hashtable vHT = new Hashtable();
                        vHT.Add("USR_LOGIN", vID);
                        DataRow vDR = RetDR(DBManager.Get(vHT, "GETUSR"));
                        if (vDR != null)
                        {
                            DDL_USER_TYPE.SelectedValue = vDR["USR_TYPE"].ToString();
                            TXT_LOGIN.Text = vDR["USR_LOGIN"].ToString();
                            RegioanlHQ_DDL.SelectedIndex = RegioanlHQ_DDL.Items.IndexOf(RegioanlHQ_DDL.Items.FindByValue(vDR["USR_REGHQ_ID"].ToString()));
                            RegioanlHQ_DDL_SelectedIndexChanged(sender, e);
                            AreaHQ_DDL.SelectedIndex       = AreaHQ_DDL.Items.IndexOf(AreaHQ_DDL.Items.FindByValue(vDR["USR_ARHQ_ID"].ToString()));
                            CUST_COUNTRY_DDL.SelectedValue = vDR["USR_COUNTRY"].ToString();
                            TXT_MOBILE_NO.Text             = vDR["USR_MOBILE"].ToString();
                            TXT_EMAIL.Text        = vDR["USR_EMAIL"].ToString();
                            TXT_ADDRESS.Text      = vDR["USR_ADDRESS"].ToString();
                            TXT_PIN.Text          = vDR["USR_PIN"].ToString();
                            TXT_ORGANIZATION.Text = vDR["USR_ORGANIZATION_NAME"].ToString();
                            DDL_USER_TYPE.Enabled = false;
                            TXT_LOGIN.Enabled     = false;
                            TXT_PASSWORD.Text     = vDR["USR_PASSWORD"].ToString();
                            TXT_PASSWORD.Enabled  = false;
                            TXT_START.Text        = vDR["USR_FROM_DATE"].ToString();
                            TXT_END.Text          = vDR["USR_TO_DATE"].ToString();
                            TXT_Sub.Text          = vDR["USR_SUBSCRIPTION_NUMBER"].ToString();
                            TXT_PATIENT.Text      = vDR["USR_PATIENT_SUBSCRIPTION_NUMBER"].ToString();
                            TXT_Sub.Enabled       = false;
                        }
                    }
                    else
                    {
                        Hashtable vHashtable = new Hashtable();
                        vHashtable.Add("CUST_MOBILE", vID);
                        DataRow vDR2 = RetDR(DBManager.Get(vHashtable, "GET_CUSTOMER_MOBILENO"));
                        if (vDR2 != null)
                        {
                            TXTID.Value = vDR2["CUST_ID"].ToString();
                        }

                        DDL_USER_TYPE.SelectedValue = "";
                        Hashtable vHT = new Hashtable();
                        vHT.Add("USR_LOGIN", vID);
                        DataRow vDR = RetDR(DBManager.Get(vHT, "GETUSR"));
                        if (vDR != null)
                        {
                            DDL_USER_TYPE.SelectedValue = vDR["USR_TYPE"].ToString();
                            TXT_LOGIN.Text = vDR["USR_LOGIN"].ToString();
                            RegioanlHQ_DDL.SelectedIndex = RegioanlHQ_DDL.Items.IndexOf(RegioanlHQ_DDL.Items.FindByValue(vDR["USR_REGHQ_ID"].ToString()));
                            RegioanlHQ_DDL_SelectedIndexChanged(sender, e);
                            AreaHQ_DDL.SelectedIndex       = AreaHQ_DDL.Items.IndexOf(AreaHQ_DDL.Items.FindByValue(vDR["USR_ARHQ_ID"].ToString()));
                            CUST_COUNTRY_DDL.SelectedValue = vDR["USR_COUNTRY"].ToString();
                            TXT_MOBILE_NO.Text             = vDR["USR_MOBILE"].ToString();
                            TXT_EMAIL.Text        = vDR["USR_EMAIL"].ToString();
                            TXT_ADDRESS.Text      = vDR["USR_ADDRESS"].ToString();
                            TXT_PIN.Text          = vDR["USR_PIN"].ToString();
                            TXT_ORGANIZATION.Text = vDR["USR_ORGANIZATION_NAME"].ToString();
                            DDL_USER_TYPE.Enabled = false;
                            TXT_LOGIN.Enabled     = false;
                            TXT_PASSWORD.Text     = vDR["USR_PASSWORD"].ToString();
                            TXT_PASSWORD.Enabled  = false;
                            TXT_START.Text        = vDR["USR_FROM_DATE"].ToString();
                            TXT_END.Text          = vDR["USR_TO_DATE"].ToString();
                            TXT_Sub.Text          = vDR["USR_SUBSCRIPTION_NUMBER"].ToString();
                            TXT_PATIENT.Text      = vDR["USR_PATIENT_SUBSCRIPTION_NUMBER"].ToString();
                        }
                    }
                }
                else
                {
                    if (TXTID.Value == "0")
                    {
                        DDL_USER_TYPE.SelectedValue = "ADMIN";
                        TXT_PASSWORD.Enabled        = false;
                        TXT_LOGIN.Enabled           = false;
                    }
                }
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
Ejemplo n.º 21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        string strPreviousPage = string.Empty;

        if (Request.UrlReferrer != null)
        {
            strPreviousPage = Request.UrlReferrer.Segments[Request.UrlReferrer.Segments.Length - 1];
        }
        if (strPreviousPage == "")
        {
            Response.Redirect("~/Default.aspx");
        }

        if (!IsPostBack)
        {
            try
            {
                if (vATSession.UserType == "ADMIN")
                {
                    Label2.Text = "<b>Please note:</b> This application is a proprietary of NerdNerdy Technologies Pvt Ltd. The system and content related to this software is under the Patent(awaited) and Copy right protection." + "<br></br>";

                    ValidateUserAccess();
                    LinkButton1.Visible = false;
                    Div1.Visible        = false;
                    LinkButton1.Visible = false;
                    login_pop.Visible   = false;
                    ID.Visible          = false;
                }
                else if (vATSession.UserType == "ORGANIZATION" || vATSession.UserType == "Organization")
                {
                    Label2.Text = "<b>Please note:</b> This application is a proprietary of NerdNerdy Technologies Pvt Ltd. The system and content related to this software is under the Patent(awaited) and Copy right protection." + "<br></br>";

                    ValidateUserAccess();
                    LinkButton1.Visible = false;
                    Div1.Visible        = false;
                    login_pop.Visible   = false;
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("USR_LOGIN", vATSession.Login);
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_USR_LOGIN"));
                    if (vDR != null)
                    {
                        HiddenField1.Value = vDR["USR_PATIENT_SUBSCRIPTION_NUMBER"].ToString();
                        HiddenField3.Value = vDR["USR_ORGANIZATION_NAME"].ToString();
                    }
                    Hashtable vHashtable1 = new Hashtable();
                    vHashtable1.Add("CUST_ORGANIZATION_NAME", HiddenField3.Value);
                    DataRow vDR1 = RetDR(DBManager.Get(vHashtable1, "GET_COUNT_PATIENT"));
                    if (vDR1 != null)
                    {
                        HiddenField2.Value = vDR1["CUST"].ToString();
                    }

                    Hashtable vHashtable15 = new Hashtable();
                    vHashtable15.Add("USR_LOGIN", vATSession.Login);
                    DataRow vDR15 = RetDR(DBManager.Get(vHashtable15, "GET_TOTALPATIENT"));
                    if (vDR15 != null)
                    {
                        HiddenField7.Value = vDR15["USR_PATIENT_SUBSCRIPTION_NUMBER"].ToString();
                    }
                    Hashtable vHashtable16 = new Hashtable();
                    vHashtable16.Add("USR_ORGANIZATION_NAME", HiddenField3.Value);
                    DataRow vDR16 = RetDR(DBManager.Get(vHashtable16, "GET_TOTALPATIENT_NUMBER"));
                    if (vDR16 != null)
                    {
                        HiddenField10.Value = vDR16["USED_PATIENT_SUBSCRIPTION_NUMBER"].ToString();
                    }
                    if (HiddenField7.Value != "" && HiddenField10.Value != "")
                    {
                        HiddenField8.Value = Convert.ToString(Convert.ToInt32(HiddenField7.Value) - Convert.ToInt32(HiddenField10.Value));
                    }
                    if (HiddenField1.Value != "" && HiddenField2.Value != "")
                    {
                        //TXT_SUB.Text = Convert.ToString(Convert.ToInt32(HiddenField1.Value) - Convert.ToInt32(HiddenField2.Value));
                        TXT_SUB.Text    = HiddenField8.Value;
                        TXT_SUB.Enabled = false;
                        if (TXT_SUB.Text == "0")
                        {
                            ID.Visible        = true;
                            login_pop.Visible = false;
                        }
                    }
                }
                else if (vATSession.UserType == "Paediatrician")
                {
                    Label2.Text = "<b>Please note:</b> This application is a proprietary of NerdNerdy Technologies Pvt Ltd. The system and content related to this software is under the Patent(awaited) and Copy right protection." + "<br></br>";

                    ValidateUserAccess();
                    LinkButton1.Visible = false;
                    Div1.Visible        = false;
                    login_pop.Visible   = false;
                    this.GridView1.Columns[7].Visible  = false;
                    this.GridView1.Columns[8].Visible  = false;
                    this.GridView1.Columns[9].Visible  = false;
                    this.GridView1.Columns[10].Visible = false;
                    this.GridView1.Columns[11].Visible = false;
                    this.GridView1.Columns[12].Visible = false;
                    this.GridView1.Columns[13].Visible = false;
                    this.GridView1.Columns[14].Visible = false;
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("USR_LOGIN", vATSession.Login);
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_USR_LOGIN_PAEDIATRICIAN"));
                    if (vDR != null)
                    {
                        HiddenField1.Value = vDR["USR_PATIENT_SUBSCRIPTION_NUMBER"].ToString();
                        HiddenField3.Value = vDR["USR_ORGANIZATION_NAME"].ToString();
                    }
                    Hashtable vHashtable1 = new Hashtable();
                    vHashtable1.Add("CUST_ORGANIZATION_NAME", HiddenField3.Value);
                    DataRow vDR1 = RetDR(DBManager.Get(vHashtable1, "GET_COUNT_PATIENT"));
                    if (vDR1 != null)
                    {
                        HiddenField2.Value = vDR1["CUST"].ToString();
                    }

                    Hashtable vHashtable15 = new Hashtable();
                    vHashtable15.Add("USR_LOGIN", vATSession.Login);
                    DataRow vDR15 = RetDR(DBManager.Get(vHashtable15, "GET_TOTALPATIENT_PAEDIATRICIAN"));
                    if (vDR15 != null)
                    {
                        HiddenField7.Value = vDR15["USR_PATIENT_SUBSCRIPTION_NUMBER"].ToString();
                    }

                    Hashtable vHashtable36 = new Hashtable();
                    vHashtable36.Add("CUST_ORGANIZATION_NAME", HiddenField3.Value);
                    DataRow vDR36 = RetDR(DBManager.Get(vHashtable36, "GET_COUNT_CUST"));
                    if (vDR36 != null)
                    {
                        HiddenField12.Value = vDR36["CUST_ID"].ToString();
                    }

                    Hashtable vHashtable16 = new Hashtable();
                    vHashtable16.Add("PTP_CUSTID", HiddenField12.Value);
                    DataRow vDR16 = RetDR(DBManager.Get(vHashtable16, "GET_TOTALPATIENT_NUMBER_PAEDIATRICIAN"));
                    if (vDR16 != null)
                    {
                        HiddenField10.Value = vDR16["USED_PATIENT_SUBSCRIPTION_NUMBER"].ToString();
                    }
                    if (HiddenField7.Value != "" && HiddenField10.Value != "")
                    {
                        HiddenField8.Value = Convert.ToString(Convert.ToInt32(HiddenField7.Value) - Convert.ToInt32(HiddenField10.Value));
                    }
                    if (HiddenField1.Value != "" && HiddenField2.Value != "")
                    {
                        //TXT_SUB.Text = Convert.ToString(Convert.ToInt32(HiddenField1.Value) - Convert.ToInt32(HiddenField2.Value));
                        TXT_SUB.Text    = HiddenField8.Value;
                        TXT_SUB.Enabled = false;
                        if (TXT_SUB.Text == "0")
                        {
                            ID.Visible        = true;
                            login_pop.Visible = false;
                            HEADER1.Visible   = false;
                        }
                        else
                        {
                            login_pop.Visible = true;
                        }
                    }
                }
                else if (vATSession.UserType == "Patient")
                {
                    Label2.Text = "<b>Please note:</b> This application is a proprietary of NerdNerdy Technologies Pvt Ltd. The system and content related to this software is under the Patent(awaited) and Copy right protection." + "<br></br>";

                    ValidateUserAccess();
                    HEADER1.Visible     = false;
                    ID.Visible          = false;
                    LinkButton1.Visible = false;
                    Div1.Visible        = false;
                    login_pop.Visible   = false;
                    this.GridView1.Columns[7].Visible  = false;
                    this.GridView1.Columns[8].Visible  = false;
                    this.GridView1.Columns[9].Visible  = false;
                    this.GridView1.Columns[10].Visible = false;
                    this.GridView1.Columns[6].Visible  = false;
                    //this.GridView1.Columns[12].Visible = false;
                    this.GridView1.Columns[13].Visible = false;
                    this.GridView1.Columns[14].Visible = false;
                }
                else if (vATSession.UserType == "Parent")
                {
                    Label2.Text = "<b>Please note:</b> This application is a proprietary of NerdNerdy Technologies Pvt Ltd. The system and content related to this software is under the Patent(awaited) and Copy right protection." + "<br></br>";

                    ValidateUserAccess();
                    //HEADER1.Visible = false;
                    //ID.Visible = false;
                    LinkButton1.Visible = false;
                    Div1.Visible        = false;
                    //login_pop.Visible = false;
                    this.GridView1.Columns[7].Visible  = false;
                    this.GridView1.Columns[8].Visible  = false;
                    this.GridView1.Columns[9].Visible  = false;
                    this.GridView1.Columns[10].Visible = false;
                    this.GridView1.Columns[6].Visible  = false;
                    //this.GridView1.Columns[12].Visible = false;
                    this.GridView1.Columns[13].Visible = false;
                    this.GridView1.Columns[14].Visible = false;
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("USR_LOGIN", vATSession.Login);
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_USR_LOGIN_PARENT"));
                    if (vDR != null)
                    {
                        HiddenField1.Value = vDR["USR_PATIENT_SUBSCRIPTION_NUMBER"].ToString();
                        HiddenField3.Value = vDR["USR_ORGANIZATION_NAME"].ToString();
                    }
                    Hashtable vHashtable1 = new Hashtable();
                    vHashtable1.Add("CUST_ORGANIZATION_NAME", HiddenField3.Value);
                    DataRow vDR1 = RetDR(DBManager.Get(vHashtable1, "GET_COUNT_PATIENT"));
                    if (vDR1 != null)
                    {
                        HiddenField2.Value = vDR1["CUST"].ToString();
                    }

                    Hashtable vHashtable15 = new Hashtable();
                    vHashtable15.Add("USR_LOGIN", vATSession.Login);
                    DataRow vDR15 = RetDR(DBManager.Get(vHashtable15, "GET_TOTALPATIENT_PARENT"));
                    if (vDR15 != null)
                    {
                        HiddenField7.Value = vDR15["USR_PATIENT_SUBSCRIPTION_NUMBER"].ToString();
                    }

                    Hashtable vHashtable36 = new Hashtable();
                    vHashtable36.Add("CUST_ORGANIZATION_NAME", HiddenField3.Value);
                    DataRow vDR36 = RetDR(DBManager.Get(vHashtable36, "GET_COUNT_CUST"));
                    if (vDR36 != null)
                    {
                        HiddenField12.Value = vDR36["CUST_ID"].ToString();
                    }

                    Hashtable vHashtable16 = new Hashtable();
                    vHashtable16.Add("PTP_CUSTID", HiddenField12.Value);
                    DataRow vDR16 = RetDR(DBManager.Get(vHashtable16, "GET_TOTALPATIENT_NUMBER_PAEDIATRICIAN"));
                    if (vDR16 != null)
                    {
                        HiddenField10.Value = vDR16["USED_PATIENT_SUBSCRIPTION_NUMBER"].ToString();
                    }
                    if (HiddenField7.Value != "" && HiddenField10.Value != "")
                    {
                        HiddenField8.Value = Convert.ToString(Convert.ToInt32(HiddenField7.Value) - Convert.ToInt32(HiddenField10.Value));
                    }
                    if (HiddenField1.Value != "" && HiddenField2.Value != "")
                    {
                        //TXT_SUB.Text = Convert.ToString(Convert.ToInt32(HiddenField1.Value) - Convert.ToInt32(HiddenField2.Value));
                        TXT_SUB.Text    = HiddenField8.Value;
                        TXT_SUB.Enabled = false;
                        if (TXT_SUB.Text == "0")
                        {
                            ID.Visible        = true;
                            login_pop.Visible = false;
                            HEADER1.Visible   = false;
                        }
                        else
                        {
                            login_pop.Visible = true;
                        }
                    }
                }
                else if (vATSession.UserType == "THERAPIST" || vATSession.UserType == "Therapist")
                {
                    Label2.Text = "<b>Please note:</b> This application is a proprietary of NerdNerdy Technologies Pvt Ltd. The system and content related to this software is under the Patent(awaited) and Copy right protection." + "<br></br>";

                    ValidateUserAccess();
                    LinkButton1.Visible = false;
                    Div1.Visible        = false;
                    //login_pop.Visible = false;
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("USR_LOGIN", vATSession.Login);
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_USR_LOGIN_THERAPIST"));
                    if (vDR != null)
                    {
                        HiddenField1.Value = vDR["USR_PATIENT_SUBSCRIPTION_NUMBER"].ToString();
                        HiddenField3.Value = vDR["USR_ORGANIZATION_NAME"].ToString();
                    }
                    Hashtable vHashtable1 = new Hashtable();
                    vHashtable1.Add("CUST_ORGANIZATION_NAME", HiddenField3.Value);
                    DataRow vDR1 = RetDR(DBManager.Get(vHashtable1, "GET_COUNT_PATIENT"));
                    if (vDR1 != null)
                    {
                        HiddenField2.Value = vDR1["CUST"].ToString();
                    }

                    Hashtable vHashtable15 = new Hashtable();
                    vHashtable15.Add("USR_LOGIN", vATSession.Login);
                    DataRow vDR15 = RetDR(DBManager.Get(vHashtable15, "GET_TOTAL_THERAPIST"));
                    if (vDR15 != null)
                    {
                        HiddenField7.Value = vDR15["USR_PATIENT_SUBSCRIPTION_NUMBER"].ToString();
                    }
                    Hashtable vHashtable36 = new Hashtable();
                    vHashtable36.Add("CUST_ORGANIZATION_NAME", HiddenField3.Value);
                    DataRow vDR36 = RetDR(DBManager.Get(vHashtable36, "GET_COUNT_CUST"));
                    if (vDR36 != null)
                    {
                        HiddenField12.Value = vDR36["CUST_ID"].ToString();
                    }
                    Hashtable vHashtable16 = new Hashtable();
                    vHashtable16.Add("PTP_CUSTID", HiddenField12.Value);
                    DataRow vDR16 = RetDR(DBManager.Get(vHashtable16, "GET_TOTALPATIENT_NUMBER_THERAPIST"));
                    if (vDR16 != null)
                    {
                        HiddenField10.Value = vDR16["USED_PATIENT_SUBSCRIPTION_NUMBER"].ToString();
                    }
                    if (HiddenField7.Value != "" && HiddenField10.Value != "")
                    {
                        HiddenField8.Value = Convert.ToString(Convert.ToInt32(HiddenField7.Value) - Convert.ToInt32(HiddenField10.Value));
                    }
                    if (HiddenField1.Value != "" && HiddenField2.Value != "")
                    {
                        //TXT_SUB.Text = Convert.ToString(Convert.ToInt32(HiddenField1.Value) - Convert.ToInt32(HiddenField2.Value));
                        TXT_SUB.Text    = HiddenField8.Value;
                        TXT_SUB.Enabled = false;
                        if (TXT_SUB.Text == "0")
                        {
                            ID.Visible        = true;
                            login_pop.Visible = false;
                        }
                    }
                }
                else
                {
                    Label2.Text = "<b>Please note:</b> This application is a proprietary of NerdNerdy Technologies Pvt Ltd. The system and content related to this software is under the Patent(awaited) and Copy right protection." + "<br></br>";

                    ValidateUserAccess();
                    Div1.Visible = false;
                    ID.Visible   = false;
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("USR_LOGIN", vATSession.Login);
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_USR_LOGIN_ID"));
                    if (vDR != null)
                    {
                        HiddenField1.Value = vDR["USR_PATIENT_SUBSCRIPTION_NUMBER"].ToString();
                        HiddenField3.Value = vDR["USR_ORGANIZATION_NAME"].ToString();
                    }
                    Hashtable vHashtable1 = new Hashtable();
                    vHashtable1.Add("CUST_MOBILE", vATSession.Login);
                    DataRow vDR1 = RetDR(DBManager.Get(vHashtable1, "GET_CUST_MOBILE"));
                    if (vDR1 != null)
                    {
                        HiddenField2.Value = vDR1["CUST_ID"].ToString();
                    }
                    Hashtable vHashtable2 = new Hashtable();
                    vHashtable2.Add("PTP_CUSTID", HiddenField2.Value);
                    DataRow vDR2 = RetDR(DBManager.Get(vHashtable2, "GET_COUNT_PATIENT_TOTAL"));
                    if (vDR2 != null)
                    {
                        HiddenField5.Value = vDR2["CUST"].ToString();
                    }
                    if (HiddenField1.Value != "" && HiddenField5.Value != "")
                    {
                        TXT_SUB.Text    = Convert.ToString(Convert.ToInt32(HiddenField1.Value) - Convert.ToInt32(HiddenField5.Value));
                        TXT_SUB.Enabled = false;
                        if (TXT_SUB.Text == "0")
                        {
                            ID.Visible          = true;
                            LinkButton1.Visible = false;
                            login_pop.Visible   = false;
                            string message = "Please Buy Patient Subscription !!";
                            System.Text.StringBuilder sb = new System.Text.StringBuilder();
                            sb.Append("<script type = 'text/javascript'>");
                            sb.Append("window.onload=function(){");
                            sb.Append("alert('");
                            sb.Append(message);
                            sb.Append("')};");
                            sb.Append("</script>");
                            ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", sb.ToString());
                        }
                    }
                }
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
Ejemplo n.º 22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID = Request.QueryString["ID"];

        PTP_TXT.Text = vATSession.UserName;
        if (vATSession.UserType == "ADMIN")
        {
            GridView1.Visible = true;
            hidden1.Visible   = true;
            btnSave.Visible   = false;
        }
        else
        {
            GridView1.Visible = true;
        }
        if (!IsPostBack)
        {
            try
            {
                ValidateUserAccess();
                ATCommon.FillDrpDown(DEVCOND_ID, DBManager.Get(new Hashtable(), "CMB_DEVELOPMENT_MASTER"), "Select Development Condition Name", "DEV_NAME", "DEV_ID", "0");
                if (vID != null)
                {
                    PTP_ID.Value = vID;
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("PTP_ID", vID);
                    vHashtable.Add("TYPE", "GET");
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_PATIENT_DEVELOPMENT_NEW"));
                    if (vDR != null)
                    {
                        PTP_ID.Value    = vID;
                        vID             = vDR["PTP_ID"].ToString();
                        PTP_TXT.Text    = vDR["PTP_NAME"].ToString();
                        Textarea1.Value = vDR["PTP_NAME"].ToString() + "&nbsp;" + "did/did not reach all the major developmental milestones on time. The developmental " +
                                          "milestones were reported as within the normal range for ------------" + "<br />" +
                                          "a)	Physical development"+ "<br />" +
                                          "b)	Speech and language development"+ "<br />" +
                                          "c)	Cognitive development"+ "<br />" +
                                          "d)	Fine Motor development"+ "<br />" +
                                          "e)	Gross Motor Development."+ "<br />" + "However, he/she has poor----------" + "<br />" + "a)	Physical development" + "<br />" + "b)	Speech and language development"+ "<br />" +
                                          "c)	Cognitive development"+ "<br />" + "d)	Fine Motor development"
                                          + "<br />" + "e)	Gross Motor Development.";
                        Hashtable vHashtable2 = new Hashtable();
                        vHashtable2.Add("PTP_ID", vID);
                        DataRow vDR2 = RetDR(DBManager.Get(vHashtable2, "GET_PT_DEVELOPMENT_ID"));
                        if (vDR2 != null)
                        {
                            btnSave.Visible = false;
                        }
                    }
                    else
                    {
                        ShowMsg("Invalid Patient Development ID");
                    }
                }
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
Ejemplo n.º 23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID  = Request.QueryString["ID"];
        String vID2 = Request.QueryString["id1"];

        if (!IsPostBack)
        {
            try
            {
                if (vATSession.UserType == "ADMIN")
                {
                    if (vID2 != null)
                    {
                        Label2.Text = "<b>Please note:</b> This is the non standardized rating scale. You may select the best option suited for your patient." + "<br></br>";

                        Hashtable vHashtable2 = new Hashtable();
                        vHashtable2.Add("PTP_ID", vID2);
                        DataTable dt1  = DBManager.Get(vHashtable2, "GET_PT_SENSORY");
                        DataRow   vDR1 = RetDR(DBManager.Get(vHashtable2, "GET_PT_SENSORY"));
                        if (dt1.Columns.Count > 4)
                        {
                            GridView2.DataSource = dt1;
                            GridView2.DataBind();
                            car.Visible     = false;
                            btnSave.Visible = false;
                            if (vDR1 != null)
                            {
                                Textarea2.InnerText = vDR1["PTSEN_OBSERVATION"].ToString();
                            }
                            for (int j = 0; j < GridView1.Rows.Count; j++)
                            {
                                CheckBox checkbox = (CheckBox)GridView1.Rows[j].Cells[0].FindControl("CheckBox2");

                                if (vDR1["PTSEN_STATUS"].ToString() == "1")
                                {
                                    checkbox.Checked = true;
                                }
                                else
                                {
                                    checkbox.Checked = false;
                                }
                            }
                        }
                        if (dt1.Columns.Count == 3)
                        {
                            GridView1.DataSource = dt1;
                            GridView1.DataBind();
                            Submitcar.Visible = false;
                            btnSave.Visible   = true;
                        }
                    }
                }
                else if (vATSession.UserType == "DOCTOR" || vATSession.UserType == "Doctor")
                {
                    if (vID2 != null)
                    {
                        Label2.Text = "<b>Please note:</b> This is the non standardized rating scale. You may select the best option suited for your patient." + "<br></br>";

                        Hashtable vHashtable2 = new Hashtable();
                        vHashtable2.Add("PTP_ID", vID2);
                        DataTable dt1  = DBManager.Get(vHashtable2, "GET_PT_SENSORY");
                        DataRow   vDR1 = RetDR(DBManager.Get(vHashtable2, "GET_PT_SENSORY"));
                        if (dt1.Columns.Count > 4)
                        {
                            GridView2.DataSource = dt1;
                            GridView2.DataBind();
                            car.Visible     = false;
                            btnSave.Visible = false;
                            if (vDR1 != null)
                            {
                                Textarea2.InnerText = vDR1["PTSEN_OBSERVATION"].ToString();
                            }
                            for (int j = 0; j < GridView1.Rows.Count; j++)
                            {
                                CheckBox checkbox = (CheckBox)GridView1.Rows[j].Cells[0].FindControl("CheckBox2");

                                if (vDR1["PTSEN_STATUS"].ToString() == "1")
                                {
                                    checkbox.Checked = true;
                                }
                                else
                                {
                                    checkbox.Checked = false;
                                }
                            }
                        }
                        if (dt1.Columns.Count == 3)
                        {
                            GridView1.DataSource = dt1;
                            GridView1.DataBind();
                            Submitcar.Visible = false;
                        }
                    }
                }
                else if (vATSession.UserType == "ORGANIZATION" || vATSession.UserType == "Organization")
                {
                    if (vID2 != null)
                    {
                        Label2.Text = "<b>Please note:</b> This is the non standardized rating scale. You may select the best option suited for your patient." + "<br></br>";

                        Hashtable vHashtable2 = new Hashtable();
                        vHashtable2.Add("PTP_ID", vID2);
                        DataTable dt1  = DBManager.Get(vHashtable2, "GET_PT_SENSORY");
                        DataRow   vDR1 = RetDR(DBManager.Get(vHashtable2, "GET_PT_SENSORY"));
                        if (dt1.Columns.Count > 4)
                        {
                            GridView2.DataSource = dt1;
                            GridView2.DataBind();
                            car.Visible     = false;
                            btnSave.Visible = false;
                            if (vDR1 != null)
                            {
                                Textarea2.InnerText = vDR1["PTSEN_OBSERVATION"].ToString();
                            }
                            for (int j = 0; j < GridView1.Rows.Count; j++)
                            {
                                CheckBox checkbox = (CheckBox)GridView1.Rows[j].Cells[0].FindControl("CheckBox2");

                                if (vDR1["PTSEN_STATUS"].ToString() == "1")
                                {
                                    checkbox.Checked = true;
                                }
                                else
                                {
                                    checkbox.Checked = false;
                                }
                            }
                        }
                        if (dt1.Columns.Count == 3)
                        {
                            GridView1.DataSource = dt1;
                            GridView1.DataBind();
                            Submitcar.Visible = false;
                        }
                    }
                }
                else if (vATSession.UserType == "THERAPIST" || vATSession.UserType == "Therapist")
                {
                    if (vID2 != null)
                    {
                        Label2.Text = "<b>Please note:</b> This is the non standardized rating scale. You may select the best option suited for your patient." + "<br></br>";

                        Hashtable vHashtable2 = new Hashtable();
                        vHashtable2.Add("PTP_ID", vID2);
                        DataTable dt1  = DBManager.Get(vHashtable2, "GET_PT_SENSORY");
                        DataRow   vDR1 = RetDR(DBManager.Get(vHashtable2, "GET_PT_SENSORY"));
                        if (dt1.Columns.Count > 4)
                        {
                            GridView2.DataSource = dt1;
                            GridView2.DataBind();
                            car.Visible     = false;
                            btnSave.Visible = false;
                            if (vDR1 != null)
                            {
                                Textarea2.InnerText = vDR1["PTSEN_OBSERVATION"].ToString();
                            }
                            for (int j = 0; j < GridView1.Rows.Count; j++)
                            {
                                CheckBox checkbox = (CheckBox)GridView1.Rows[j].Cells[0].FindControl("CheckBox2");

                                if (vDR1["PTSEN_STATUS"].ToString() == "1")
                                {
                                    checkbox.Checked = true;
                                }
                                else
                                {
                                    checkbox.Checked = false;
                                }
                            }
                        }
                        if (dt1.Columns.Count == 3)
                        {
                            GridView1.DataSource = dt1;
                            GridView1.DataBind();
                            Submitcar.Visible = false;
                        }
                    }
                }
            }
            catch (Exception xe)
            {
                ShowMsg(xe);
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID             = Request.QueryString["ID"];
        string strPreviousPage = string.Empty;

        if (Request.UrlReferrer != null)
        {
            strPreviousPage = Request.UrlReferrer.Segments[Request.UrlReferrer.Segments.Length - 1];
        }
        if (strPreviousPage == "")
        {
            Response.Redirect("~/Default.aspx");
        }

        if (!IsPostBack)
        {
            dt1 = new DataTable();
            DataColumn DOBS_DESC = new DataColumn();
            DOBS_DESC.DataType   = Type.GetType("System.String");
            DOBS_DESC.ColumnName = "DOBS_DESC";
            dt1.Columns.Add(DOBS_DESC);

            DataColumn PTS_REMARK = new DataColumn();
            PTS_REMARK.DataType   = Type.GetType("System.String");
            PTS_REMARK.ColumnName = "PTS_REMARK";
            dt1.Columns.Add(PTS_REMARK);

            DataColumn PTS_ID = new DataColumn();
            PTS_ID.DataType   = Type.GetType("System.String");
            PTS_ID.ColumnName = "PTS_ID";
            dt1.Columns.Add(PTS_ID);

            doctor_id.Visible     = true;
            ViewState["datagrid"] = dt1;

            try
            {
                ValidateUserAccess();

                if (vATSession.UserType == "ADMIN")
                {
                    if (vID != null)
                    {
                        Label1.Text = "This Screening tool is designed to identify children from the ages of 2 to 8 years, who may be at a risk of neurodevelopmental disorders. Based on the screening results, the child can be further referred for comprehensive assessment by the certified professional." +
                                      "<br>Please answer the given questions that best describes the child, based on your observations (by certified mental health professional) and from the inputs of the caregiver. Try your best to answer all the questions either in <b>'Yes'  or 'No' .</b>. After all the questions are answered, click the save button. The results of disorders  are shown as Scored Rank.";

                        Label2.Text = "NerdNerdy’s screening scale is to be used for the reference purposes only, by the registered medical and rehabilitation practitioners . The results of the tests should be  clinically correlated by the medical/rehabilitation specialist. The screening tool should not be understood to constitute any type of diagnosis or healthcare recommendation for patients.";

                        Hashtable vHashtable = new Hashtable();
                        vHashtable.Add("PTP_ID", vID);
                        DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_PATIENT_SCREEN"));
                        if (vDR != null)
                        {
                            PTP_NAME.Text          = vDR["PTP_NAME"].ToString();
                            PTP_AGE_TXT.Text       = vDR["AGRP_GROUP"].ToString();
                            PTP_GENDER_TXT.Text    = vDR["PTP_GENDER"].ToString();
                            PTP_MOB_TXT.Text       = vDR["PTP_MOBILE"].ToString();
                            AGRP_ID.Value          = vDR["AGRP_ID"].ToString();
                            PTP_AGE_TXT.Enabled    = false;
                            PTP_GENDER_TXT.Enabled = false;
                            PTP_MOB_TXT.Enabled    = false;
                            PTP_NAME.Enabled       = false;
                            btnSave.Visible        = false;
                            TXTVALUE.Value         = vDR["PTP_CUSTID"].ToString();

                            btnSave.Visible   = false;
                            pt1.Visible       = false;
                            remark.Visible    = false;
                            dis.Visible       = false;
                            doctor_id.Visible = false;
                        }
                        Hashtable vHashtable9 = new Hashtable();
                        vHashtable9.Add("AGRP_ID", AGRP_ID.Value);
                        DataRow vDR9 = RetDR(DBManager.Get(vHashtable9, "GET_SCT_MASTER_NEW"));
                        if (vDR9 != null)
                        {
                            SCTP_ID.Value = vDR9["SCTP_ID"].ToString();
                        }

                        Hashtable vHashtable10 = new Hashtable();
                        vHashtable10.Add("PTP_ID", vID);
                        vHashtable10.Add("SCTP_ID", SCTP_ID.Value);
                        DataRow vDR10 = RetDR(DBManager.Get(vHashtable10, "GET_SCREEN_MASTER"));
                        if (vDR10 != null)
                        {
                            HiddenField3.Value = vDR10["PTS_ID"].ToString();
                        }

                        Hashtable vHashtable1 = new Hashtable();
                        vHashtable1.Add("PTS_ID", HiddenField3.Value);
                        vHashtable1.Add("PTP_ID", vID);
                        dt1 = DBManager.Get(vHashtable1, "GET_PTS_ID");
                        DataRow vDR1 = RetDR(DBManager.Get(vHashtable1, "GET_PTS_ID"));
                        PTP_REMARK_TXT.Text  = dt1.Rows[0]["PTS_REMARK"].ToString();
                        GridView1.DataSource = dt1;
                        GridView1.DataBind();

                        btnSave.Visible        = false;
                        btnScreen.Visible      = false;
                        PTP_REMARK_TXT.Enabled = false;
                        GridView1.DataSource   = dt1;
                        GridView1.DataBind();
                        GridView1.Enabled = false;

                        Hashtable vHashtable3 = new Hashtable();
                        vHashtable3.Add("AGE", PTP_AGE_TXT.Text);
                        vHashtable3.Add("PTP_ID", vID);
                        vHashtable3.Add("PTS_ID", HiddenField3.Value);
                        vHashtable3.Add("SCTP_ID", SCTP_ID.Value);
                        dt2 = DBManager.Get(vHashtable3, "GET_DISORDER_PERCENTAGE_NEW_ID");
                        GridView2.DataSource = dt2;
                        GridView2.DataBind();
                        GridView2.Visible = true;

                        pt1.Visible       = true;
                        remark.Visible    = true;
                        dis.Visible       = true;
                        doctor_id.Visible = true;
                    }
                }
                else if (vATSession.UserType == "DOCTOR" || vATSession.UserType == "Doctor")
                {
                    if (vID != null)
                    {
                        Label1.Text = "This Screening tool is designed to identify children from the ages of 2 to 8 years, who may be at a risk of neurodevelopmental disorders. Based on the screening results, the child can be further referred for comprehensive assessment by the certified professional." +
                                      "<br>Please answer the given questions that best describes the child, based on your observations (by certified mental health professional) and from the inputs of the caregiver. Try your best to answer all the questions either in <b>'Yes'  or 'No' .</b>. After all the questions are answered, click the save button. The results of disorders  are shown as Scored Rank.";

                        Label2.Text = "NerdNerdy’s screening scale is to be used for the reference purposes only, by the registered medical and rehabilitation practitioners . The results of the tests should be  clinically correlated by the medical/rehabilitation specialist. The screening tool should not be understood to constitute any type of diagnosis or healthcare recommendation.";

                        Hashtable vHashtable = new Hashtable();
                        vHashtable.Add("PTP_ID", vID);
                        DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_PATIENT_SCREEN"));
                        if (vDR != null)
                        {
                            PTP_NAME.Text          = vDR["PTP_NAME"].ToString();
                            PTP_AGE_TXT.Text       = vDR["AGRP_GROUP"].ToString();
                            PTP_GENDER_TXT.Text    = vDR["PTP_GENDER"].ToString();
                            PTP_MOB_TXT.Text       = vDR["PTP_MOBILE"].ToString();
                            AGRP_ID.Value          = vDR["AGRP_ID"].ToString();
                            PTP_AGE_TXT.Enabled    = false;
                            PTP_GENDER_TXT.Enabled = false;
                            PTP_MOB_TXT.Enabled    = false;
                            PTP_NAME.Enabled       = false;
                            TXTVALUE.Value         = vDR["PTP_CUSTID"].ToString();

                            btnSave.Visible   = false;
                            pt1.Visible       = false;
                            remark.Visible    = false;
                            dis.Visible       = false;
                            doctor_id.Visible = false;
                        }
                        Hashtable vHashtable9 = new Hashtable();
                        vHashtable9.Add("AGRP_ID", AGRP_ID.Value);
                        DataRow vDR9 = RetDR(DBManager.Get(vHashtable9, "GET_SCT_MASTER_NEW"));
                        if (vDR9 != null)
                        {
                            SCTP_ID.Value = vDR9["SCTP_ID"].ToString();
                        }

                        Hashtable vHashtable10 = new Hashtable();
                        vHashtable10.Add("PTP_ID", vID);
                        vHashtable10.Add("SCTP_ID", SCTP_ID.Value);
                        DataRow vDR10 = RetDR(DBManager.Get(vHashtable10, "GET_SCREEN_MASTER"));
                        if (vDR10 != null)
                        {
                            HiddenField3.Value = vDR10["PTS_ID"].ToString();
                        }

                        Hashtable vHashtable1 = new Hashtable();
                        vHashtable1.Add("PTS_ID", HiddenField3.Value);
                        vHashtable1.Add("PTP_ID", vID);
                        dt1 = DBManager.Get(vHashtable1, "GET_PTS_ID");
                        DataRow vDR1 = RetDR(DBManager.Get(vHashtable1, "GET_PTS_ID"));
                        PTP_REMARK_TXT.Text  = dt1.Rows[0]["PTS_REMARK"].ToString();
                        GridView1.DataSource = dt1;
                        GridView1.DataBind();

                        btnSave.Visible        = false;
                        btnScreen.Visible      = false;
                        PTP_REMARK_TXT.Enabled = false;
                        GridView1.DataSource   = dt1;
                        GridView1.DataBind();
                        GridView1.Enabled = false;

                        Hashtable vHashtable3 = new Hashtable();
                        vHashtable3.Add("AGE", PTP_AGE_TXT.Text);
                        vHashtable3.Add("PTP_ID", vID);
                        vHashtable3.Add("PTS_ID", HiddenField3.Value);
                        vHashtable3.Add("SCTP_ID", SCTP_ID.Value);
                        dt2 = DBManager.Get(vHashtable3, "GET_DISORDER_PERCENTAGE_NEW_ID");
                        GridView2.DataSource = dt2;
                        GridView2.DataBind();
                        GridView2.Visible = true;

                        pt1.Visible       = true;
                        remark.Visible    = true;
                        dis.Visible       = true;
                        doctor_id.Visible = true;
                    }
                }
                else if (vATSession.UserType == "ORGANIZATION" || vATSession.UserType == "Organization")
                {
                    if (vID != null)
                    {
                        Label1.Text = "This Screening tool is designed to identify children from the ages of 2 to 8 years, who may be at a risk of neurodevelopmental disorders. Based on the screening results, the child can be further referred for comprehensive assessment by the certified professional." +
                                      "<br>Please answer the given questions that best describes the child, based on your observations (by certified mental health professional) and from the inputs of the caregiver. Try your best to answer all the questions either in <b>'Yes'  or 'No' .</b>. After all the questions are answered, click the save button. The results of disorders  are shown as Scored Rank.";

                        Label2.Text = "NerdNerdy’s screening scale is to be used for the reference purposes only, by the registered medical and rehabilitation practitioners . The results of the tests should be  clinically correlated by the medical/rehabilitation specialist. The screening tool should not be understood to constitute any type of diagnosis or healthcare recommendation.";

                        Hashtable vHashtable = new Hashtable();
                        vHashtable.Add("PTP_ID", vID);
                        DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_PATIENT_SCREEN"));
                        if (vDR != null)
                        {
                            PTP_NAME.Text          = vDR["PTP_NAME"].ToString();
                            PTP_AGE_TXT.Text       = vDR["AGRP_GROUP"].ToString();
                            PTP_GENDER_TXT.Text    = vDR["PTP_GENDER"].ToString();
                            PTP_MOB_TXT.Text       = vDR["PTP_MOBILE"].ToString();
                            AGRP_ID.Value          = vDR["AGRP_ID"].ToString();
                            PTP_AGE_TXT.Enabled    = false;
                            PTP_GENDER_TXT.Enabled = false;
                            PTP_MOB_TXT.Enabled    = false;
                            PTP_NAME.Enabled       = false;
                            TXTVALUE.Value         = vDR["PTP_CUSTID"].ToString();

                            btnSave.Visible   = false;
                            pt1.Visible       = false;
                            remark.Visible    = false;
                            dis.Visible       = false;
                            doctor_id.Visible = false;
                        }
                        Hashtable vHashtable9 = new Hashtable();
                        vHashtable9.Add("AGRP_ID", AGRP_ID.Value);
                        DataRow vDR9 = RetDR(DBManager.Get(vHashtable9, "GET_SCT_MASTER_NEW"));
                        if (vDR9 != null)
                        {
                            SCTP_ID.Value = vDR9["SCTP_ID"].ToString();
                        }

                        Hashtable vHashtable10 = new Hashtable();
                        vHashtable10.Add("PTP_ID", vID);
                        vHashtable10.Add("SCTP_ID", SCTP_ID.Value);
                        DataRow vDR10 = RetDR(DBManager.Get(vHashtable10, "GET_SCREEN_MASTER"));
                        if (vDR10 != null)
                        {
                            HiddenField3.Value = vDR10["PTS_ID"].ToString();
                        }

                        Hashtable vHashtable1 = new Hashtable();
                        vHashtable1.Add("PTS_ID", HiddenField3.Value);
                        vHashtable1.Add("PTP_ID", vID);
                        dt1 = DBManager.Get(vHashtable1, "GET_PTS_ID");
                        DataRow vDR1 = RetDR(DBManager.Get(vHashtable1, "GET_PTS_ID"));
                        PTP_REMARK_TXT.Text  = dt1.Rows[0]["PTS_REMARK"].ToString();
                        GridView1.DataSource = dt1;
                        GridView1.DataBind();

                        btnSave.Visible        = false;
                        btnScreen.Visible      = false;
                        PTP_REMARK_TXT.Enabled = false;
                        GridView1.DataSource   = dt1;
                        GridView1.DataBind();
                        GridView1.Enabled = false;

                        Hashtable vHashtable3 = new Hashtable();
                        vHashtable3.Add("AGE", PTP_AGE_TXT.Text);
                        vHashtable3.Add("PTP_ID", vID);
                        vHashtable3.Add("PTS_ID", HiddenField3.Value);
                        vHashtable3.Add("SCTP_ID", SCTP_ID.Value);
                        dt2 = DBManager.Get(vHashtable3, "GET_DISORDER_PERCENTAGE_NEW_ID");
                        GridView2.DataSource = dt2;
                        GridView2.DataBind();
                        GridView2.Visible = true;

                        pt1.Visible       = true;
                        remark.Visible    = true;
                        dis.Visible       = true;
                        doctor_id.Visible = true;
                    }
                }
                else if (vATSession.UserType == "Paediatrician")
                {
                    if (vID != null)
                    {
                        Label1.Text = "This Screening tool is designed to identify children from the ages of 2 to 8 years, who may be at a risk of neurodevelopmental disorders. Based on the screening results, the child can be further referred for comprehensive assessment by the certified professional." +
                                      "<br>Please answer the given questions that best describes the child, based on your observations (by certified mental health professional) and from the inputs of the caregiver. Try your best to answer all the questions either in <b>'Yes'  or 'No' .</b>. After all the questions are answered, click the save button. The results of disorders  are shown as Scored Rank.";

                        Label2.Text = "NerdNerdy’s screening scale is to be used for the reference purposes only, by the registered medical and rehabilitation practitioners . The results of the tests should be  clinically correlated by the medical/rehabilitation specialist. The screening tool should not be understood to constitute any type of diagnosis or healthcare recommendation.";

                        Hashtable vHashtable = new Hashtable();
                        vHashtable.Add("PTP_ID", vID);
                        DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_PATIENT_SCREEN"));
                        if (vDR != null)
                        {
                            PTP_NAME.Text          = vDR["PTP_NAME"].ToString();
                            PTP_AGE_TXT.Text       = vDR["AGRP_GROUP"].ToString();
                            PTP_GENDER_TXT.Text    = vDR["PTP_GENDER"].ToString();
                            PTP_MOB_TXT.Text       = vDR["PTP_MOBILE"].ToString();
                            AGRP_ID.Value          = vDR["AGRP_ID"].ToString();
                            PTP_AGE_TXT.Enabled    = false;
                            PTP_GENDER_TXT.Enabled = false;
                            PTP_MOB_TXT.Enabled    = false;
                            PTP_NAME.Enabled       = false;
                            TXTVALUE.Value         = vDR["PTP_CUSTID"].ToString();

                            btnSave.Visible   = false;
                            pt1.Visible       = false;
                            remark.Visible    = false;
                            dis.Visible       = false;
                            doctor_id.Visible = false;
                        }
                        Hashtable vHashtable9 = new Hashtable();
                        vHashtable9.Add("AGRP_ID", AGRP_ID.Value);
                        DataRow vDR9 = RetDR(DBManager.Get(vHashtable9, "GET_SCT_MASTER_NEW"));
                        if (vDR9 != null)
                        {
                            SCTP_ID.Value = vDR9["SCTP_ID"].ToString();
                        }

                        Hashtable vHashtable10 = new Hashtable();
                        vHashtable10.Add("PTP_ID", vID);
                        vHashtable10.Add("SCTP_ID", SCTP_ID.Value);
                        DataRow vDR10 = RetDR(DBManager.Get(vHashtable10, "GET_SCREEN_MASTER"));
                        if (vDR10 != null)
                        {
                            HiddenField3.Value = vDR10["PTS_ID"].ToString();
                        }

                        Hashtable vHashtable1 = new Hashtable();
                        vHashtable1.Add("PTS_ID", HiddenField3.Value);
                        vHashtable1.Add("PTP_ID", vID);
                        dt1 = DBManager.Get(vHashtable1, "GET_PTS_ID");
                        DataRow vDR1 = RetDR(DBManager.Get(vHashtable1, "GET_PTS_ID"));
                        PTP_REMARK_TXT.Text  = dt1.Rows[0]["PTS_REMARK"].ToString();
                        GridView1.DataSource = dt1;
                        GridView1.DataBind();

                        btnSave.Visible        = false;
                        btnScreen.Visible      = false;
                        PTP_REMARK_TXT.Enabled = false;
                        GridView1.DataSource   = dt1;
                        GridView1.DataBind();
                        GridView1.Enabled = false;

                        Hashtable vHashtable3 = new Hashtable();
                        vHashtable3.Add("AGE", PTP_AGE_TXT.Text);
                        vHashtable3.Add("PTP_ID", vID);
                        vHashtable3.Add("PTS_ID", HiddenField3.Value);
                        vHashtable3.Add("SCTP_ID", SCTP_ID.Value);
                        dt2 = DBManager.Get(vHashtable3, "GET_DISORDER_PERCENTAGE_NEW_ID");
                        GridView2.DataSource = dt2;
                        GridView2.DataBind();
                        GridView2.Visible = true;

                        pt1.Visible       = true;
                        remark.Visible    = true;
                        dis.Visible       = true;
                        doctor_id.Visible = true;
                    }
                }
                else if (vATSession.UserType == "Therapist")
                {
                    if (vID != null)
                    {
                        Label1.Text = "This Screening tool is designed to identify children from the ages of 2 to 8 years, who may be at a risk of neurodevelopmental disorders. Based on the screening results, the child can be further referred for comprehensive assessment by the certified professional." +
                                      "<br>Please answer the given questions that best describes the child, based on your observations (by certified mental health professional) and from the inputs of the caregiver. Try your best to answer all the questions either in <b>'Yes'  or 'No' .</b>. After all the questions are answered, click the save button. The results of disorders  are shown as Scored Rank.";

                        Label2.Text = "NerdNerdy’s screening scale is to be used for the reference purposes only, by the registered medical and rehabilitation practitioners . The results of the tests should be  clinically correlated by the medical/rehabilitation specialist. The screening tool should not be understood to constitute any type of diagnosis or healthcare recommendation.";

                        Hashtable vHashtable = new Hashtable();
                        vHashtable.Add("PTP_ID", vID);
                        DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_PATIENT_SCREEN"));
                        if (vDR != null)
                        {
                            PTP_NAME.Text          = vDR["PTP_NAME"].ToString();
                            PTP_AGE_TXT.Text       = vDR["AGRP_GROUP"].ToString();
                            PTP_GENDER_TXT.Text    = vDR["PTP_GENDER"].ToString();
                            PTP_MOB_TXT.Text       = vDR["PTP_MOBILE"].ToString();
                            AGRP_ID.Value          = vDR["AGRP_ID"].ToString();
                            PTP_AGE_TXT.Enabled    = false;
                            PTP_GENDER_TXT.Enabled = false;
                            PTP_MOB_TXT.Enabled    = false;
                            PTP_NAME.Enabled       = false;
                            TXTVALUE.Value         = vDR["PTP_CUSTID"].ToString();

                            btnSave.Visible   = false;
                            pt1.Visible       = false;
                            remark.Visible    = false;
                            dis.Visible       = false;
                            doctor_id.Visible = false;
                        }
                        Hashtable vHashtable9 = new Hashtable();
                        vHashtable9.Add("AGRP_ID", AGRP_ID.Value);
                        DataRow vDR9 = RetDR(DBManager.Get(vHashtable9, "GET_SCT_MASTER_NEW"));
                        if (vDR9 != null)
                        {
                            SCTP_ID.Value = vDR9["SCTP_ID"].ToString();
                        }

                        Hashtable vHashtable10 = new Hashtable();
                        vHashtable10.Add("PTP_ID", vID);
                        vHashtable10.Add("SCTP_ID", SCTP_ID.Value);
                        DataRow vDR10 = RetDR(DBManager.Get(vHashtable10, "GET_SCREEN_MASTER"));
                        if (vDR10 != null)
                        {
                            HiddenField3.Value = vDR10["PTS_ID"].ToString();
                        }

                        Hashtable vHashtable1 = new Hashtable();
                        vHashtable1.Add("PTS_ID", HiddenField3.Value);
                        vHashtable1.Add("PTP_ID", vID);
                        dt1 = DBManager.Get(vHashtable1, "GET_PTS_ID");
                        DataRow vDR1 = RetDR(DBManager.Get(vHashtable1, "GET_PTS_ID"));
                        PTP_REMARK_TXT.Text  = dt1.Rows[0]["PTS_REMARK"].ToString();
                        GridView1.DataSource = dt1;
                        GridView1.DataBind();

                        btnSave.Visible        = false;
                        btnScreen.Visible      = false;
                        PTP_REMARK_TXT.Enabled = false;
                        GridView1.DataSource   = dt1;
                        GridView1.DataBind();
                        GridView1.Enabled = false;

                        Hashtable vHashtable3 = new Hashtable();
                        vHashtable3.Add("AGE", PTP_AGE_TXT.Text);
                        vHashtable3.Add("PTP_ID", vID);
                        vHashtable3.Add("PTS_ID", HiddenField3.Value);
                        vHashtable3.Add("SCTP_ID", SCTP_ID.Value);
                        dt2 = DBManager.Get(vHashtable3, "GET_DISORDER_PERCENTAGE_NEW_ID");
                        GridView2.DataSource = dt2;
                        GridView2.DataBind();
                        GridView2.Visible = true;

                        pt1.Visible       = true;
                        remark.Visible    = true;
                        dis.Visible       = true;
                        doctor_id.Visible = true;
                    }
                }
                else
                {
                    ShowMsg("Invalid Patient ID");
                }
            }
            catch (Exception xe)
            {
            }
        }
    }
Ejemplo n.º 25
0
    public static string ExecInsUpsGetId(Hashtable pParameterValues, String pQueryCode, ATSession pATSession)
    {
        try
        {
            using (SqlConnection vSqlConnection = DBManager.GetConnection())
            {
                SqlCommand vSqlCommand = new SqlCommand(pQueryCode, vSqlConnection);
                vSqlCommand.CommandType = CommandType.StoredProcedure;
                IDictionaryEnumerator vEnumerator = pParameterValues.GetEnumerator();
                AddParameters(pParameterValues, ref vSqlCommand);

                SqlParameter vSqlParameter = new SqlParameter();
                vSqlParameter.ParameterName = "last_user";
                vSqlParameter.Value         = pATSession.Login;
                vSqlParameter.Direction     = ParameterDirection.Input;
                vSqlParameter.SqlDbType     = SqlDbType.VarChar;
                vSqlCommand.Parameters.Add(vSqlParameter);
                SqlParameter vSqlParamReturn = new SqlParameter("@Return", SqlDbType.Int);
                vSqlParamReturn.Direction = ParameterDirection.Output;
                vSqlCommand.Parameters.Add(vSqlParamReturn);
                vSqlCommand.ExecuteNonQuery();
                String vReturn = vSqlParamReturn.Value.ToString();
                return(vReturn);
            }
        }
        catch (Exception xe)
        {
            throw new Exception(xe.ToString());
        }
    }
Ejemplo n.º 26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        String vID = Request.QueryString["ID"];

        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }

        if (!IsPostBack)
        {
            dt = new DataTable();
            DataColumn coltypid = new DataColumn();
            coltypid.DataType   = Type.GetType("System.String");
            coltypid.ColumnName = "CUSTP_TYPE_ID";
            dt.Columns.Add(coltypid);

            DataColumn coltypname = new DataColumn();
            coltypname.DataType   = Type.GetType("System.String");
            coltypname.ColumnName = "CUST_TYP_NAME";
            dt.Columns.Add(coltypname);

            DataColumn colvalue = new DataColumn();
            colvalue.DataType   = Type.GetType("System.String");
            colvalue.ColumnName = "CUSTP_VALUE";
            dt.Columns.Add(colvalue);

            DataColumn coldesc = new DataColumn();
            coldesc.DataType   = Type.GetType("System.String");
            coldesc.ColumnName = "CUSTP_DESC";
            dt.Columns.Add(coldesc);
            ViewState["datagrid"] = dt;
            BindGrid();
            Clear();
            try
            {
                ValidateUserAccess();
                ATCommon.FillDrpDown(CUST_COUNTRY_DDL, DBManager.Get(new Hashtable(), "CMB_COUNTRY_MASTER"), "Select Country Name", "COUNTRY_NAME", "COUNTRY_ID", "0");
                ATCommon.FillCDWR(CUST_TYPE_DDL, DBManager.Get(new Hashtable(), "CMB_CUST_TYPE"), "", "CUST_TYP_NAME", "CUST_TYP_ID", "0");
                ATCommon.FillDrpDown(ORGANIZATION_DDL, DBManager.Get(new Hashtable(), "CMB_ORGANIZATION"), "Select Organization Name", "USR_ORGANIZATION_NAME", "USR_LOGIN", "0");

                Hashtable vHashta = new Hashtable();
                vHashta.Add("STATE_ID", ddl_state.SelectedValue);
                ATCommon.FillDrpDown(ddl_state, DBManager.Get(vHashta, "CMB_State"), "Select State Name", "STATE_NAME", "STATE_ID", "");

                if (vATSession.UserType == "ADMIN")
                {
                    ATCommon.FillCDWR(CUST_TYPE_DDL, DBManager.Get(new Hashtable(), "CMB_CUST_TYPE"), "Select Customer type", "CUST_TYP_NAME", "CUST_TYP_ID", "0");
                    ATCommon.FillDrpDown(CUST_CATRGORY_DDL, DBManager.Get(new Hashtable(), "[GET_CATEGORY]"), "Select Category ", "CAT_NAME", "CAT_ID", "0");
                }
                else
                {
                    ATCommon.FillDrpDown(CUST_TYPE_DDL, DBManager.Get(new Hashtable(), "CMB_CUST_TYPE_VSO"), "", "CUST_TYP_NAME", "CUST_TYP_ID", "0");
                    ATCommon.FillDrpDown(CUST_CATRGORY_DDL, DBManager.Get(new Hashtable(), "[GET_CATEGORY_BY_VSR]"), "Select Category ", "CAT_NAME", "CAT_ID", "0");
                }
                if (vID != null)
                {
                    Hashtable vHashtable4 = new Hashtable();
                    vHashtable4.Add("CUSTPID", vID);
                    dt = DBManager.Get(vHashtable4, "GET_CUSTPROFILE");
                    ViewState["datagrid"] = dt;
                    BindGrid();
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("ID", vID);
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_CUSTOMER_ID"));
                    if (vDR != null)
                    {
                        if (vATSession.UserType == "ADMIN")
                        {
                            CUST_NAME_TXT.Text             = vDR["CUST_NAME"].ToString();
                            CUST_PREFIX_NAME.Text          = vDR["CUST_PREFIX"].ToString();
                            CUST_COUNTRY_DDL.SelectedValue = vDR["CUST_COUNTRY_ID"].ToString();
                            string Prospective = vDR["CUST_PROSPECTIVE"].ToString().Trim();
                            if (vDR["CUST_PROSPECTIVE"].ToString().Trim() == "Yes")
                            {
                                ddlProspective.SelectedIndex = 2;
                            }
                            else if (vDR["CUST_PROSPECTIVE"].ToString().Trim() == "No")
                            {
                                ddlProspective.SelectedIndex = 1;
                            }
                            TXTID.Value                        = vDR["CUST_ID"].ToString();
                            CUST_ADD_TXT.Text                  = vDR["CUST_ROAD_STREET_HOUSE"].ToString();
                            CUST_COMP_NAME_TXT.Text            = vDR["CUST_COMP_NAME"].ToString();
                            CUST_PIN_TXT.Text                  = vDR["CUST_PIN"].ToString();
                            CUST_PH_TXT.Text                   = vDR["CUST_PHONE"].ToString();
                            TXT_DESIGNATION.Text               = vDR["CUST_DESIGNATION"].ToString();
                            CUST_EMAIL_TXT.Text                = vDR["CUST_EMAIL"].ToString();
                            CUST_MOBILE_TXT.Text               = vDR["CUST_MOBILE"].ToString();
                            txt_vil.Text                       = vDR["CUST_VILLAGE_TWN_CITY"].ToString();
                            CUST_CONSL_TXT.Text                = vDR["CUST_CONSULT_NAME"].ToString();
                            CUST_CONSL_MOB_TXT.Text            = vDR["CUST_CONSULT_MOB"].ToString();
                            txt_post.Text                      = vDR["CUST_POST_OFFICE"].ToString();
                            ddl_state.SelectedIndex            = ddl_state.Items.IndexOf(ddl_state.Items.FindByValue(vDR["CUST_STA_ID"].ToString()));
                            ddlProspective.SelectedItem.Text   = vDR["CUST_PROSPECTIVE"].ToString();
                            CUST_CATRGORY_DDL.SelectedIndex    = CUST_CATRGORY_DDL.Items.IndexOf(CUST_CATRGORY_DDL.Items.FindByValue(vDR["CUST_CATRGORY_ID"].ToString()));
                            CUST_STATION_DDL.SelectedItem.Text = vDR["CITY_NAME"].ToString();//09112010 changed
                            CUST_COUNTRY_DDL.SelectedIndex     = CUST_COUNTRY_DDL.Items.IndexOf(CUST_COUNTRY_DDL.Items.FindByValue(vDR["CUST_COUNTRY_ID"].ToString()));
                            CUST_COUNTRY_DDL_SelectedIndexChanged(sender, e);
                            ORGANIZATION_DDL.SelectedItem.Text = vDR["CUST_ORGANIZATION_NAME"].ToString();
                            HiddenField1.Value = vDR["CUST_ARHQ_ID"].ToString();
                            TXT_START.Text     = vDR["CUST_FROM_DATE"].ToString();
                            TXT_END.Text       = vDR["CUST_TO_DATE"].ToString();
                        }
                        else
                        {
                            string Prospective = vDR["CUST_PROSPECTIVE"].ToString().Trim();
                            if (vDR["CUST_PROSPECTIVE"].ToString().Trim() == "Yes")
                            {
                                ddlProspective.SelectedIndex = 2;
                            }
                            else if (vDR["CUST_PROSPECTIVE"].ToString().Trim() == "No")
                            {
                                ddlProspective.SelectedIndex = 1;
                            }
                            TXTID.Value = vDR["CUST_ID"].ToString();

                            CUST_NAME_TXT.Text    = vDR["CUST_NAME"].ToString();
                            CUST_PREFIX_NAME.Text = vDR["CUST_PREFIX"].ToString();

                            if (CUST_NAME_TXT.Text == "STORE" || CUST_NAME_TXT.Text == "MEDSTORE")
                            {
                                CUST_NAME_TXT.Enabled = true;
                            }
                            else
                            {
                                CUST_NAME_TXT.Enabled = true;
                            }
                            CUST_COMP_NAME_TXT.Enabled = false;
                            CUST_ADD_TXT.Text          = vDR["CUST_ROAD_STREET_HOUSE"].ToString();
                            CUST_COMP_NAME_TXT.Text    = vDR["CUST_COMP_NAME"].ToString();
                            CUST_COMP_NAME_TXT.Enabled = false;
                            CUST_PIN_TXT.Text          = vDR["CUST_PIN"].ToString();
                            CUST_PH_TXT.Text           = vDR["CUST_PHONE"].ToString();
                            CUST_EMAIL_TXT.Text        = vDR["CUST_EMAIL"].ToString();
                            TXT_DESIGNATION.Text       = vDR["CUST_DESIGNATION"].ToString();
                            CUST_MOBILE_TXT.Text       = vDR["CUST_MOBILE"].ToString();
                            txt_vil.Text                    = vDR["CUST_VILLAGE_TWN_CITY"].ToString();
                            CUST_CONSL_TXT.Text             = vDR["CUST_CONSULT_NAME"].ToString();
                            CUST_CONSL_MOB_TXT.Text         = vDR["CUST_CONSULT_MOB"].ToString();
                            txt_post.Text                   = vDR["CUST_POST_OFFICE"].ToString();
                            ddlProspective.SelectedIndex    = ddl_state.Items.IndexOf(ddl_state.Items.FindByValue(vDR["CUST_PROSPECTIVE"].ToString()));
                            ddl_state.SelectedIndex         = ddl_state.Items.IndexOf(ddl_state.Items.FindByValue(vDR["CUST_STA_ID"].ToString()));
                            CUST_CATRGORY_DDL.SelectedIndex = CUST_CATRGORY_DDL.Items.IndexOf(CUST_CATRGORY_DDL.Items.FindByValue(vDR["CUST_CATRGORY_ID"].ToString()));
                            CUST_CATRGORY_DDL.Enabled       = false;
                            CUST_COUNTRY_DDL.SelectedIndex  = CUST_COUNTRY_DDL.Items.IndexOf(CUST_COUNTRY_DDL.Items.FindByValue(vDR["CUST_COUNTRY_ID"].ToString()));
                            CUST_COUNTRY_DDL_SelectedIndexChanged(sender, e);
                            ddl_state.SelectedIndex            = ddl_state.Items.IndexOf(ddl_state.Items.FindByValue(vDR["CUST_STA_ID"].ToString()));
                            ddlProspective.SelectedItem.Text   = vDR["CUST_PROSPECTIVE"].ToString();
                            ORGANIZATION_DDL.SelectedItem.Text = vDR["CUST_ORGANIZATION_NAME"].ToString();
                            CUST_STATION_DDL.SelectedItem.Text = vDR["CITY_NAME"].ToString();
                            HiddenField1.Value = vDR["CUST_ARHQ_ID"].ToString();
                            TXT_START.Text     = vDR["CUST_FROM_DATE"].ToString();
                            TXT_END.Text       = vDR["CUST_TO_DATE"].ToString();
                        }
                    }
                }
                else
                {
                }
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
Ejemplo n.º 27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID  = Request.QueryString["ID"];
        String vID2 = Request.QueryString["id1"];

        if (!IsPostBack)
        {
            try
            {
                if (vATSession.UserType == "ADMIN")
                {
                    if (vID2 != null)
                    {
                        Hashtable vHashtable2 = new Hashtable();
                        vHashtable2.Add("PTP_ID", vID2);
                        DataTable dt1  = DBManager.Get(vHashtable2, "GET_PT_CARS");
                        DataRow   vDR1 = RetDR(DBManager.Get(vHashtable2, "GET_PT_CARS"));
                        if (dt1.Columns.Count > 6)
                        {
                            GridView2.DataSource = dt1;
                            GridView2.DataBind();
                            car.Visible = false;
                        }
                        if (dt1.Columns.Count == 2)
                        {
                            GridView1.DataSource = dt1;
                            GridView1.DataBind();
                            Submitcar.Visible = false;
                            btnSave.Visible   = false;
                            //  car.Visible = false;
                        }
                    }
                }
                else if (vATSession.UserType == "DOCTOR" || vATSession.UserType == "Doctor")
                {
                    if (vID2 != null)
                    {
                        Hashtable vHashtable2 = new Hashtable();
                        vHashtable2.Add("PTP_ID", vID2);
                        DataTable dt1  = DBManager.Get(vHashtable2, "GET_PT_CARS");
                        DataRow   vDR1 = RetDR(DBManager.Get(vHashtable2, "GET_PT_CARS"));
                        if (dt1.Columns.Count > 6)
                        {
                            GridView2.DataSource = dt1;
                            GridView2.DataBind();
                            car.Visible = false;
                        }
                        if (dt1.Columns.Count == 2)
                        {
                            GridView1.DataSource = dt1;
                            GridView1.DataBind();
                            Submitcar.Visible = false;
                            // btnSave.Visible = false;
                            //  car.Visible = false;
                        }
                    }
                }
                else if (vATSession.UserType == "THERAPIST" || vATSession.UserType == "Therapist")
                {
                    if (vID2 != null)
                    {
                        Hashtable vHashtable2 = new Hashtable();
                        vHashtable2.Add("PTP_ID", vID2);
                        DataTable dt1  = DBManager.Get(vHashtable2, "GET_PT_CARS");
                        DataRow   vDR1 = RetDR(DBManager.Get(vHashtable2, "GET_PT_CARS"));
                        if (dt1.Columns.Count > 6)
                        {
                            GridView2.DataSource = dt1;
                            GridView2.DataBind();
                            car.Visible = false;
                        }
                        if (dt1.Columns.Count == 2)
                        {
                            GridView1.DataSource = dt1;
                            GridView1.DataBind();
                            Submitcar.Visible = false;
                            // btnSave.Visible = false;
                            //  car.Visible = false;
                        }
                    }
                }
            }
            catch (Exception xe)
            {
                ShowMsg(xe);
            }
        }
    }
Ejemplo n.º 28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vATSession = (ATSession)Session["User"];
        if (vATSession == null)
        {
            Response.Redirect("Default.aspx");
        }
        String vID = Request.QueryString["ID"];

        PTP_TXT.Text = vATSession.UserName;
        if (vATSession.UserType == "ADMIN")
        {
            GridView1.Visible = true;
            hidden1.Visible   = true;
            btnSave.Visible   = false;
        }
        else
        {
            GridView1.Visible = true;
        }
        if (!IsPostBack)
        {
            try
            {
                ValidateUserAccess();
                ATCommon.FillDrpDown(COND_ID, DBManager.Get(new Hashtable(), "CMB_CONDITION_MASTER"), "Select Condition Name", "COND_NAME", "COND_ID", "0");
                if (vID != null)
                {
                    PTP_ID.Value = vID;
                    Hashtable vHashtable = new Hashtable();
                    vHashtable.Add("PTP_ID", vID);
                    vHashtable.Add("TYPE", "GET");
                    DataRow vDR = RetDR(DBManager.Get(vHashtable, "GET_PATIENT_DETAIL"));
                    if (vDR != null)
                    {
                        PTP_ID.Value    = vID;
                        vID             = vDR["PTP_ID"].ToString();
                        PTP_TXT.Text    = vDR["PTP_NAME"].ToString();
                        Textarea1.Value = vDR["PTP_NAME"].ToString() + "&nbsp;" + "mother was " +
                                          "------------ " + "years old and father- was " + "------------- " + "years old at the time of the birth of" + "&nbsp;" +
                                          vDR["PTP_NAME"].ToString() + "&nbsp;" + "There were" + "&nbsp;" + "complications / no complications" + "&nbsp;" +
                                          "during pregnancy reported by the mother and" + "&nbsp;" + "he / she" + "&nbsp;" + "was born with no apparent  medical complications/ issues like" + "&nbsp;" +
                                          "------------------------------------" + "&nbsp;" + vDR["PTP_NAME"].ToString() + "&nbsp;" +
                                          "was full term / pre-term" + "and was born through C-section / normal delivery." +
                                          "The mother" + "&nbsp;" + "----------" + "&nbsp;" + "did not face complications/ faced complications during delivery." + "&nbsp;" +
                                          "------------------------------------" + "&nbsp;" + vDR["PTP_NAME"].ToString() + "&nbsp;"
                                          + "birth weight was " + "----------.";

                        Hashtable vHashtable2 = new Hashtable();
                        vHashtable2.Add("PTP_ID", vID);
                        DataRow vDR2 = RetDR(DBManager.Get(vHashtable2, "GET_PT_MENTAL_ID"));
                        if (vDR2 != null)
                        {
                            btnSave.Visible = false;
                        }
                    }
                    else
                    {
                        ShowMsg("Invalid ID");
                    }
                }
            }
            catch (Exception xe) { ShowMsg(xe); }
        }
    }
Ejemplo n.º 29
0
    public static void ExecMySQLInsUps(Hashtable pParameterValues, String pQueryCode, ATSession pATSession)
    {
        try
        {
            using (MySqlConnection vMySqlConnection = DBManager.vGetMySQLConnection())
            {
                MySqlCommand vMySqlCommand = new MySqlCommand(pQueryCode, vMySqlConnection);
                vMySqlCommand.CommandType = CommandType.StoredProcedure;
                IDictionaryEnumerator vEnumerator = pParameterValues.GetEnumerator();
                AddParameters(pParameterValues, ref vMySqlCommand);

                MySqlParameter vMySqlParameter = new MySqlParameter();
                vMySqlParameter.ParameterName = "LASTUSER";
                vMySqlParameter.Value         = pATSession.Login;
                vMySqlParameter.Direction     = ParameterDirection.Input;
                vMySqlParameter.MySqlDbType   = MySqlDbType.VarChar;
                vMySqlCommand.Parameters.Add(vMySqlParameter);
                vMySqlCommand.ExecuteNonQuery();
            }
        }
        catch (Exception xe)
        {
            //pTraceLog.WriteLog("ExecSP: " + xe);
            throw new Exception(xe.ToString());
        }
    }
Ejemplo n.º 30
0
    public static DataTable ExecInsUpsMyGet(Hashtable pParameterValues, String pQueryCode, String pProcedure, ATSession pATSession)
    {
        try
        {
            using (MySqlConnection vMySqlConnection = DBManager.vGetMySQLConnection())
            {
                MySqlCommand vMySqlCommand = new MySqlCommand(pQueryCode, vMySqlConnection);
                vMySqlCommand.CommandType = CommandType.StoredProcedure;
                IDictionaryEnumerator vEnumerator = pParameterValues.GetEnumerator();
                AddParameters(pParameterValues, ref vMySqlCommand);

                MySqlParameter vMySqlParameter = new MySqlParameter();
                vMySqlParameter.ParameterName = "last_user";
                vMySqlParameter.Value         = pATSession.Login;
                vMySqlParameter.Direction     = ParameterDirection.Input;
                vMySqlParameter.MySqlDbType   = MySqlDbType.VarChar;
                vMySqlCommand.Parameters.Add(vMySqlParameter);
                MySqlParameter vMySqlParamReturn = new MySqlParameter("@Return", MySqlDbType.Int24);
                vMySqlParamReturn.Direction = ParameterDirection.Output;
                vMySqlCommand.Parameters.Add(vMySqlParamReturn);
                vMySqlCommand.ExecuteNonQuery();
                String    vReturn = vMySqlParamReturn.Value.ToString();
                Hashtable vHT     = new Hashtable();
                vHT.Add("ID", vReturn);
                DataTable vDataTable = Get(vHT, pProcedure);
                return(vDataTable);
            }
        }
        catch (Exception xe)
        {
            //pTraceLog.WriteLog("ExecSP: " + xe);
            throw new Exception(xe.ToString());
        }
    }