/// <summary> /// Fill dropdown lists /// </summary> private void FillForm() { var checkoutViews = DnnPathHelper.GetViewNames("Checkout"); var payPalCheckoutViews = DnnPathHelper.GetViewNames("PayPalExpressCheckout"); var notSetText = LocalizeString("NoneSelectedText"); ViewComboBox.Items.Add(new RadComboBoxItem(notSetText, string.Empty)); ViewComboBox.AppendDataBoundItems = true; ViewComboBox.DataSource = checkoutViews; ViewComboBox.DataBind(); ReceiptViewComboBox.Items.Add(new RadComboBoxItem(notSetText, string.Empty)); ReceiptViewComboBox.AppendDataBoundItems = true; ReceiptViewComboBox.DataSource = checkoutViews; ReceiptViewComboBox.DataBind(); PaymentErrorViewComboBox.Items.Add(new RadComboBoxItem(notSetText, string.Empty)); PaymentErrorViewComboBox.AppendDataBoundItems = true; PaymentErrorViewComboBox.DataSource = checkoutViews; PaymentErrorViewComboBox.DataBind(); PayPalViewComboBox.Items.Add(new RadComboBoxItem(notSetText, string.Empty)); PayPalViewComboBox.AppendDataBoundItems = true; PayPalViewComboBox.DataSource = payPalCheckoutViews; PayPalViewComboBox.DataBind(); }
/// <summary> /// Fill dropdown lists /// </summary> private void FillForm() { ViewComboBox.Items.Add(new ListItem(LocalizeString("NoneSelectedText"), string.Empty)); ViewComboBox.AppendDataBoundItems = true; ViewComboBox.DataSource = DnnPathHelper.GetViewNames("FeaturedProducts", "ContentBlocks"); ViewComboBox.DataBind(); }
/// <summary> /// Fill dropdown lists /// </summary> private void FillForm() { ViewComboBox.Items.Add(new RadComboBoxItem(LocalizeString("NoneSelectedText"), string.Empty)); ViewComboBox.AppendDataBoundItems = true; ViewComboBox.DataSource = DnnPathHelper.GetViewNames("Cart"); ViewComboBox.DataBind(); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (!Page.IsPostBack) { LocalizeView(); var sortedProducts = GetSelectedProducts(); LoadItems(sortedProducts); int gridColumns; if (!int.TryParse(Convert.ToString(ModuleSettings["GridColumns"]), out gridColumns)) { gridColumns = 3; } GridColumnsField.Text = gridColumns.ToString(); // load the view names into the combobox ViewComboBox.Items.Add(new System.Web.UI.WebControls.ListItem(LocalizeString("NoneSelectedText"), string.Empty)); ViewComboBox.AppendDataBoundItems = true; ViewComboBox.DataSource = DnnPathHelper.GetViewNames("ProductGrid"); ViewComboBox.DataBind(); } }
/// <summary> /// Fill dropdown lists /// </summary> private void FillForm() { ViewComboBox.Items.Add(new RadComboBoxItem(LocalizeString("NoneSelectedText"), string.Empty)); ViewComboBox.AppendDataBoundItems = true; ViewComboBox.DataSource = DnnPathHelper.GetViewNames("Category"); ViewComboBox.DataBind(); var allCats = HccApp.CatalogServices.Categories.FindAllSnapshotsPaged(1, 5000); var categories = CategoriesHelper.ListFullTreeWithIndentsForComboBox(allCats, false); CategoryComboBox.Items.Add(new RadComboBoxItem(LocalizeString("NoneSelectedText"), string.Empty)); CategoryComboBox.AppendDataBoundItems = true; CategoryComboBox.DataSource = categories; CategoryComboBox.DataTextField = "Text"; CategoryComboBox.DataValueField = "Value"; CategoryComboBox.DataBind(); var columns = HccApp.ContentServices.Columns.FindAll(); FillComboBox(ddlPreContentColumnId, columns, "DisplayName", "Bvin", Convert.ToString(ModuleSettings["DefaultPreContentColumnId"])); FillComboBox(ddlPostContentColumnId, columns, "DisplayName", "Bvin", Convert.ToString(ModuleSettings["DefaultPostContentColumnId"])); FillSortingCheckboxList(); }
private void LoadData() { ViewComboBox.Items.Add(new ListItem(LocalizeString("NoneSelectedText"), string.Empty)); ViewComboBox.AppendDataBoundItems = true; ViewComboBox.DataSource = DnnPathHelper.GetViewNames("CategoryMenu"); ViewComboBox.DataBind(); var viewText = Convert.ToString(ModuleSettings["View"]); ViewContentLabel.Text = LocalizeString("NoneSelectedText"); if (!string.IsNullOrEmpty(viewText)) { ViewComboBox.SelectedValue = viewText; ViewContentLabel.Text = viewText; } TitleField.Text = Convert.ToString(ModuleSettings["Title"]); ModeField.Items.Clear(); ModeField.Items.Add(new ListItem(LocalizeString("ModeField_ShowRootOnly"), "0")); ModeField.Items.Add(new ListItem(LocalizeString("ModeField_ShowAll"), "1")); ModeField.Items.Add(new ListItem(LocalizeString("ModeField_ShowChildrenPeerParents"), "2")); ModeField.Items.Add(new ListItem(LocalizeString("ModeField_ShowAllParent"), "3")); ModeField.Items.Add(new ListItem(LocalizeString("ModeField_ShowSelected"), "4")); ModeField.Items.Add(new ListItem(LocalizeString("ModeField_ShowChildrenSelected"), "5")); var mode = ModuleSettings["CategoryMenuMode"] != null ? ModuleSettings["CategoryMenuMode"].ToString() : "0"; if (ModeField.Items.FindByValue(mode) != null) { ModeField.Items.FindByValue(mode).Selected = true; } ProductCountCheckBox.Checked = Convert.ToBoolean(ModuleSettings["ShowProductCount"]); SubCategoryCountCheckBox.Checked = Convert.ToBoolean(ModuleSettings["ShowCategoryCount"]); HomeLinkField.Checked = Convert.ToBoolean(ModuleSettings["HomeLink"]); MaximumDepth.Text = Convert.ToString(ModuleSettings["MaximumDepth"]); var listCategories = HccApp.CatalogServices.Categories.FindAll(); var selectedCategories = Convert.ToString(ModuleSettings["SelectedCategories"]) .Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries); foreach (var cat in listCategories) { ddlParentCategories.Items.Add(new ListItem(cat.Name, cat.Bvin)); if (selectedCategories.Contains(cat.Bvin)) { lstSelectedCategories.Items.Add(new ListItem(cat.Name, cat.Bvin)); } else { lstCategories.Items.Add(new ListItem(cat.Name, cat.Bvin)); } } ddlParentCategories.SelectedValue = Convert.ToString(ModuleSettings["ChildrenOfCategory"]); AdjustShowingFields(); }
/// <summary> /// Fills the form. /// </summary> private void FillForm() { ViewComboBox.Items.Add(new ListItem(LocalizeString("NoneSelectedText"), string.Empty)); ViewComboBox.AppendDataBoundItems = true; ViewComboBox.DataSource = DnnPathHelper.GetViewNames("ContentColumn"); ViewComboBox.DataBind(); ContentBlocksComboBox.Items.Add(new ListItem(LocalizeString("NoneSelectedText"), string.Empty)); ContentBlocksComboBox.AppendDataBoundItems = true; ContentBlocksComboBox.DataSource = HccApp.ContentServices.Columns.FindAll(); ContentBlocksComboBox.DataTextField = "DisplayName"; ContentBlocksComboBox.DataValueField = "Bvin"; ContentBlocksComboBox.DataBind(); }
public ComboBox getComboBox(ViewComboBox comboBox) { switch (comboBox) { case ViewComboBox.ViewableAgent: return this.viewableAgent; case ViewComboBox.AgentCooperation: return this.agentCooperation; case ViewComboBox.AlgorithmType: return this.algorithmType; case ViewComboBox.FovMethod: return this.fovMethod; case ViewComboBox.HeuristicMethod: return this.heuristicMethod; case ViewComboBox.PathPersistence: return this.pathPersistence; case ViewComboBox.Visualizations: return this.visualizations; default: throw new Exception("invalid combo box"); } }