コード例 #1
0
        private void BindData()
        {
            List <Models.MInventoryBalance> InventoryBalance = new List <Models.MInventoryBalance>();

            Classes.CInventory ci = new Classes.CInventory();
            int FiscalYearId      = Convert.ToInt32(Session["FiscalYear"]);

            Classes.CFiscalYear cf    = new Classes.CFiscalYear();
            List <DateTime>     Dates = cf.GetDefaultDatesById(FiscalYearId);

            InventoryBalance = ci.GetInventoryBalance(Dates[0], Dates[1]);
            InventoryBalance = InventoryBalance.Where(o => o.WareHouseId == Convert.ToInt32(Session["WareHouse"].ToString())).ToList();
            repInventoryBalance.DataSource = InventoryBalance;
            repInventoryBalance.DataBind();
        }
コード例 #2
0
        protected void btnFilter_Click(object sender, EventArgs e)
        {
            List <Models.MInventoryBalance> InventoryBalance = new List <Models.MInventoryBalance>();

            Classes.CInventory ci = new Classes.CInventory();
            int FiscalYearId      = Convert.ToInt32(Session["FiscalYear"]);

            Classes.CFiscalYear cf    = new Classes.CFiscalYear();
            List <DateTime>     Dates = cf.GetDefaultDatesById(FiscalYearId);

            InventoryBalance = ci.GetInventoryBalance(Dates[0], Dates[1]);
            if (cbViewAll.Checked)
            {
                //do nothing
            }
            else
            {
                InventoryBalance = InventoryBalance.Where(o => o.WareHouseId == Convert.ToInt32(Session["WareHouse"].ToString())).ToList();
            }
            repInventoryBalance.DataSource = InventoryBalance;
            repInventoryBalance.DataBind();
        }