コード例 #1
0
        // static List<IItem> billsItems = new List<IItem>();
        /// <summary>
        /// This is the page load method for generating Bill.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            ISalesPersonBLL objBLL = SalesPersonBLLFactory.CreateSalesPersonBLLObject();

            List <IItemCategory> itemList = objBLL.GetItemCategoryList();
            DateTime             date     = DateTime.Now;

            if (!IsPostBack)
            {
                int salesPersonId = Convert.ToInt32(Session["userID"]);

                lblBillsDate.Text            = (date).ToString();
                lblSalesPersonID.Text        = salesPersonId.ToString();
                lblBillNumberLabel.Visible   = false;
                btnAddItemToBill.Visible     = false;
                btnDelete.Visible            = false;
                btnCalcBill.Visible          = false;
                lblTotalPrice.Visible        = false;
                lblTotalPriceLabel.Visible   = false;
                lblMoneyIn.Visible           = false;
                txtMoneyIn.Visible           = false;
                lblReturnAmountLabel.Visible = false;
                lblReturnAmount.Visible      = false;
                btnGenerateButton.Visible    = false;
            }
            if (!IsPostBack)
            {
                ddlCategory.DataSource     = itemList;
                ddlCategory.DataTextField  = "CategoryName";
                ddlCategory.DataValueField = "CategoryID";
                ddlCategory.DataBind();
            }
        }
コード例 #2
0
        /// <summary>
        /// This is the Page Load method for showing list of items
        /// </summary>

        protected void Page_Load(object sender, EventArgs e)
        {
            ISalesPersonBLL objBLL = SalesPersonBLLFactory.CreateSalesPersonBLLObject();

            List <IItemCategory> itemList = objBLL.GetItemCategoryList();

            if (!IsPostBack)
            {
                ddlCategory.DataSource     = itemList;
                ddlCategory.DataTextField  = "CategoryName";
                ddlCategory.DataValueField = "CategoryID";
                ddlCategory.DataBind();
            }
        }
コード例 #3
0
        /// <summary>
        /// This is the Page Load method for generating item report
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            BtnGenerateReport.Visible = false;
            btnReset.Visible          = false;
            btnaddToReport.Visible    = false;

            ISalesPersonBLL      objBLL   = SalesPersonBLLFactory.CreateSalesPersonBLLObject();
            List <IItemCategory> itemList = objBLL.GetItemCategoryList();

            if (!IsPostBack)//For Binding CategoryId from Database
            {
                ddlCategory.DataSource     = itemList;
                ddlCategory.DataTextField  = "CategoryName";
                ddlCategory.DataValueField = "CategoryID";
                ddlCategory.DataBind();
            }
            LblMessage.Text = "";
        }