public void SetUpText(OptionItemValue selectedItem) { if (selectedItem != null) { uxOptionCheck.Checked = true; uxOptionsText.Text = selectedItem.Details; } }
public void SetupRadio(IList <OptionItemDisplay> table, OptionItemValue selectedItem) { uxOptionRadioButtonList.DataSource = table; uxOptionRadioButtonList.DataBind(); if (selectedItem != null) { uxOptionRadioButtonList.SelectedValue = selectedItem.OptionItemID; } }
public void CreateOption(ArrayList selectedList, bool useStock) { OptionItem optionItem = DataAccessContext.OptionItemRepository.GetOne( StoreContext.Culture, uxOptionDrop.SelectedValue); OptionItemValue itemSelected = new OptionItemValue( optionItem, OptionGroup.OptionGroupType.Radio, String.Empty, useStock); selectedList.Add(itemSelected); }
public void SetUpDropDown(IList <OptionItemDisplay> table, OptionItemValue selectedItem) { uxOptionDrop.DataSource = table; uxOptionDrop.DataBind(); uxOptionDrop.Items.Insert(0, new ListItem("--- Please select ---", String.Empty)); if (selectedItem != null) { uxOptionDrop.SelectedValue = selectedItem.OptionItemID; } }
public void CreateOption(ArrayList selectedList, string optionItemID, bool useStock) { _optionUploadWebControlService = new OptionUploadWebControlService(false, UploadedFile, Server.MapPath("~/")); OptionItemValue optionItemValue = OptionUploadWebControlService.CreateOptionItemValue( optionItemID, useStock, TempUploadedFile); if ((optionItemValue != null) && (UploadedFile != null)) { selectedList.Add(optionItemValue); } }
public OptionItemValue[] GetSelectedItem() { ArrayList selectedList = new ArrayList(); bool useStock; if (DataAccessContext.OptionGroupRepository.IsUseStock(ProductID, OptionGroupID)) { useStock = true; } else { useStock = false; } if (RadioTR.Visible) { uxOptionRadioItem.CreateOption(selectedList, useStock); } if (DropdownTR.Visible) { uxOptionDropDownItem.CreateOption(selectedList, useStock); } if (TextTR.Visible) { uxOptionTextItem.CreateOption(selectedList, uxOptionIDHidden.Value, useStock); } if (InputListTR.Visible) { uxOptionInputListItem.CreateOption(selectedList, useStock); } if (UploadTR.Visible) { uxOptionUploadItem.CreateOption(selectedList, uxUploadHiddenField.Value, useStock); } if (UploadRQTR.Visible) { uxOptionUploadRequireItem.CreateOption(selectedList, uxUploadRQHiddenField.Value, useStock); } OptionItemValue[] result = new OptionItemValue[selectedList.Count]; selectedList.CopyTo(result); return(result); }
public void CreateOption(ArrayList selectedList, string optionID, bool useStock) { if (uxOptionCheck.Checked) { if (uxOptionsText.Text != "") { OptionItem optionItem = DataAccessContext.OptionItemRepository.GetOne( StoreContext.Culture, optionID); OptionItemValue itemSelected = new OptionItemValue( optionItem, OptionGroup.OptionGroupType.Text, Server.HtmlEncode(uxOptionsText.Text), useStock); selectedList.Add(itemSelected); } } }
public OptionItemValue[] GetSelectedItem() { ArrayList selectedList = new ArrayList(); bool useStock; if (DataAccessContext.OptionGroupRepository.IsUseStock(ProductID, OptionGroupID)) { useStock = true; } else { useStock = false; } OptionGroup optionGruop = DataAccessContext.OptionGroupRepository.GetOne(Culture, OptionGroupID); switch (optionGruop.Type) { case OptionGroup.OptionGroupType.Radio: uxOptionRadioItem.CreateOption(selectedList, useStock); break; case OptionGroup.OptionGroupType.DropDown: uxOptionDropDownItem.CreateOption(selectedList, useStock); break; case OptionGroup.OptionGroupType.Text: uxOptionTextItem.CreateOption(selectedList, uxOptionIDHidden.Value, useStock); break; case OptionGroup.OptionGroupType.InputList: uxOptionInputListItem.CreateOption(selectedList, useStock); break; case OptionGroup.OptionGroupType.Upload: uxOptionUploadItem.CreateOption(selectedList, uxUploadHiddenField.Value, useStock); break; case OptionGroup.OptionGroupType.UploadRequired: uxOptionUploadRequireItem.CreateOption(selectedList, uxUploadRQHiddenField.Value, useStock); break; } //if (RadioTR.Visible) //{ // uxOptionRadioItem.CreateOption( selectedList, useStock ); //} //if (DropdownTR.Visible) //{ // uxOptionDropDownItem.CreateOption( selectedList, useStock ); //} //if (TextTR.Visible) //{ // uxOptionTextItem.CreateOption( selectedList, uxOptionIDHidden.Value, useStock ); //} //if (InputListTR.Visible) //{ // uxOptionInputListItem.CreateOption( selectedList, useStock ); //} //if (UploadTR.Visible) //{ // uxOptionUploadItem.CreateOption( selectedList, uxUploadHiddenField.Value, useStock ); //} //if (UploadRQTR.Visible) //{ // uxOptionUploadRequireItem.CreateOption( selectedList, uxUploadRQHiddenField.Value, useStock ); //} OptionItemValue[] result = new OptionItemValue[selectedList.Count]; selectedList.CopyTo(result); return(result); }