Esempio n. 1
0
        protected void InitializeFileLists()
        {
            // This was commented out because FileDownloadBrowser.aspx is missing in our codebase
            //if (HccApp.CatalogServices.ProductFiles.CountOfAll() > 30)
            //{
            //	FilesDropDownList.Visible = false;
            //	FileSelectedTextBox.Visible = true;
            //	browseButton.Visible = true;
            //}
            //else
            //{
            var files = HccApp.CatalogServices.ProductFiles.FindAll(1, 1000);

            FilesDropDownList.Visible   = true;
            FileSelectedTextBox.Visible = false;
            browseButton.Visible        = false;

            var item = FilesDropDownList.Items[0];

            FilesDropDownList.Items.Clear();
            FilesDropDownList.Items.Add(item);

            FilesDropDownList.DataSource     = files;
            FilesDropDownList.DataTextField  = "CombinedDisplay";
            FilesDropDownList.DataValueField = "Bvin";
            FilesDropDownList.DataBind();
            //}
        }
Esempio n. 2
0
        protected void InitializeFileLists()
        {
            if (MyPage.MTApp.CatalogServices.ProductFiles.CountOfAll() > 30)
            {
                FilesDropDownList.Visible   = false;
                FileSelectedTextBox.Visible = true;
                browseButton.Visible        = true;
            }
            else
            {
                List <ProductFile> files = MyPage.MTApp.CatalogServices.ProductFiles.FindAll(1, 1000);
                FilesDropDownList.Visible   = true;
                FileSelectedTextBox.Visible = false;
                browseButton.Visible        = false;

                System.Web.UI.WebControls.ListItem item = (System.Web.UI.WebControls.ListItem)FilesDropDownList.Items[0];
                FilesDropDownList.Items.Clear();
                FilesDropDownList.Items.Add(item);

                FilesDropDownList.DataSource     = files;
                FilesDropDownList.DataTextField  = "CombinedDisplay";
                FilesDropDownList.DataValueField = "Bvin";
                FilesDropDownList.DataBind();
            }
        }