Example #1
0
        public static DataSet f_epestree_inqa(DataSet bcls_rec, string conn)
        {
            //程序用变量
            string strUserid      = "";
            string strCompanycode = "";
            string strRoot        = "root";
            string strFavorite    = "MYFAVORITE";
            string strAppname     = "";

            try
            {
                strUserid      = "admin";
                strCompanycode = bcls_rec.Tables[0].Rows[0]["COMPANYCODE"].ToString();
                strRoot        = bcls_rec.Tables[0].Rows[0]["ROOT"].ToString();
                strFavorite    = bcls_rec.Tables[0].Rows[0]["FAVORITE"].ToString();
                strAppname     = bcls_rec.Tables[0].Rows[0]["APPNAME"].ToString();

                CDbCommand tree_inqa = new CDbCommand(conn);

                tree_inqa.SetCommandText(strSQL);

                tree_inqa.Parameters.Set("appname", strAppname);
                tree_inqa.Parameters.Set("userid", strUserid);
                tree_inqa.Parameters.Set("root", strRoot);
                tree_inqa.Parameters.Set("favorite", strFavorite);
                tree_inqa.Parameters.Set("culture", "chs");
                tree_inqa.Parameters.Set("companycode", strCompanycode);

                DataTable dt = new DataTable();
                tree_inqa.ExecuteQuery(ref dt);

                DataSet bcls_ret = new DataSet();
                bcls_ret.Tables.Add("MENUTREE");
                bcls_ret.Tables[0].Merge(dt);
                return(bcls_ret);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Example #2
0
        public static DataSet f_epestree_inqa(DataSet bcls_rec, string conn)
        {
            //程序用变量
            string strUserid = "";
            string strCompanycode = "";
            string strRoot = "root";
            string strFavorite = "MYFAVORITE";
            string strAppname = "";

            try
            {
                strUserid = "admin";
                strCompanycode = bcls_rec.Tables[0].Rows[0]["COMPANYCODE"].ToString();
                strRoot = bcls_rec.Tables[0].Rows[0]["ROOT"].ToString();
                strFavorite = bcls_rec.Tables[0].Rows[0]["FAVORITE"].ToString();
                strAppname = bcls_rec.Tables[0].Rows[0]["APPNAME"].ToString();

                CDbCommand tree_inqa = new CDbCommand(conn);

                tree_inqa.SetCommandText(strSQL);

                tree_inqa.Parameters.Set("appname", strAppname);
                tree_inqa.Parameters.Set("userid", strUserid);
                tree_inqa.Parameters.Set("root", strRoot);
                tree_inqa.Parameters.Set("favorite", strFavorite);
                tree_inqa.Parameters.Set("culture", "chs");
                tree_inqa.Parameters.Set("companycode", strCompanycode);

                DataTable dt = new DataTable();
                tree_inqa.ExecuteQuery(ref dt);

                DataSet bcls_ret = new DataSet();
                bcls_ret.Tables.Add("MENUTREE");
                bcls_ret.Tables[0].Merge(dt);
                return bcls_ret;
            }
            catch (Exception ex)
            {
                return null;
            }
        }