码迷,mamicode.com
首页 > 其他好文 > 详细

多个数据读取的两种简写方法

时间:2015-02-03 19:13:41      阅读:143      评论:0      收藏:0      [点我收藏+]

标签:

string[] gqds_key = new string[23];
            string[] gqds_table = new string[23];
            string[] gqds_where = new string[23];
            string[] gqds_order = new string[23];
            DataSet gqds = new DataSet();

            gqds_key[0] = "top 9 oppid,title,opptype";
            gqds_table[0] = "Opportunity";
            gqds_where[0] = "opptype=3 and oppstate=1";
            gqds_order[0] = "oppid desc";

            gqds = DB.ReturnDataSet(gqds_key, gqds_table, gqds_where, gqds_order);
            Bind(rptgy, gqds, 0);

            protected void Bind(Repeater rpt, DataSet ds, int i)
            {
                rpt.DataSource = ds.Tables[i];
         rpt.DataBind();
            }
           public static DataSet ReturnDataSet(string[] colums, string[] tabname, string[] where, string[] order);
           string[] listsql2 = new string[7];
    listsql2[0] = "";
           listsql2[1] = "";
           dataSet ds = DB.ReturnDataSet(listsql2 );
    Bind(rptgy, ds , 0);

多个数据读取的两种简写方法

标签:

原文地址:http://www.cnblogs.com/candyzhmm/p/4270582.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!