示例#1
0
    private void BindDate()
    {
        List <SearchField> list1  = new List <SearchField>();
        string             idlist = Session["Myzcid"].ToString();

        string[] arr  = idlist.Split(',');
        string   temp = "";

        for (int i = 0; i < arr.Length; i++)
        {
            if (i == 0)
            {
                temp = " id =" + arr[i];
            }
            else
            {
                temp = temp + " or id =" + arr[i];
            }
        }
        if (temp != "")
        {
            list1.Add(new SearchField("", temp, SearchOperator.用户定义));
        }

        U_ZCBU  zc1 = new U_ZCBU();
        DataSet ds  = zc1.GetSearchResultByID("*,isnull(pbj,0)+isnull(plx,0) as hbxh,isnull(bj,0)+isnull(lx1,0)+isnull(lx2,0)+isnull(lx3,0)-isnull(pbj,0)-isnull(plx,0) as bxhjye", list1);

        zc1.Close();
        this.GridView1.DataSource = ds;
        this.GridView1.DataBind();
        ds.Dispose();
    }