Ejemplo n.º 1
0
    protected void PopulateStudyDDL()
    {
        //DataTable dt = oSQL.DataTable_from_ProcName("spSEC_GetStudies_CanView_OR_Acess_by_User__Short__with_SelectStudy");

        SQL_utils sql = new SQL_utils("backend");

        string sqlcode = "select -1 as studyID, ' <select new study>' as StudyName " +
                         "union select a.studyID, StudyName " +
                         "from tblstudy a  order by 2";
        DataTable dt = sql.DataTable_from_SQLstring(sqlcode);

        sqluser.Text = String.Format("instantiate as:{0}<br/>viewable:{1}<br/>msg:{2}"
                                     , sql.InstantiateAs
                                     , sql.GetSessionContextViewableInfo()
                                     , sql.Errormsg
                                     );

        ddl_Master_SelectStudyID.DataSource = dt;
        ddl_Master_SelectStudyID.DataBind();
    }