예제 #1
0
    private void BindData()
    {
        List <SearchField> list1 = (List <SearchField>)ViewState["SearchCondition"];
        U_ZCBU             zc1   = new U_ZCBU();
        DataSet            ds1   = zc1.GetSearchResult(list1);

        this.GridView1.DataSource = ds1;
        this.GridView1.DataBind();
        zc1.Close();
        ds1.Dispose();
    }
예제 #2
0
    void AdvanceSearch1_OnMySearchClick(object sender, EventArgs e)
    {
        ZcMng1_AdvanceSearch search1 = sender as ZcMng1_AdvanceSearch;

        if (search1 != null)
        {
            List <SearchField> list1 = search1.SearchConditon;
            list1.Add(new SearchField("zeren", "null", SearchOperator.空值));

            U_ZCBU  Zc1 = new U_ZCBU();
            DataSet ds1 = Zc1.GetSearchResult(list1);
            this.GridView1.DataSource = ds1;
            this.GridView1.DataBind();
            ds1.Dispose();
            Zc1.Close();
        }
    }
예제 #3
0
    private void BindData()
    {
        U_ZCBAOBU zcb1 = new U_ZCBAOBU();
        string    ids  = zcb1.GetZCIDByBID(Request["id"].ToString());

        zcb1.Close();
        List <SearchField> list1 = new List <SearchField>();

        list1.Add(new SearchField("id", ids, SearchOperator.集合, SearchFieldType.数值型));
        list1.Add(new SearchField("zeren", User.Identity.Name, SearchFieldType.字符型));
        U_ZCBU  zc1 = new U_ZCBU();
        DataSet ds  = zc1.GetSearchResult(list1);

        this.GridView1.DataSource = ds;
        this.GridView1.DataBind();
        ds.Dispose();
        zc1.Close();
    }
예제 #4
0
    private void BindData()
    {
        List <SearchField> list1 = (List <SearchField>)ViewState["SearchCondition"];
        U_ZCBU             zc1   = new U_ZCBU();
        DataSet            ds1   = zc1.GetSearchResult(list1);
        string             zcid  = "";

        for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
        {
            if (i == 0)
            {
                zcid = ds1.Tables[0].Rows[i]["id"].ToString();
            }
            else
            {
                zcid = zcid + "," + ds1.Tables[0].Rows[i]["id"].ToString();
            }
        }
        this.zcid.Text = zcid;
        DataTable dt  = ds1.Tables[0];
        DataView  dv1 = dt.DefaultView;

        dv1.Sort = "num2";

        //DataView dv = dt.DefaultView;
        //dv.Sort = "num2";

        this.GridView1.DataSource = dv1;
        this.GridView1.DataBind();
        zc1.Close();
        ds1.Dispose();
        string[] str = (string[])ViewState["str"];
        this.danwei.Text   = str[0];
        this.zcbao.Text    = str[1];
        this.depart.Text   = str[2];
        this.zeren.Text    = str[3];
        this.quyu.Text     = str[4];
        this.bstatus.Text  = str[5];
        this.hangye.Text   = str[6];
        this.fenlei.Text   = str[7];
        this.status.Text   = str[8];
        this.userkind.Text = str[9];
        Session["zcid"]    = this.zcid.Text;
    }
예제 #5
0
    private void BindDate()
    {
        List <SearchField> list1  = new List <SearchField>();
        string             idlist = ViewState["id"].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.GetSearchResult(list1);

        zc1.Close();
        this.GridView1.DataSource = ds;


        foreach (DataRow dr in ds.Tables[0].Rows)
        {
            d1 = d1 + double.Parse(dr["bj"].ToString());
            d2 = d2 + double.Parse(dr["lx1"].ToString());
        }
        this.GridView1.DataBind();
        //TableCell cell1=new TableCell();
        //cell1.Text = "123456";
        //this.GridView1.Rows[this.GridView1.Rows.Count-1].Cells.Add(cell1);
        ds.Dispose();
    }
예제 #6
0
    void AdvanceSearch1_OnMySearchClick(object sender, EventArgs e)
    {
        ZcMng1_AdvanceSearch search1 = sender as ZcMng1_AdvanceSearch;

        if (search1 != null)
        {
            int totalRow = 0;
            int curpage  = 1;

            List <SearchField> list1 = search1.SearchConditon;
            list1.Add(new SearchField("zeren", "null", SearchOperator.非空值));

            U_ZCBU   Zc1 = new U_ZCBU();
            DataSet  ds1 = Zc1.GetSearchResult(list1);
            DataView dv  = ds1.Tables[0].DefaultView;
            dv.Sort = "num2";
            this.GridView1.DataSource = dv;
            this.GridView1.DataBind();
            ds1.Dispose();
            Zc1.Close();
        }
    }