Exemple #1
0
        private void GetCompany()
        {
            companyDropDownList.DataSource     = StockOutManager.GetAllCompanies();
            companyDropDownList.DataTextField  = "Name";
            companyDropDownList.DataValueField = "Id";
            companyDropDownList.DataBind();
            companyDropDownList.Items.Insert(0, new ListItem("Select Company", ""));

            itemDropDownList.Items.Clear();
            reorderLevelTextBox.Text      = String.Empty;
            availableQuantityTextBox.Text = String.Empty;
            stockOutQuantityTextBox.Text  = String.Empty;
        }
        protected void PopulateCompanyDropDownList()
        {
            List <Company> companies = aStockOutManager.GetAllCompanies();



            companyDropDownList.DataSource = companies;



            companyDropDownList.DataTextField  = "Name";
            companyDropDownList.DataValueField = "Id";
            companyDropDownList.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List <Company> companies = aStockOutManager.GetAllCompanies();
                companyDropDownList.DataSource     = companies;
                companyDropDownList.DataValueField = "Id";
                companyDropDownList.DataTextField  = "CompanyName";
                companyDropDownList.DataBind();

                List <Item> allStockOut = new List <Item>();
                ViewState["Items"] = allStockOut;
            }
            reorderLavelTextBox.Enabled      = false;
            availableQuantityTextBox.Enabled = false;
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["ID"] != null)
     {
         if (!IsPostBack)
         {
             companyDropdownList.DataSource     = stockOutManager.GetAllCompanies();
             companyDropdownList.DataTextField  = "CompanyName";
             companyDropdownList.DataValueField = "Id";
             companyDropdownList.DataBind();
             companyDropdownList.Items.Insert(0, new ListItem("-Select a company-", "0"));
             itemDropdownList.Items.Insert(0, new ListItem("-Select a item-", "0"));
             itemDropdownList.Enabled = false;
             sellButton.Visible       = false;
             damageButton.Visible     = false;
             lostButton.Visible       = false;
         }
         messageLabel.Text = "";
     }
     else
     {
         Response.Redirect("IndexUI.aspx");
     }
 }