Exemplo n.º 1
0
        /// <summary>
        /// Function will display the money transaction takes place on selected date.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnViewMoneyTransaction_Click(object sender, EventArgs e)
        {
            lblLineTotal.Visible   = true;
            lbllinetotals.Visible  = true;
            lblnumberbill.Visible  = true;
            lblNumberBills.Visible = true;
            double           sum    = 0;
            ISalesManagerBLL objBLL = SalesManagerBLLFactory.CreateSalesManagerBLLObject();

            DateTime date = Convert.ToDateTime(txtDate.Text);

            viewMoneyTranslist = objBLL.GetMoneyTransaction(date);
            //  viewMoneyTranslist = objBLL.GetMoneyTransaction(Calendar1.SelectedDate);
            int count = viewMoneyTranslist.Count();

            lblnumberbill.Text           = count.ToString();
            gvShowBillDetails.DataSource = viewMoneyTranslist;
            gvShowBillDetails.DataBind();
            double totalAmount = 0;

            for (int i = 0; i < gvShowBillDetails.Rows.Count; i++)
            {
                GridViewRow gvShowBillsRow = gvShowBillDetails.Rows[i];

                totalAmount += Convert.ToDouble(gvShowBillsRow.Cells[3].Text);
                sum          = sum + totalAmount;
            }
            lbllinetotals.Text = totalAmount.ToString();
        }
Exemplo n.º 2
0
        protected void DataManageEmployeeBinding()
        {
            ISalesManagerBLL objBLL = SalesManagerBLLFactory.CreateSalesManagerBLLObject();
            DateTime         date   = Convert.ToDateTime(txtDate.Text);

            viewMoneyTranslist           = objBLL.GetMoneyTransaction(date);
            gvShowBillDetails.DataSource = viewMoneyTranslist;
            gvShowBillDetails.DataBind();
        }