protected void RadComboBoxFirma_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e) { if (e.Text.Length > 3) { string sqlSelectCommand = ""; sqlSelectCommand = "SELECT [UserID],[UserName] from [telerik_Users] ORDER BY [UserName]"; SqlDataAdapter adapter = new SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings["KalData"].ConnectionString); adapter.SelectCommand.Parameters.AddWithValue("@text", e.Text); DataTable dataTable = new DataTable(); adapter.Fill(dataTable); RadComboBoxFirma.Items.Clear(); foreach (DataRow dataRow in dataTable.Rows) { string UserName = ""; RadComboBoxItem item = new RadComboBoxItem(); item.Text = (string)dataRow["UserName"].ToString(); item.Value = dataRow["UserId"].ToString(); UserName = (string)dataRow["UserName"]; if (dataRow["UserName"] != System.DBNull.Value) { UserName = (string)dataRow["UserName"]; } //item.Attributes.Add("FIRMAADI", FirmaAdi); //item.Attributes.Add("IL_ILCE", IlIlce); RadComboBoxFirma.Items.Add(item); item.DataBind(); } Label lbl = (Label)RadComboBoxFirma.Footer.FindControl("lblBulunanKayitSayisi"); lbl.Text = "Bulunan kayıt sayısı:" + " " + dataTable.Rows.Count.ToString(); } }
public void InstantiateIn(Control container) { _container = (RadComboBoxItem)container; _termsSelector = (TermsSelector)container.Parent; _tree = new DnnTreeView(); _tree.ID = string.Format("{0}_TreeView", _termsSelector.ID); _tree.DataTextField = "Name"; _tree.DataValueField = "TermId"; _tree.DataFieldID = "TermId"; _tree.DataFieldParentID = "ParentTermId"; _tree.CheckBoxes = true; _tree.ExpandAllNodes(); //bind client-side events _tree.OnClientNodeChecked = "dnn.controls.termsSelector.OnClientNodeChecked"; _tree.DataSource = Terms; _tree.NodeDataBound += TreeNodeDataBound; _tree.DataBound += TreeDataBound; _container.Controls.Add(_tree); _termsSelector.DataSourceChanged += TermsSelector_DataSourceChanged; }
private void CargarTerritorio() { try { if (cmbSegmento.SelectedValue == "") { cmbSegmento.SelectedIndex = 0; } if (cmbSegmento.SelectedIndex != -1) { CapaNegocios.CN__Comun CN_Comun = new CapaNegocios.CN__Comun(); CN_Comun.LlenaCombo(session.Id_Emp, session.Id_Cd, Convert.ToInt32(cmbSegmento.SelectedValue), session.Id_Rik == -1 ? (int?)null : session.Id_Rik, session.Emp_Cnx, "spCatTerritorioSegmento_Combo", ref cmbTerritorios); cmbTerritorios.Items.Remove(0); RadComboBoxItem rcb = new RadComboBoxItem(); rcb.Value = "-1"; rcb.Text = "-- Todos --"; cmbTerritorios.Items.Insert(0, rcb); cmbTerritorios.SelectedIndex = 0; } else { cmbTerritorios.DataSource = null; } } catch (Exception ex) { throw ex; } }
protected void atiRadComboBoxSearchMessageSent_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { // TODO: we need to search "reply" text and add those messages to the results. RadComboBox atiRadComboBoxSearchMessageInbox = (RadComboBox)sender; atiRadComboBoxSearchMessageInbox.Items.Clear(); const int TAKE = 5; aqufitEntities entities = new aqufitEntities(); int itemOffset = e.NumberOfItems; IQueryable <Message> messagesQuery = entities.MessageRecipiants.Where(m => m.UserSettingsKey == this.UserSettings.Id).Select(m => m.Message).OrderBy(m => m.DateTime); int length = messagesQuery.Count(); messagesQuery = string.IsNullOrEmpty(e.Text) ? messagesQuery.Where(m => m.UserSetting.Id == this.UserSettings.Id).Skip(itemOffset).Take(TAKE) : messagesQuery.Where(m => m.UserSetting.Id == this.UserSettings.Id && m.Subject.ToLower().Contains(e.Text) || m.Text.ToLower().Contains(e.Text)).Skip(itemOffset).Take(TAKE); Message[] messages = messagesQuery.ToArray(); foreach (Message m in messages) { RadComboBoxItem item = new RadComboBoxItem(m.Subject); item.Value = "" + m.Id; // item.ImageUrl = ResolveUrl("~/DesktopModules/ATI_Base/services/images/profile.aspx") + "?u=" + g.UserKey + "&p=" + g.PortalKey; atiRadComboBoxSearchMessageInbox.Items.Add(item); } int endOffset = Math.Min(itemOffset + TAKE + 1, length); e.EndOfItems = endOffset == length; e.Message = (length <= 0) ? "No matches" : String.Format("Items <b>1</b>-<b>{0}</b> of {1}", endOffset, length); }
public static void FillCurrencyDDL(RadComboBox ddl, string defaultCode, bool displayLong) { // fill dropdown list with standard currency codes if (displayLong) { ddl.DataSource = SessionManager.CurrencyList.OrderBy(l => l.CURRENCY_NAME); ddl.DataTextField = "CURRENCY_NAME"; ddl.DataValueField = "CURRENCY_CODE"; ddl.DataBind(); } else { foreach (CURRENCY cur in SessionManager.CurrencyList.OrderBy(l => l.CURRENCY_CODE)) { RadComboBoxItem item = new RadComboBoxItem(cur.CURRENCY_CODE, cur.CURRENCY_CODE); item.ToolTip = cur.CURRENCY_NAME; ddl.Items.Add(item); } } if (!string.IsNullOrEmpty(defaultCode)) { ddl.SelectedValue = defaultCode; } }
private void Semana_cargar(RadComboBox cboBox) { try { RadComboBoxItem item; int id; string strId; for (int x = 0; x < 4; x++) { id = x + 1; strId = id.ToString(); item = new RadComboBoxItem(); item.Value = strId; item.Text = strId; cboBox.Items.Add(item); } if (cboBox.Items.Count > 0) { cboBox.SelectedIndex = 0; } ViewState["id_semana"] = 0; } catch (Exception ex) { throw ex; } }
public static RadComboBox SetLocationList(RadComboBox ddl, List <BusinessLocation> locationList, decimal plantID, bool enableBUSelect) { ddl.Items.Clear(); RadComboBoxItem item = null; ADDRESS address = null; decimal busOrgID = 0; int numOrgs = locationList.Select(l => l.Plant.BUS_ORG_ID).Distinct().Count(); foreach (BusinessLocation loc in locationList.OrderBy(l => l.Plant.BUS_ORG_ID).ThenBy(l => l.Plant.PLANT_NAME).ToList()) { if (numOrgs > 1 && loc.Plant.BUS_ORG_ID != busOrgID) { busOrgID = (decimal)loc.Plant.BUS_ORG_ID; item = new RadComboBoxItem(loc.BusinessOrg.ORG_NAME, ("BU" + loc.BusinessOrg.BUS_ORG_ID.ToString())); if (enableBUSelect) { item.BackColor = System.Drawing.Color.Linen; item.ToolTip = loc.BusinessOrg.DUNS_CODE; } else { item.IsSeparator = true; if (ddl.CheckBoxes) { item.Checked = false; } } item.ImageUrl = "~/images/defaulticon/16x16/sitemap.png"; ddl.Items.Add(item); } item = new RadComboBoxItem(loc.Plant.PLANT_NAME, loc.Plant.PLANT_ID.ToString()); item.IsSeparator = false; if ((address = loc.Plant.ADDRESS.FirstOrDefault()) != null) { item.ToolTip = address.STREET1 + " " + address.CITY; } if (plantID < 0) { item.Checked = true; } ddl.Items.Add(item); } //ddl.Items.Insert(0, new RadComboBoxItem("", "")); if (plantID > 0 && ddl.Items.FindItemByValue(plantID.ToString()) != null) { if (ddl.CheckBoxes) { ddl.FindItemByValue(plantID.ToString()).Checked = true; } else { ddl.SelectedValue = plantID.ToString(); } } return(ddl); }
public static RadComboBox SetPlantList(RadComboBox ddl, List <PLANT> plantList, decimal plantID) { ddl.Items.Clear(); RadComboBoxItem item = null; ADDRESS address = null; foreach (PLANT plant in plantList.OrderBy(l => l.BUS_ORG_ID).ThenBy(l => l.PLANT_NAME).ToList()) { item = new RadComboBoxItem(plant.PLANT_NAME, plant.PLANT_ID.ToString()); if ((address = plant.ADDRESS.FirstOrDefault()) != null) { item.ToolTip = address.STREET1 + " " + address.CITY; } if (plantID < 0) { item.Checked = true; } ddl.Items.Add(item); } //ddl.Items.Insert(0, new RadComboBoxItem("", "")); if (plantID > 0 && ddl.Items.FindItemByValue(plantID.ToString()) != null) { ddl.SelectedValue = plantID.ToString(); } return(ddl); }
protected void LoadGradeButtonFilter() { var gradesByCurriculumCourses = _curriculumCourseList.GetGradeList(); gradeDropdown.Items.Clear(); gradeDropdown.Attributes["teacherID"] = _teacherID.ToString(); foreach (var g in gradesByCurriculumCourses) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = g.DisplayText; item.Value = g.DisplayText; item.Attributes["gradeOrdinal"] = g.GetFriendlyName(); if (g.DisplayText == grade) { item.Selected = true; } gradeDropdown.Items.Add(item); } initGrade.Value = gradeDropdown.SelectedIndex.ToString(); if (gradeDropdown.SelectedValue.Length == 0 && gradeDropdown.Items.Count == 1) { gradeDropdown.Items[0].Selected = true; } }
private void CargarAplicacion() { try { if (ddlSolucion.SelectedValue == "") { ddlSolucion.SelectedIndex = 0; } CapaNegocios.CN__Comun CN_Comun = new CapaNegocios.CN__Comun(); CN_Comun.LlenaCombo(1, session.Id_Emp, Convert.ToInt32(ddlSolucion.SelectedValue), session.Emp_Cnx, "spCatAplicacionSolucion_Combo", ref ddlAplicacion); //cmbUEN.Items.Insert(0, new RadComboBoxItem("-- Seleccionar --", "-1")); ddlAplicacion.Items.Remove(0); RadComboBoxItem rcb = new RadComboBoxItem(); rcb.Value = "-1"; rcb.Text = "-- Todos --"; ddlAplicacion.Items.Insert(0, rcb); ddlAplicacion.SelectedIndex = 0; } catch (Exception ex) { throw ex; } }
private void Estado_Cargar() { try { RadComboBoxItem item = new RadComboBoxItem(); item.Value = "0"; item.Text = "Todos"; cboEstado.Items.Add(item); item = new RadComboBoxItem(); item.Value = "1"; item.Text = "Aprobados"; cboEstado.Items.Add(item); item = new RadComboBoxItem(); item.Value = "2"; item.Text = "Desaprobados"; cboEstado.Items.Add(item); cboEstado.SelectedValue = "0"; } catch (Exception ex) { throw ex; } }
protected void atiRadComboBoxSearchGroups_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { RadComboBox atiRadComboBoxSearchGroups = (RadComboBox)sender; atiRadComboBoxSearchGroups.Items.Clear(); const int TAKE = 15; aqufitEntities entities = new aqufitEntities(); int itemOffset = e.NumberOfItems; IQueryable <Group> friends = entities.UserSettings.OfType <Group>().OrderBy(w => w.UserName); if (!string.IsNullOrEmpty(e.Text)) { friends = friends.Where(w => w.UserName.ToLower().Contains(e.Text) || w.UserFirstName.ToLower().Contains(e.Text)); } int length = friends.Count(); friends = friends.Skip(itemOffset).Take(TAKE); Group[] groups = friends.ToArray(); foreach (Group g in groups) { RadComboBoxItem item = new RadComboBoxItem(g.UserFirstName); item.Value = " { 'Address': '', 'GroupKey':" + g.Id + ", 'Lat':" + g.DefaultMapLat + ", 'Lng':" + g.DefaultMapLng + " , 'Name':'" + g.UserFirstName + "', 'UserName':'******'", "") + "', 'UserKey':" + g.UserKey + ", 'ImageId':0, 'Description':'' }"; // item.ImageUrl = ResolveUrl("~/DesktopModules/ATI_Base/services/images/profile.aspx") + "?u=" + g.UserKey + "&p=" + g.PortalKey; atiRadComboBoxSearchGroups.Items.Add(item); } int endOffset = Math.Min(itemOffset + TAKE + 1, length); e.EndOfItems = endOffset == length; e.Message = (length <= 0) ? "No matches" : String.Format("Items <b>1</b>-<b>{0}</b> of {1}", endOffset, length); }
protected void RCB_Company_OnItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { var combo = (RadComboBox)sender; combo.Items.Clear(); if (!string.IsNullOrEmpty(e.Text)) { string key = e.Text; IList <CompanyCussentInfo> companyList = CompanyCussentList.Where(p => p.CompanyName.Contains(key.Trim())).ToList(); if (e.NumberOfItems >= companyList.Count) { e.EndOfItems = true; } else { foreach (CompanyCussentInfo i in companyList) { var item = new RadComboBoxItem { Text = i.CompanyName, Value = i.CompanyId.ToString() }; combo.Items.Add(item); } } } }
private void ConfigureDisplay() { CultureInfo culture = new CultureInfo(Orchestrator.Globals.Configuration.NativeCulture); Facade.IExchangeRates facER = new Facade.ExchangeRates(); DataSet currencies = facER.GetAllCurrencies(); rcbCurrency.Items.Clear(); RadComboBoxItem rcbi = new RadComboBoxItem("Please Select", "-1"); rcbCurrency.Items.Add(rcbi); if (currencies.Tables.Count > 0 && currencies.Tables[0].Rows.Count > 0) { foreach (DataRow dr in currencies.Tables[0].Rows) { if (dr["CurrencyID"].ToString() != Facade.Culture.GetCurrencySymbol(culture.LCID)) { RadComboBoxItem trcbi = new RadComboBoxItem(dr["CurrencyName"].ToString(), dr["CurrencyID"].ToString()); rcbCurrency.Items.Add(trcbi); } } } //If only 1 currency available, select it by default. if (rcbCurrency.Items.Count == 2) { rcbCurrency.SelectedIndex = 1; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LoadProvince(); if (Request.QueryString["ID"] == null) { } else { string BranchCorpId = Request.QueryString["ID"].ToString(); DataTable GroupInfo = GetBranchCorpById(new Guid(BranchCorpId)); int counter = 0; foreach (DataRow row in GroupInfo.Rows) { if (counter == 0) { string Id = row["BranchCorpOfficeId"].ToString(); string BranchCorpOfficeName = row["BranchCorpOfficeName"].ToString(); string BranchCorpOfficeCode = row["BranchCorpOfficeCode"].ToString(); string ProvinceName = row["ProvinceName"].ToString(); RadComboBoxItem item = rcbGroup.FindItemByText(ProvinceName); item.Selected = true; txtRegionName.Text = BranchCorpOfficeName; //BCOname txtbcoCode.Text = BranchCorpOfficeCode; lblGroupID.Text = Id; counter++; } } } } }
protected void RadComboBoxFirma_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e) { //string BolgeKodu = Session["BolgeKodu"].ToString(); //string bak = e.Text; if (e.Text.Length > 2) { string BolgeKodu = intBolgeKodu.ToString(); string sqlSelectCommand = ""; sqlSelectCommand = "SELECT [FIRMAID],[MUSTNO], [FIRMAADI], [IL_ILCE] from [firma] WHERE [FIRMAADI] LIKE '%'+ @text + '%' and SILINDI=0 and BOLGEKODU=" + BolgeKodu + " ORDER BY [FIRMAADI]"; SqlDataAdapter adapter = new SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings["KalData"].ConnectionString); adapter.SelectCommand.Parameters.AddWithValue("@text", e.Text); DataTable dataTable = new DataTable(); adapter.Fill(dataTable); RadComboBoxFirma.Items.Clear(); foreach (DataRow dataRow in dataTable.Rows) { string IlIlce = ""; RadComboBoxItem item = new RadComboBoxItem(); item.Text = (string)dataRow["MUSTNO"].ToString(); item.Value = dataRow["FIRMAID"].ToString(); string FirmaAdi = (string)dataRow["FIRMAADI"]; if (dataRow["IL_ILCE"] != System.DBNull.Value) { IlIlce = (string)dataRow["IL_ILCE"]; } item.Attributes.Add("FIRMAADI", FirmaAdi); item.Attributes.Add("IL_ILCE", IlIlce); RadComboBoxFirma.Items.Add(item); item.DataBind(); } Label lbl = (Label)RadComboBoxFirma.Footer.FindControl("lblBulunanKayitSayisi"); lbl.Text = "Bulunan kayıt sayısı:" + " " + dataTable.Rows.Count.ToString(); } }
protected void DisplayAddress(PostCodeAnywhere.AddressResults address) { txtAddressLine1.Text = address.Results[0].Line1; txtAddressLine2.Text = address.Results[0].Line2; txtAddressLine3.Text = address.Results[0].Line3; txtPostTown.Text = address.Results[0].PostTown; txtPostCode.Text = address.Results[0].Postcode; txtCounty.Text = address.Results[0].County; txtLatitude.Text = address.Results[0].GeographicData.WGS84Latitude.ToString(); txtLongitude.Text = address.Results[0].GeographicData.WGS84Longitude.ToString(); txtLocationName.Text = m_organisationName + " - " + txtPostTown.Text; this.hdnSetPointRadius.Value = "true"; if (cboClosestTown.SelectedValue == "") { Facade.IPostTown facPostTown = new Facade.Point(); Entities.PostTown postTown = facPostTown.GetPostTownForTownName(txtPostTown.Text); if (postTown != null) { RadComboBoxItem item = new RadComboBoxItem(txtPostTown.Text, postTown.TownId.ToString()); cboClosestTown.Items.Add(item); item.Selected = true; } } }
protected void atiWorkout_WodItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { RadComboBox atiRadComboBoxCrossfitWorkouts = (RadComboBox)sender; const int TAKE = 10; aqufitEntities entities = new aqufitEntities(); int itemOffset = e.NumberOfItems; if (itemOffset == 0) { RadComboBoxItem item = new RadComboBoxItem("Create a New Workout"); item.Value = "{'Id':0, 'Type':'0'}"; atiRadComboBoxCrossfitWorkouts.Items.Add(item); } IQueryable<WOD> wods = entities.User2WODFav.Where(w => w.UserSetting.Id == GroupSettings.Id || w.UserSetting.Id == UserSettings.Id).Select(w => w.WOD); wods = wods.Union<WOD>(entities.WODs.Where(w => w.Standard > 0)); wods.Select(w => w.WODType).ToArray(); // hydrate WODTypes wods = wods.OrderByDescending(w => w.CreationDate); wods = string.IsNullOrEmpty(e.Text) ? wods.OrderByDescending(w => w.CreationDate) : wods.Where(w => w.Name.ToLower().StartsWith(e.Text)).OrderBy(w => w.Name); int length = wods.Count(); wods = wods.Skip(itemOffset).Take(TAKE); WOD[] wodList = wods.ToArray(); int endOffset = Math.Min(itemOffset + TAKE, length); e.EndOfItems = endOffset == length; for (int i = 0; i < wodList.Length; i++) { atiRadComboBoxCrossfitWorkouts.Items.Add(new RadComboBoxItem(wodList[i].Name, "{ 'Id':" + wodList[i].Id + ", 'Type':" + wodList[i].WODType.Id + "}")); } e.Message = (length <= 0) ? "No matches" : String.Format("Items <b>1</b>-<b>{0}</b> of {1}", endOffset, length); }
protected void LoadGLAccoutCode() { try { DataSet dsResident = new DataSet(); dsResident = sqlobj.ExecuteSP("SP_GeneralTransactions", new SqlParameter() { ParameterName = "@IMode", SqlDbType = SqlDbType.Int, Value = 3 }); drpAccCode.DataSource = dsResident.Tables[0]; drpAccCode.DataValueField = "AccountsMRSN"; drpAccCode.DataTextField = "AccountName"; drpAccCode.DataBind(); RadComboBoxItem item2 = new RadComboBoxItem(); item2.Text = "Please Select"; item2.Value = "0"; item2.Selected = true; drpAccCode.Items.Add(item2); dsResident.Dispose(); } catch (Exception ex) { WebMsgBox.Show(ex.Message.ToString()); } }
protected void load_services_14211(string Project) { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + Project; DataTable _soservice = _objbll.Load_Cas_service_drso(_objdb); foreach (DataRow dataRow in _soservice.Rows) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = (string)dataRow["PRJ_SER_NAME"]; item.Value = dataRow["PRJ_SER_ID"].ToString(); rcbPackage.Items.Add(item); } rcbPackage.DataBind(); foreach (DataRow dataRow in _soservice.Rows) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = (string)dataRow["PRJ_SER_NAME"]; item.Value = dataRow["PRJ_SER_ID"].ToString(); rcbService_Edit.Items.Add(item); } rcbService_Edit.DataBind(); }
public void Create(string objname, string id,string name, string templatename) { _objname = objname; _id = id; _name = name; DataReturn dr = AxiomIRISRibbon.Utility.HandleData(_d.GetTemplates(true)); if (!dr.success) return; DataTable dt = dr.dt; cbTemplates.Items.Clear(); RadComboBoxItem i; RadComboBoxItem selected = null; foreach (DataRow r in dt.Rows) { i = new RadComboBoxItem(); i.Tag = r["Id"].ToString() + "|" + r["PlaybookLink__c"].ToString(); i.Content = r["Name"].ToString(); this.cbTemplates.Items.Add(i); if (r["Name"].ToString().ToLower() == templatename.Trim().ToLower()) selected = i; } // if we have a match then select it if (selected != null) { this.cbTemplates.SelectedItem = selected; } }
protected void LoadBuildingNames() { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _clsuser _objcls = new _clsuser(); _objcls.project_code = (string)lblprj.Text;; _objdb.DBName = "DB_" + lblprj.Text; DataTable dtBuildings = _objbll.Load_Buildings(_objcls, _objdb); if (tblAdd.Visible) { foreach (DataRow dr in dtBuildings.Rows) { RadComboBoxItem cbBuildingItem = new RadComboBoxItem(); cbBuildingItem.Text = dr["Build_Name"].ToString(); cbBuildingItem.Value = dr["Build_id"].ToString(); rcbBuilding.Items.Add(cbBuildingItem); } rcbBuilding.DataBind(); } foreach (DataRow dr in dtBuildings.Rows) { RadComboBoxItem cbBuildingItem = new RadComboBoxItem(); cbBuildingItem.Text = dr["Build_Name"].ToString(); cbBuildingItem.Value = dr["Build_id"].ToString(); rcbBuilding_Edit.Items.Add(cbBuildingItem); } rcbBuilding_Edit.DataBind(); }
private void CargarSegmentos() { try { if (ddlUENS.SelectedValue == "") { ddlUENS.SelectedIndex = 0; } CapaNegocios.CN__Comun CN_Comun = new CapaNegocios.CN__Comun(); CN_Comun.LlenaComboUEN(1, session.Id_Emp, Convert.ToInt32(ddlUENS.SelectedValue), Convert.ToInt32(session.Id_U), session.Emp_Cnx, "spCatSegmentosUen_ComboCRM", ref ddlSegmento, session.Id_Cd_Ver); ddlSegmento.Items.Remove(0); RadComboBoxItem rcb = new RadComboBoxItem(); rcb.Value = "-1"; rcb.Text = "-- Todos --"; ddlSegmento.Items.Insert(0, rcb); ddlSegmento.SelectedIndex = 0; CargarTerritorio(); CargarAreas(); } catch (Exception ex) { throw ex; } }
protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); Entities.Users.UserInfo userInfo = Entities.Users.UserController.GetCurrentUserInfo(); if (! Page.IsPostBack && userInfo != null && userInfo.UserID != Null.NullInteger) { //check view permissions - Yes? var portalSettings = PortalController.GetCurrentPortalSettings(); var pageCulture = Thread.CurrentThread.CurrentCulture.Name; if (string.IsNullOrEmpty(pageCulture)) { pageCulture = PortalController.GetActivePortalLanguage(portalSettings.PortalId); } List<TabInfo> tabs = TabController.GetTabsBySortOrder(portalSettings.PortalId, pageCulture, true); var sortedTabList = TabController.GetPortalTabs(tabs, Null.NullInteger, false, Null.NullString, true, false, true, true, true); Items.Clear(); foreach (var _tab in sortedTabList) { RadComboBoxItem tabItem = new RadComboBoxItem(_tab.IndentedTabName, _tab.FullUrl); tabItem.Enabled = ! _tab.DisableLink; Items.Add(tabItem); } Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("", "")); } Width = Unit.Pixel(245); }
/// <summary> /// Load chi tiet mot danh muc de cap nhat /// </summary> /// <param name="id"></param> private void LoadPortalPage(long id) { PortalPage sc = db.PortalPages.SingleOrDefault <PortalPage>(s => s.Id == id); if (sc != null) { txtPageName.Text = sc.PageName; if (sc.ParentPageId.HasValue) { RadComboBoxItem item = rcbParentPage.Items.FindItemByValue(sc.ParentPageId.ToString()); if (item != null) { item.Selected = true; } } rntOrder.Value = sc.Order; if (!String.IsNullOrEmpty(sc.Icon)) { divIcon.Visible = true; imgIcon.ImageUrl = sc.Icon; } else { divIcon.Visible = false; } } }
protected void Page_Init(object sender, EventArgs e) { string uname = Request.QueryString["uname"].ToString(); string getuid = "select [ID] from [User] where [uname] = '"+uname+"'"; DataSet ds = new DataSet(); ds = fbc.ReturnDS(getuid); string uidd = ds.Tables[0].Rows[0]["ID"].ToString(); Session["VID"] = uidd; string getalbums = "SELECT * FROM Albums WHERE UID = " +uidd; DataTable dt = new DataTable(); dt = fbc.ReturnDT(getalbums); albums.DataSource = dt; albums.DataBind(); RadComboBoxItem item = new RadComboBoxItem(); item.Value = "propic"; item.Text = "Profile Photos"; albums.Items.Add(item); RadComboBoxItem item2 = new RadComboBoxItem(); item2.Value = "select"; item2.Text = "Select Album"; albums.Items.Add(item2); int d = albums.Items.Count; albums.Items[d-1].Selected = true; }
private void LoadSchoolDropdown() { schoolDropdown.Items.Clear(); //Build school ListBox foreach (var school in _schools) { var schoolListItem = new RadComboBoxItem { Text = school.Name, Value = school.ID.ToString(CultureInfo.InvariantCulture) }; schoolDropdown.Items.Add(schoolListItem); var itemLabel = (Label)schoolListItem.FindControl("schoolLabel"); if (itemLabel != null) { itemLabel.Text = school.Name; } } var findButton = new RadComboBoxItem(); schoolDropdown.Items.Add(findButton); var findButtonCheckbox = (CheckBox)findButton.FindControl("schoolCheckbox"); if (findButtonCheckbox != null) { findButtonCheckbox.InputAttributes["style"] = "display:none;"; } }
private static void AddIndentedChildrenForComboBox(ref Collection <RadComboBoxItem> result, string parentId, int currentDepth, ref List <CategorySnapshot> allCats, bool showHidden) { var children = Category.FindChildrenInList(allCats, parentId, showHidden); if (children != null) { foreach (var c in children) { var spacer = new StringBuilder(); for (var i = 0; i <= currentDepth - 1; i++) { spacer.Append("..."); } var li = new RadComboBoxItem(); li.Value = c.RewriteUrl; if (showHidden && c.Hidden) { li.Text = spacer + c.Name + " (hidden)"; } else { li.Text = spacer + c.Name; } result.Add(li); AddIndentedChildrenForComboBox(ref result, c.Bvin, currentDepth + 1, ref allCats, showHidden); } } }
protected void RcbShopListItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e) { IDictionary <Guid, string> dics = FilialeManager.GetAllianceFilialeList() .Where(act => act.Rank == (int)FilialeRank.Partial).ToDictionary(k => k.ID, v => v.Name); var combo = (RadComboBox)o; combo.Items.Clear(); var list = !string.IsNullOrEmpty(e.Text) && e.Text.Length >= 1 ? dics.Where(act => act.Value.Contains(e.Text)) : dics; var keyValuePairs = list as KeyValuePair <Guid, string>[] ?? list.ToArray(); if (e.NumberOfItems >= keyValuePairs.Count()) { e.EndOfItems = true; } else { foreach (var item in keyValuePairs) { var rcb = new RadComboBoxItem { Text = item.Value, Value = item.Key + "", }; combo.Items.Add(rcb); } } }
/// <summary>搜索商品 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void RcbGoodsItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { //此处商品搜索有待更新,需要 过滤是否下架商品。 var combo = (RadComboBox)sender; combo.Items.Clear(); if (!string.IsNullOrEmpty(e.Text) && e.Text.Length >= 2) { var list = _goodsCenterSao.GetGoodsSelectList(e.Text); var totalCount = list.Count; if (e.NumberOfItems >= totalCount) { e.EndOfItems = true; } else { foreach (var item in list) { var rcb = new RadComboBoxItem { Text = item.Value, Value = item.Key, }; combo.Items.Add(rcb); } } } }
protected void atiRadComboBoxSearchGroups_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { RadComboBox atiRadComboBoxSearchGroups = (RadComboBox)sender; atiRadComboBoxSearchGroups.Items.Clear(); const int TAKE = 5; aqufitEntities entities = new aqufitEntities(); long[] friendIds = entities.UserFriends.Where(f => (f.SrcUserSettingKey == this.UserSettings.Id || f.DestUserSettingKey == this.UserSettings.Id)).Select(f => f.SrcUserSettingKey == this.UserSettings.Id ? f.DestUserSettingKey : f.SrcUserSettingKey).ToArray(); int itemOffset = e.NumberOfItems; IQueryable<Group> friends = entities.UserSettings.OfType<Group>().Where(Affine.Utils.Linq.LinqUtils.BuildContainsExpression<Group, long>(w => w.Id, friendIds)).OrderBy(w => w.UserName); int length = friends.Count(); friends = string.IsNullOrEmpty(e.Text) ? friends.Skip(itemOffset).Take(TAKE) : friends.Where(w => w.UserName.ToLower().StartsWith(e.Text) || w.UserFirstName.ToLower().StartsWith(e.Text) || w.UserLastName.ToLower().StartsWith(e.Text)).Skip(itemOffset).Take(TAKE); Group[] groups = friends.ToArray(); foreach (Group g in groups) { RadComboBoxItem item = new RadComboBoxItem(g.UserName); item.Value = "" + g.UserName; item.ImageUrl = ResolveUrl("~/DesktopModules/ATI_Base/services/images/profile.aspx") + "?u=" + g.UserKey + "&p=" + g.PortalKey; atiRadComboBoxSearchGroups.Items.Add(item); } int endOffset = Math.Min(itemOffset + TAKE + 1, length); e.EndOfItems = endOffset == length; e.Message = (length <= 0) ? "No matches" : String.Format("Items <b>1</b>-<b>{0}</b> of {1}", endOffset, length); }
protected virtual void LoadItemsInternal() { base.Items.Clear(); if (this.FirstItemEmpty) base.Items.Add(XCombo.CreateEmptyItem()); using (IDataReader dr = this.CreateDataReader()) { StringBuilder sb = new StringBuilder(); while (dr.Read()) { int j = 1; for (; j < dr.FieldCount - 1; ++j) { object value = dr[j]; if (value != DBNull.Value) { sb.Append(value); sb.Append(" - "); } } sb.Append(dr[j]); RadComboBoxItem item = new RadComboBoxItem(sb.ToString(), dr[0].ToString()); base.Items.Add(item); sb.Length = 0; } } }
protected void RadComboBox1_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { string sql = "SELECT [SupplierID], [CompanyName], [ContactName], [City] FROM [Suppliers] WHERE CompanyName LIKE @CompanyName + '%'"; SqlDataAdapter adapter = new SqlDataAdapter(sql, ConfigurationManager.ConnectionStrings["TelerikVSXConnectionString"].ConnectionString); adapter.SelectCommand.Parameters.AddWithValue("@CompanyName", e.Text); DataTable dt = new DataTable(); adapter.Fill(dt); RadComboBox comboBox = (RadComboBox)sender; // Clear the default Item that has been re-created from ViewState at this point. comboBox.Items.Clear(); foreach (DataRow row in dt.Rows) { RadComboBoxItem item = new RadComboBoxItem(); item.Text = row["CompanyName"].ToString(); item.Value = row["SupplierID"].ToString(); item.Attributes.Add("ContactName", row["ContactName"].ToString()); comboBox.Items.Add(item); item.DataBind(); } }
protected void LoadResidentDet() { try { DataSet dsResident = new DataSet(); dsResident = sqlobj.ExecuteSP("SP_GenDropDownList", new SqlParameter() { ParameterName = "@iMode", SqlDbType = SqlDbType.Int, Value = 1 }, new SqlParameter() { ParameterName = "@RTRSN", SqlDbType = SqlDbType.Decimal, Value = 1 }); cmbResident.DataSource = dsResident.Tables[0]; cmbResident.DataValueField = "RTRSN"; cmbResident.DataTextField = "RName"; cmbResident.DataBind(); RadComboBoxItem item2 = new RadComboBoxItem(); item2.Text = "Please Select"; item2.Value = "0"; item2.Selected = true; cmbResident.Items.Add(item2); } catch (Exception ex) { WebMsgBox.Show(ex.Message.ToString()); } }
protected void RadComboBox1_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e) { JavaScriptSerializer js = new JavaScriptSerializer(); productos indec = new productos() { productoGeneral = Convert.ToInt16((string)Session["tiposeleccionad"]), tipoProducto = Convert.ToInt16(cbxTipoProducto.SelectedValue), //tipoProducto = Convert.ToInt16("2"), }; string postdata = js.Serialize(indec); byte[] data = Encoding.UTF8.GetBytes(postdata); HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://localhost:50548/Producto.svc/Producto"); request.Method = "POST"; request.ContentLength = data.Length; request.ContentType = "application/json"; var requestStream = request.GetRequestStream(); requestStream.Write(data, 0, data.Length); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader reader = new StreamReader(response.GetResponseStream()); string tramajson = reader.ReadToEnd(); List <productos> indicadorrespuesta = js.Deserialize <List <productos> >(tramajson); cbxProducto.Items.Clear(); foreach (productos ca in indicadorrespuesta) { RadComboBoxItem itemCB = new RadComboBoxItem(); itemCB.Text = ca.descProducto; itemCB.Value = ca.producto + ""; cbxProducto.Items.Add(itemCB); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack && !Page.IsCallback) { // imgNikePlus.ImageUrl = ResolveUrl("~/DesktopModules/ATI_Fitness/resources/images/iSyncNikePlus.png"); // set date control to today atiRadDatePicker.SelectedDate = DateTime.Now; // TODO: consider putting this back in futrue atiRadDatePickerHide.Visible = false; plHideDate.Visible = false; txtHiddenName.Visible = false; plHiddenName.Visible = false; // END atiRadDatePickerHide.SelectedDate = DateTime.Now.AddDays(1); if (this.SetControlToWOD != null) { Aqufit.Helpers.WodItem wi = new Aqufit.Helpers.WodItem() { Id = this.SetControlToWOD.Id, Type = (short)this.SetControlToWOD.WODType.Id }; string json = _serializer.Serialize(wi); RadComboBoxItem item = new RadComboBoxItem(this.SetControlToWOD.Name, json); item.Selected = true; atiRadComboBoxCrossfitWODs.Items.Add(item); ScriptManager.RegisterStartupScript(this, Page.GetType(), "InitialWOD", "Aqufit.addLoadEvent(function(){ Aqufit.Page.Controls.atiWodSelector.SetupWOD('" + json + "') });", true); } } }
protected void RadScheduler1_DataBound(object sender, EventArgs e) { RadScheduler1.ResourceTypes.FindByName("User").AllowMultipleValues = true; IList<Resource> pagedResources = new List<Resource>(RadScheduler1.Resources.GetResourcesByType("User")); IList<Resource> remainingResources = new List<Resource>(); IList<RadComboBoxItem> comboItems = new List<RadComboBoxItem>(); RadCombobox1.Items.Clear(); //int resourceIndex = 0; string selectedLetter = Hiddenfield1.Value; char[] sep = { ',' }; string[] newResources = selectedLetter.Split(sep, StringSplitOptions.RemoveEmptyEntries); foreach (Resource resource in pagedResources) { bool isSelected = false; for (int i = 0; i < newResources.Length; i++) { if (resource.Text != newResources[i]) { isSelected = true; } else { isSelected = false; break; } } if (isSelected) { RadScheduler1.Resources.Remove(resource); remainingResources.Add(resource); RadCombobox1.Items.Add(new RadComboBoxItem(resource.Text)); } else { RadComboBoxItem newItem = new RadComboBoxItem(resource.Text); newItem.Checked = true; RadCombobox1.Items.Add(newItem); } } // Hiddenfield1.Value = "ready"; //} //else //{ // foreach (Resource resource in pagedResources) // { // RadCombobox1.Items.Add(new RadComboBoxItem(resource.Text)); // } //} Session["remainingResources"] = remainingResources; }
private void ListGroup() { var group = groupRepo.GetAll(); ddlGroup.DataSource = group; ddlGroup.DataTextField = "GroupName"; ddlGroup.DataValueField = "Id"; ddlGroup.DataBind(); RadComboBoxItem item = new RadComboBoxItem("Select a group", "0"); ddlGroup.Items.Insert(0, item); }
protected void FillDateFilterDDL() { DdlDate.Items.Add(new RadComboBoxItem("Today's data", "0")); DdlDate.Items.Add(new RadComboBoxItem("Last seven days", "7")); DdlDate.Items.Add(new RadComboBoxItem("Current month", "30")); RadComboBoxItem rcbItem = new RadComboBoxItem("All", "-1"); rcbItem.Selected = true; DdlDate.Items.Add(rcbItem); DdlDate.Items.Add(new RadComboBoxItem("Custom date...", "-2")); }
private void CarregueCombo() { foreach (EnumeradorFiltroPatente enumerador in EnumeradorFiltroPatente.ObtenhaTodos()) { var item = new RadComboBoxItem(enumerador.Descricao, enumerador.Id.ToString()); item.Attributes.Add("Codigo", enumerador.Id.ToString()); cboFiltroPatente.Items.Add(item); item.DataBind(); } }
private void ListRegion() { var region = (int.Parse(ddlGroup.SelectedValue) > 0) ? regionRepo.GetRegionByGroupId(int.Parse(ddlGroup.SelectedValue)) : regionRepo.GetAll(); ddlRegion.DataSource = region; ddlRegion.DataTextField = "RegionName"; ddlRegion.DataValueField = "Id"; ddlRegion.DataBind(); RadComboBoxItem item = new RadComboBoxItem("Select a region", "0"); ddlRegion.Items.Insert(0, item); }
private void PromotionList() { ObjLogin cust = (ObjLogin)Session["objLogin"]; ddlPromotion.DataSource = ScheduleRepo.GetListPhonePromotion(cust.Phone,Constant.outbox); ddlPromotion.DataTextField = "Title"; ddlPromotion.DataValueField = "Id"; ddlPromotion.DataBind(); RadComboBoxItem item = new RadComboBoxItem("Select all", "0"); ddlPromotion.Items.Insert(0, item); }
private void ListChannel() { var channelList = ChannelRepo.GetAll(); ddlChannel.DataSource = channelList; ddlChannel.DataValueField = "Id"; ddlChannel.DataTextField = "ChannelName"; ddlChannel.DataBind(); RadComboBoxItem item = new RadComboBoxItem("Select a channel", "0"); ddlChannel.Items.Insert(0, item); }
/// <summary> /// Load data to comboboxes when page_load /// </summary> private void ListCustomerType() { var customertype = CTypeRepo.GetAll(); ddlCustomerType.DataSource = customertype; ddlCustomerType.DataTextField = "TypeName"; ddlCustomerType.DataValueField = "Id"; ddlCustomerType.DataBind(); RadComboBoxItem item=new RadComboBoxItem("Select a type","0"); ddlCustomerType.Items.Insert(0, item); }
private void PopulateOccupation() { SqlConnection sqlConnectionX; SqlCommand sqlCommandX; SqlParameter sqlParam; SqlDataReader sqlDR; try { sqlConnectionX = new SqlConnection(ConfigurationManager.AppSettings["SQLConnection"]); sqlConnectionX.Open(); sqlCommandX = new SqlCommand(); sqlCommandX.Connection = sqlConnectionX; sqlCommandX.CommandType = CommandType.StoredProcedure; sqlCommandX.CommandText = "spx_SELECT_Occupation"; sqlDR = sqlCommandX.ExecuteReader(); DataTable dtResult = new DataTable("Result"); dtResult.Load(sqlDR); sqlDR.Close(); sqlCommandX.Cancel(); sqlCommandX.Dispose(); RadComboBoxOccupation.DataTextField = "Occupation"; RadComboBoxOccupation.DataValueField = "OccupationID"; RadComboBoxItem cbDefaultItem = new RadComboBoxItem(); cbDefaultItem.Value = "0"; cbDefaultItem.Text = "- Please select an occupation -"; RadComboBoxOccupation.Items.Add(cbDefaultItem); foreach (DataRow dataRow in dtResult.Rows) { RadComboBoxItem cbItem = new RadComboBoxItem(); cbItem.Value = dataRow[0].ToString().Trim(); cbItem.Text = dataRow[1].ToString().Trim(); cbItem.Attributes.Add("Life", dataRow[2].ToString()); cbItem.Attributes.Add("ADW", dataRow[3].ToString()); cbItem.Attributes.Add("OCC", dataRow[4].ToString()); RadComboBoxOccupation.Items.Add(cbItem); } //RadComboBoxOccupation.DataSource = dtResult; //RadComboBoxOccupation.DataBind(); } catch (Exception ex) { lblInfo.Text = ex.Message; lblInfo2.Text = ex.Message; } }
private void CarregueCombo() { foreach (var apresentacao in Apresentacao.ObtenhaTodas()) { var item = new RadComboBoxItem(apresentacao.Nome, apresentacao.Codigo.ToString()); item.Attributes.Add("Codigo", apresentacao.Codigo.ToString()); cboApresentacao.Items.Add(item); item.DataBind(); } }
private void CarregueCombo() { foreach (var mes in Mes.ObtenhaTodas()) { var item = new RadComboBoxItem(mes.Descricao, mes.Codigo.ToString()); item.Attributes.Add("Codigo", mes.Codigo.ToString()); cboMes.Items.Add(item); item.DataBind(); } }
protected override void InitDDL() { SiteType st = new SiteType(); st.Query.AddOrderBy(SiteType.ColumnNames.Name, WhereParameter.Dir.ASC); if (st.Query.Load()) { do { RadComboBoxItem item = new RadComboBoxItem(st.s_Name, st.SiteTypeID.ToString()); this.ddlList.Items.Add(item); } while (st.MoveNext()); } }
public AxSearchBox(sfPartner.Field f) { InitializeComponent(); _f = f; _d = Globals.ThisAddIn.getData(); // TODO for now assume that we are looking up by the Name field // this isn't always true, e.g. Task is Subject *but* the only way to do it // is to load the full definition of the object from Salesforce and step through all the // fields and find the one with nameField set to true - I'm actually doing that for the // object that we load but would need to look up the others when we get a reference _namefield = "Name"; //If it can only be one object then hide the object picker if (f.referenceTo.Length == 1) { o1.Visibility = System.Windows.Visibility.Collapsed; coldefo1.Width = new GridLength(0); } //Otherwise populate o1.Items.Clear(); foreach (string s in f.referenceTo) { RadComboBoxItem cbi = new RadComboBoxItem(); cbi.Tag = s; cbi.Content = _d.GetSObjectDef(s).label; // hard code overide for the Group versus Queue // can't work out how this is filtered and where you can find it in the object definition or layout // definition just says "Group" but UI says Queue and shows Groups where Type = Queue - odd! // also the Type is returned as Queue from the SOQL if (s == "Group") { cbi.Tag = "Queue"; cbi.Content = "Queue"; } o1.Items.Add(cbi); } //set to the first one *might be a default - should use that _type = f.referenceTo[0]; _typeName = _d.GetSObjectDef(_type).label; //Set special filter acb1.FilteringBehavior = new ShowAllFilteringBehavior(); _gotdata = false; _triggerevents = true; }
protected override void InitDDL() { RoomCategory rc = new RoomCategory(); rc.Query.AddOrderBy(RoomCategory.ColumnNames.Name, WhereParameter.Dir.ASC); if (rc.Query.Load()) { do { RadComboBoxItem item = new RadComboBoxItem((!rc.IsColumnNull("Name" + Utils.LangPrefix) ? rc.GetColumn("Name" + Utils.LangPrefix).ToString() : ""), rc.RoomCategoryID.ToString()); this.ddlList.Items.Add(item); } while (rc.MoveNext()); } }
public void PopulateMasterSpeciality(RadComboBox rcbSpeciality) { DataSet dsSpeciality = objSpecialityBAL.SelectMasterSpeciality(); if (dsSpeciality.Tables.Count > 0 && dsSpeciality.Tables[0].Rows.Count > 0) { rcbSpeciality.DataSource = dsSpeciality; rcbSpeciality.DataTextField = "DepartmentName"; rcbSpeciality.DataValueField = "DepartmentId"; rcbSpeciality.DataBind(); } RadComboBoxItem CountryListItem = new RadComboBoxItem("--Select--", "--Select--"); rcbSpeciality.Items.Insert(0, CountryListItem); }
protected override void InitDDL() { Country c = new Country(); c.Query.AddOrderBy(Country.ColumnNames.Name, WhereParameter.Dir.ASC); if (c.Query.Load()) { do { RadComboBoxItem item = new RadComboBoxItem(c.s_Name, c.CountryID.ToString()); item.Attributes["NameEn"] = c.s_Name_en; this.ddlList.Items.Add(item); } while (c.MoveNext()); } }
public void LoadCityDDL(int countryID) { ddlList.Items.Clear(); City c = new City(); c.Where.CountryID.Value = countryID; c.Query.AddOrderBy(City.ColumnNames.Name, WhereParameter.Dir.ASC); if (c.Query.Load()) { do { RadComboBoxItem item = new RadComboBoxItem(c.s_Name, c.CityID.ToString()); this.ddlList.Items.Add(item); } while (c.MoveNext()); } }
protected void cboTitular_OnItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { using (var servico = FabricaGenerica.GetInstancia().CrieObjeto<IServicoDeTitular>()) { cboTitular.Items.Clear(); foreach (var titular in servico.ObtenhaPorNomeComoFiltro(e.Text, 50)) { var item = new RadComboBoxItem(titular.Pessoa.Nome, titular.Pessoa.ID.ToString()); item.Attributes.Add("DataDoCadastro", titular.DataDoCadastro.Value.ToString("dd/MM/yyyy")); item.Attributes.Add("InformacoesAdicionais", titular.InformacoesAdicionais); cboTitular.Items.Add(item); item.DataBind(); } } }
private void CarregueComboClasseViena(ILeituraRevistaDeMarcas processo) { cboClassificacaoViena.Items.Clear(); cboClassificacaoViena.Attributes.Clear(); foreach (var codigo in processo.ClasseViena.ListaDeCodigosClasseViena) { var item = new RadComboBoxItem(processo.ClasseViena.EdicaoClasseViena, processo.ClasseViena.EdicaoClasseViena); item.Attributes.Add("Codigo", codigo ?? "Não informada"); this.cboClassificacaoViena.Items.Add(item); item.DataBind(); } }
protected override void InitDDL() { City c = new City(); if (CountryID > 0) { c.Where.CountryID.Value = CountryID; } c.Query.AddOrderBy(City.ColumnNames.Name_uk, WhereParameter.Dir.ASC); if (c.Query.Load()) { do { RadComboBoxItem item = new RadComboBoxItem(c.s_Name_uk, c.CityID.ToString()); this.ddlList.Items.Add(item); } while (c.MoveNext()); } }
protected void cboNCL_OnItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { var ncls = NCL.ObtenhaPorCodigoComoFiltro(e.Text); if (ncls.Count > 0) { foreach (var ncl in ncls) { var item = new RadComboBoxItem(ncl.Codigo, ncl.Codigo); item.Attributes.Add("Descricao", ncl.Descricao); item.Attributes.Add("Natureza", ncl.NaturezaDeMarca.Nome); cboNCL.Items.Add(item); item.DataBind(); } } }
public ConfigurationWindow(ClientForm clientForm) { myClientForm = clientForm; InitializeComponent(); tbSipProxyAddress.Text = myClientForm.myClientConfiguration.SIPProxyAddress; tbSipRealm.Text = myClientForm.myClientConfiguration.SIPProxyRealm; tbIMServerAddress.Text = myClientForm.myClientConfiguration.IMServerAddress; tbVideoProxyAddress.Text = myClientForm.myClientConfiguration.VideoProxyAddress; try { cbServiceProviders.SelectedIndex = 0; RemwaveLiteWS.Service service = new Remwave.Client.RemwaveLiteWS.Service(); RemwaveLiteWS.ServiceProvider[] serviceProviders = service.ServiceProviders(Application.ProductVersion); foreach (RemwaveLiteWS.ServiceProvider serviceProvider in serviceProviders) { RadComboBoxItem cbItem = new RadComboBoxItem(); cbItem.AccessibleDescription = ""; cbItem.DescriptionFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); cbItem.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); cbItem.DescriptionText = serviceProvider.Description; cbItem.KeyTip = ""; cbItem.Text = serviceProvider.Name; cbItem.TextSeparatorVisibility = Telerik.WinControls.ElementVisibility.Visible; cbItem.ToolTipText = null; cbItem.Tag = serviceProvider; cbServiceProviders.Items.Add(cbItem); } } catch (Exception) { throw; } }
private void CarregueComboClasseNacional(ILeituraRevistaDeMarcas processo) { cboClassificacaoNacional.Items.Clear(); cboClassificacaoNacional.Attributes.Clear(); foreach (var codigo in processo.ClasseNacional.listaDeCodigosDeSubClasse) { var item = new RadComboBoxItem(processo.ClasseNacional.CodigoClasseNacional, processo.ClasseNacional.CodigoClasseNacional); item.Attributes.Add("Especificacao", processo.ClasseNacional.EspecificacaoClasseNacional ?? "Não informada"); item.Attributes.Add("SubClasse", codigo ?? "Não informada"); this.cboClassificacaoNacional.Items.Add(item); item.DataBind(); } }