private void BindList() { string id = Request.QueryString["id"]; U_ZCBU zc1 = new U_ZCBU(); DataSet ds = zc1.GetDetailByID(id, "danwei,depart,zeren"); this.danwei.Text = ds.Tables[0].Rows[0]["danwei"].ToString(); this.depart.Text = ds.Tables[0].Rows[0]["depart"].ToString(); this.zeren.Text = ds.Tables[0].Rows[0]["zeren"].ToString(); zc1.Close(); CW_StockBillBU stock1 = new CW_StockBillBU(); this.Repeater1.DataSource = stock1.GetStockListByZcID1(id); this.Repeater1.DataBind(); stock1.Close(); //////////////////////////////////////// CW_ShouKuanBU shoukuan1 = new CW_ShouKuanBU(); List <SearchField> list1 = new List <SearchField>(); list1.Add(new SearchField("zcid", Request.QueryString["id"], SearchFieldType.数值型)); this.Repeater2.DataSource = shoukuan1.GetBillList("2", list1, true); this.Repeater2.DataBind(); //////////////////////////////////////////////////////////// list1.Clear(); list1.Add(new SearchField("zcid", Request.QueryString["id"], SearchFieldType.数值型)); this.Repeater3.DataSource = shoukuan1.GetBillList("3", list1, true); this.Repeater3.DataBind(); shoukuan1.Close(); }
private void BindList() { CW_ShouKuanBU shoukuan1 = new CW_ShouKuanBU(); List <SearchField> list1 = new List <SearchField>(); list1.Add(new SearchField("zcid", Request.QueryString["zcid"], SearchFieldType.数值型)); DataSet ds1 = shoukuan1.GetBillList("0", list1, true); this.Repeater1.DataSource = ds1; this.Repeater1.DataBind(); if (ds1.Tables[0].Rows.Count <= 0) { this.Repeater1.Visible = false; } ds1.Dispose(); //////////////////////////////////////////////////////////// list1.Clear(); list1.Add(new SearchField("zcid", Request.QueryString["zcid"], SearchFieldType.数值型)); DataSet ds2 = shoukuan1.GetBillList("1", list1, true); this.Repeater2.DataSource = ds2; this.Repeater2.DataBind(); if (ds2.Tables[0].Rows.Count <= 0) { this.Repeater2.Visible = false; } ds2.Dispose(); shoukuan1.Close(); }
private void BindData() { List <SearchField> list1 = (List <SearchField>)ViewState["SearchCondition"]; string kind = ViewState["SearchKind"].ToString(); CW_ShouKuanBU shoukuan1 = new CW_ShouKuanBU(); DataSet ds = shoukuan1.GetBillList(kind, list1, true); shoukuan1.Close(); if (kind == "0" || kind == "1") { if (ds.Tables[0].Rows.Count > 0) { DataRow dr = ds.Tables[0].NewRow(); dr["danwei1"] = "合计"; dr["bxhj"] = "0"; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { dr["bxhj"] = double.Parse(dr["bxhj"].ToString()) + double.Parse(ds.Tables[0].Rows[i]["bxhj"].ToString()); } ds.Tables[0].Rows.Add(dr); } } this.GridView1.DataSource = ds; this.GridView1.DataBind(); }
private void BindList() { CW_ShouKuanBU shoukuan1 = new CW_ShouKuanBU(); List <SearchField> list1 = new List <SearchField>(); list1.Add(new SearchField("zcid", Request.QueryString["id"], SearchFieldType.数值型)); this.Repeater1.DataSource = shoukuan1.GetBillList("0", list1, true); this.Repeater1.DataBind(); //////////////////////////////////////////////////////////// list1.Clear(); list1.Add(new SearchField("zcid", Request.QueryString["id"], SearchFieldType.数值型)); this.Repeater2.DataSource = shoukuan1.GetBillList("1", list1, true); this.Repeater2.DataBind(); shoukuan1.Close(); }
private void BindData() { List <SearchField> list1 = new List <SearchField>(); string kind = "1"; CW_ShouKuanBU shoukuan1 = new CW_ShouKuanBU(); DataSet ds = shoukuan1.GetBillList(kind, list1, false); shoukuan1.Close(); this.GridView1.DataSource = ds; this.GridView1.DataBind(); }