Beispiel #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();
        }
        protected void DataBind()
        {
            ISalesManagerBLL objBLL = SalesManagerBLLFactory.CreateSalesManagerBLLObject();

            gvShowReport.DataSource = objBLL.GenerateReportDateWise(Convert.ToDateTime(txtFrom.Text), Convert.ToDateTime(txtTo.Text));
            gvShowReport.DataBind();
        }
        /// <summary>
        /// This function wil display the returned items on selected date.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        protected void DataBind()
        {
            DateTime         date   = Convert.ToDateTime(txtDate.Text);
            ISalesManagerBLL objBLL = BLLFactory.SalesManagerBLLFactory.CreateSalesManagerBLLObject();

            gvShowReturnedItemList.DataSource = objBLL.GetReturnedItemList(date);
            gvShowReturnedItemList.DataBind();
        }
Beispiel #4
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";
            }
        }
Beispiel #6
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();
        }
        protected void txtDate_TextChanged(object sender, EventArgs e)
        {
            ISalesManagerBLL objBLL = BLLFactory.SalesManagerBLLFactory.CreateSalesManagerBLLObject();

            DateTime date = Convert.ToDateTime(txtDate.Text);
            List <IReturnedItems> returnedItemsList = objBLL.GetReturnedItemList(date);

            gvShowReturnedItemList.DataSource = returnedItemsList;
            gvShowReturnedItemList.DataBind();
            if (returnedItemsList.Count == 0)
            {
                lblMessage.Text = "No Items to Display";
            }
        }
        //protected void btnViewCanceleldBill_Click(object sender, EventArgs e)
        //{
        //    ISalesManagerBLL objBLL = BLLFactory.SalesManagerBLLFactory.CreateSalesManagerBLLObject();

        //   DateTime date = Convert.ToDateTime(txtDate.Text);
        //   List<ICustomerBill> cancellBillList = objBLL.GetCancelledBillList(date);

        //   gvShowCancelledBills.DataSource = cancellBillList;
        //    gvShowCancelledBills.DataBind();

        //}

        /// <summary>
        /// This method is used to display cancelled bill list on selected date
        /// </summary>
        protected void txtDate_TextChanged(object sender, EventArgs e)
        {
            lblMessage.Text = "";
            ISalesManagerBLL objBLL = BLLFactory.SalesManagerBLLFactory.CreateSalesManagerBLLObject();

            DateTime             date            = Convert.ToDateTime(txtDate.Text);
            List <ICustomerBill> cancellBillList = objBLL.GetCancelledBillList(date);

            gvShowCancelledBills.DataSource = cancellBillList;


            gvShowCancelledBills.DataBind();
            if (cancellBillList.Count == 0)
            {
                lblMessage.Text = "No Bills to Display";
            }
            //else
            //{
            //    lblMessage.Text = "";
            //}
        }
        /// <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;
            }
        }