Ejemplo n.º 1
0
    protected void ReadQueryStringParams()
    {
        master_pkvalue    = -1;
        viewstate_pkvalue = -2;
        usestudy          = false;
        //if (Session["master_pkvalue"] != null)
        //{
        //    master_pkvalue = Int32.Parse(Session["master_pkvalue"].ToString());
        //}

        if (ViewState["master_pkvalue"] != null)
        {
            viewstate_pkvalue = Int32.Parse(ViewState["master_pkvalue"].ToString());
        }


        #region Get QueryString parameters
        SQL_utils sql = new SQL_utils("backend");

        if (Request.QueryString["usestudy"] != null)
        {
            string qs_usestudy = utilCrypt.Decrypt(Request.QueryString["usestudy"]);
            usestudy = (qs_usestudy == "y") ? true : false;
        }

        schema = "dbo";

        if (Request.QueryString["schema"] != null)
        {
            schema = utilCrypt.Decrypt(Request.QueryString["schema"]);
        }

        if (Request.QueryString["tbl"] != null)
        {
            master_tbl      = utilCrypt.Decrypt(Request.QueryString["tbl"]);
            master_pk       = sql.GetPKForTable("uwautism_research_backend", master_tbl, schema);
            master_labelfld = sql.GetLabelFieldForTable("uwautism_research_backend", master_tbl, schema);
        }

        if (Request.QueryString["detail"] != null)
        {
            detail_tbl      = utilCrypt.Decrypt(Request.QueryString["detail"]);
            detail_pk       = sql.GetPKForTable("uwautism_research_backend", detail_tbl, schema);
            detail_labelfld = sql.GetLabelFieldForTable("uwautism_research_backend", detail_tbl, schema);
        }

        if (Request.QueryString["linktable"] != null)
        {
            linktable = utilCrypt.Decrypt(Request.QueryString["linktable"]);
        }


        sql.Close();

        #endregion
    }