protected void DataBind()
        {
            ISalesManagerBLL objBLL = SalesManagerBLLFactory.CreateSalesManagerBLLObject();

            gvShowReport.DataSource = objBLL.GenerateReportDateWise(Convert.ToDateTime(txtFrom.Text), Convert.ToDateTime(txtTo.Text));
            gvShowReport.DataBind();
        }
コード例 #2
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();
        }
コード例 #3
0
        protected void DataManageEmployeeBinding()
        {
            ISalesManagerBLL objBLL = SalesManagerBLLFactory.CreateSalesManagerBLLObject();
            DateTime         date   = Convert.ToDateTime(txtDate.Text);

            viewMoneyTranslist           = objBLL.GetMoneyTransaction(date);
            gvShowBillDetails.DataSource = viewMoneyTranslist;
            gvShowBillDetails.DataBind();
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            ISalesManagerBLL objBLL = SalesManagerBLLFactory.CreateSalesManagerBLLObject();

            gvShowReport.DataSource = objBLL.GenerateReportDateWise(Convert.ToDateTime(txtFrom.Text), Convert.ToDateTime(txtTo.Text));
            gvShowReport.DataBind();
            if (gvShowReport.Rows.Count == 0)
            {
                lblMessage.Text = "Report not found on selected date";
            }
        }
コード例 #5
0
        protected void DataBind()
        {
            ISalesManagerBLL objBLL = SalesManagerBLLFactory.CreateSalesManagerBLLObject();

            gvShowReportCategoryWise.DataSource = objBLL.GenerateReportCategoryWise(Convert.ToDateTime(txtFrom.Text), Convert.ToDateTime(txtTo.Text));
            gvShowReportCategoryWise.DataBind();
            if (gvShowReportCategoryWise.Rows.Count == 0)
            {
                lblMessage.Text = "Report Not Found On This Selected Date";
            }
        }
        /// <summary>
        /// Function to bind the data.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void DataBind()
        {
            ISalesManagerBLL     objBLL   = SalesManagerBLLFactory.CreateSalesManagerBLLObject();
            List <ICustomerBill> custlist = new List <ICustomerBill>();
            DateTime             date     = Convert.ToDateTime(txtDate.Text);

            custlist = objBLL.GetBillList(date);
            //custlist= objBLL.GetBillList(Calendar1.SelectedDate);
            int count = custlist.Count();

            lblnumberbill.Text        = count.ToString();
            gvShowBillList.DataSource = custlist;
            gvShowBillList.DataBind();
        }
        /// <summary>
        /// This is the method for Viewing Bill Details based on selected date
        /// </summary>
        protected void btnViewBill_Click(object sender, EventArgs e)
        {
            lblMessage.Text = "";
            ISalesManagerBLL     objBLL   = SalesManagerBLLFactory.CreateSalesManagerBLLObject();
            List <ICustomerBill> custlist = new List <ICustomerBill>();
            DateTime             date     = Convert.ToDateTime(txtDate.Text);

            custlist = objBLL.GetBillList(date);
            //custlist= objBLL.GetBillList(Calendar1.SelectedDate);
            int count = custlist.Count();

            lblnumberbill.Text        = count.ToString();
            lblNumberBills.Visible    = true;
            lblnumberbill.Visible     = true;
            gvShowBillList.DataSource = custlist;
            gvShowBillList.DataBind();

            if (gvShowBillList.Rows.Count == 0)
            {
                lblMessage.Text        = "Bills Not Found";
                lblNumberBills.Visible = false;
                lblnumberbill.Visible  = false;
            }
        }