Ejemplo n.º 1
0
    private void BindList()
    {
        String num2 = Request.QueryString["num2"];

        if (String.IsNullOrEmpty(num2) == false)
        {
            String             connectString = ConfigurationManager.ConnectionStrings["DefaultConnstring"].ConnectionString;
            JConnect           conn1         = JConnect.GetConnectForWinForm(connectString, WebDbType.SqlServer);
            JTable             tab1          = new JTable(conn1, "my1");
            List <SearchField> condition     = new List <SearchField>();
            condition.Add(new SearchField("盒号", num2));
            DataSet ds1 = tab1.SearchData(condition, -1, "*");
            this.repeater1.DataSource = ds1;
            this.repeater1.DataBind();

            //设置默认的第一条信息
            if (ds1.Tables[0].Rows.Count > 0)
            {
                this.五级分类.Text = ds1.Tables[0].Rows[0]["五级分类"].ToString();
            }
            tab1.Close(true);
        }
    }