Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.CacheControl = "no-cache";
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Response.Cache.SetExpires(DateTime.Now.AddDays(-1));
            Response.Cache.SetNoStore();

            if (Session["id"] == null)
            {
                Response.Redirect("UserLoginUI.aspx?logout=true");
            }

            if (IsPostBack == false)
            {
                CategoryDropDownList.DataSource     = SearchAndViewManager.GetAllCategories();
                CategoryDropDownList.DataTextField  = "CategoryName";
                CategoryDropDownList.DataValueField = "Id";
                CategoryDropDownList.DataBind();
                CategoryDropDownList.Items.Insert(0, new ListItem("Select Category", ""));

                CompanyDropDownList.DataSource     = SearchAndViewManager.GetAllCompanies();
                CompanyDropDownList.DataTextField  = "CompanyName";
                CompanyDropDownList.DataValueField = "Id";
                CompanyDropDownList.DataBind();
                CompanyDropDownList.Items.Insert(0, new ListItem("Select Company", ""));
            }
        }
 private void GetCompany()
 {
     CompanyDropDownList.DataSource     = ItemManager.GetAllCompanies();
     CompanyDropDownList.DataTextField  = "Name";
     CompanyDropDownList.DataValueField = "Id";
     CompanyDropDownList.DataBind();
     CompanyDropDownList.Items.Insert(0, new ListItem("Select Company", ""));
 }
        private void GetAllCompany(ItemSummaryViewModel itemSummaryViewModel)
        {
            CompanyDropDownList.DataSource     = itemSummaryManager.GetAllCompanyFromStock(itemSummaryViewModel);
            CompanyDropDownList.DataValueField = "CompanyId";
            CompanyDropDownList.DataTextField  = "CompanyName";
            CompanyDropDownList.DataBind();

            CompanyDropDownList.Items.Insert(0, new ListItem("Select a Company"));
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                CategoryDropDownList.DataSource     = categoryManager.GetAllCategory();
                CategoryDropDownList.DataTextField  = "Name";
                CategoryDropDownList.DataValueField = "Id";
                CategoryDropDownList.DataBind();
                CategoryDropDownList.Items.Insert(0, new ListItem("--Select Item--", "0"));


                CompanyDropDownList.DataSource     = companyManager.GetAllCompany();
                CompanyDropDownList.DataTextField  = "Name";
                CompanyDropDownList.DataValueField = "Id";
                CompanyDropDownList.DataBind();
                CompanyDropDownList.Items.Insert(0, new ListItem("--Select Item--", "0"));
            }
        }
Example #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                categoryDropDownList.DataSource     = itemManager.CatagoryDropDownList();
                categoryDropDownList.DataTextField  = "Name";
                categoryDropDownList.DataValueField = "Id";
                categoryDropDownList.DataBind();
                categoryDropDownList.Items.Insert(0, new ListItem("--Select Category--", "0"));

                CompanyDropDownList.DataSource     = itemManager.CompanyDropDownList();
                CompanyDropDownList.DataTextField  = "Name";
                CompanyDropDownList.DataValueField = "Id";
                CompanyDropDownList.DataBind();
                CompanyDropDownList.Items.Insert(0, new ListItem("--Select Company--", "0"));
                ReorderLevelTextBox.Text = "0";
            }
        }
Example #6
0
        /// <summary>
        /// Refreshes the company drop down list.
        /// </summary>
        private void RefreshCompanyDropDownList()
        {
            // Get the list of the companies which are available to the selected brand.
            // If the staff setting is selected, the only show internal companies.  Otherwise, only
            // show external companies.  Employees must be assigned to an internal company, and
            // non-employees must be assigned to a non-internal company.
            // If we only have a single brand, then ignore the brand assignment settings.

            var companies = from c in CompanyCache.Instance.GetList()
                            where (
                ((BrandManager.IsSingleBrandMode) || (c.BrandList.Any(b => b.BrandId == GetPrimaryBrandId()))) &&
                (c.IsInternal == (NumericUtils.ParseInt32(IsStaffUserRadioButtonList.SelectedValue, 0) == 1))
                )
                            select c;

            CompanyDropDownList.DataSource     = companies;
            CompanyDropDownList.DataTextField  = Company.Columns.Name.ToString();
            CompanyDropDownList.DataValueField = Company.Columns.Name.ToString();
            CompanyDropDownList.DataBind();

            CompanyDropDownList.Items.Insert(0, new ListItem("Other", string.Empty));
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["LogIn"] == null)
            {
                Response.Redirect("LogInUI.aspx");
            }

            if (!IsPostBack)
            {
                CatagoryDropDownList.DataSource     = itemSetupManager.CatagoryDropDownList();
                CatagoryDropDownList.DataTextField  = "Name";
                CatagoryDropDownList.DataValueField = "Id";
                CatagoryDropDownList.DataBind();
                CatagoryDropDownList.Items.Insert(0, new ListItem("--Select Category--", "0"));

                CompanyDropDownList.DataSource     = itemSetupManager.CompanyDropDownList();
                CompanyDropDownList.DataTextField  = "Name";
                CompanyDropDownList.DataValueField = "Id";
                CompanyDropDownList.DataBind();
                CompanyDropDownList.Items.Insert(0, new ListItem("--Select Company--", "0"));
                ReorderLevelTextBox.Text = "0";
            }
        }