三层架构中怎么查询数据库里的数据,我想查询数据库 ZLSP1017 中表 ZL_DocumentType 里列 DTname 的所以数据

解决方案 »

  1.   

    中间层取数据,发回给你,比如remoting,webservice
      

  2.   

     protected void Page_Load(object sender, EventArgs e)
            {
                if (!IsPostBack)
                {
                    DataTable dt = bllDocumentType.GetList("").Tables[0];
                    Label1.Text = "";
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        Label1.Text += dt.Rows[i]["DTName"].ToString() + " ";
                    }
                }
            }