private void BindData() { StockAccountBLL bll = null; DataPage dp = new DataPage(); WHMonthAccount condition = new WHMonthAccount(); string[] yearMonths = this.YearMonth.Text.Split("-".ToArray()); try { bll = BLLFactory.CreateBLL <StockAccountBLL>(); condition.Warehouse = this.Warehouse.SelectedValue; condition.ProductType = this.ProductType.SelectedValue; condition.MatID = this.MatID.SelectedValue; condition.AccountYear = int.Parse(yearMonths[0]); condition.AccountMonth = int.Parse(yearMonths[1]); PagerHelper.InitPageControl(this.AspNetPager1, dp, true); dp = bll.QueryMonthAccount(condition, dp); List <WHMonthAccount> list = dp.Result as List <WHMonthAccount>; this.GvList.DataSource = list; this.GvList.DataBind(); PagerHelper.SetPageControl(AspNetPager1, dp, true); } catch (Exception ex) { throw ex; } }
protected void Button1_Click(object sender, EventArgs e) { StockAccountBLL bll = BLLFactory.CreateBLL <StockAccountBLL>(); bll.ComputeAccount(); }