Ejemplo n.º 1
0
        protected void reportShowButton_Click(object sender, EventArgs e)
        {
            DateTime lowerDate = DateTime.Parse(lowerDateTextBox.Value.ToString());
            DateTime upperDate = DateTime.Parse(upperDateTextBox.Value.ToString());


            BillManager billManager = new BillManager();

            List <ViewUnpaidBill> viewUnpaidBillList = billManager.GetUnpaidBillsByDate(lowerDate, upperDate);

            billShowGridView.DataSource = viewUnpaidBillList;
            billShowGridView.DataBind();
            double totalAmount = 0;

            foreach (ViewUnpaidBill viewUnpaidBill in viewUnpaidBillList)
            {
                totalAmount += viewUnpaidBill.BillAmount;
            }

            totalAmountTextBox.Value = totalAmount.ToString();
        }