private void button_Click(object sender, EventArgs e) { SearchBoxEventArgs newEvent = new SearchBoxEventArgs(); newEvent.SearchText = this.Text; SearchEventRaiser(newEvent); }
protected void radSearchEmployee_Search(object sender, SearchBoxEventArgs e) { RadSearchBox searchBox = (RadSearchBox)sender; string employeeId = string.Empty; string likeCondition; Guid empId = new Guid(); if (e.DataItem != null) { employeeId = ((Dictionary <string, object>)e.DataItem)["EmployeeId"].ToString(); empId = Guid.Parse(employeeId); if (!string.IsNullOrEmpty(employeeId)) { likeCondition = string.Format("'{0}{1}%'", searchBox.Filter == SearchBoxFilter.Contains ? "%" : "", ((Dictionary <string, object>)e.DataItem)["EmployeeId"].ToString()); //gridEmployeeDataSource.SelectCommand = "SELECT [EmployeeId], [FirstName] , [MiddleName], [LastName], [BirthDate], [ContactNo], [Email], [CreatedDate]" + " FROM[Employee] WHERE RecordStatus = 1 AND [" + searchBox.DataValueField + "] LIKE " + likeCondition; //RadGrid2.DataBind(); RadGrid2.DataSource = GetEmployeebyEmployeeId(empId); //RadGrid2.DataSource = "SELECT [EmployeeId], [FirstName] , [MiddleName], [LastName], [BirthDate], [ContactNo], [Email], [CreatedDate]" + " FROM [Employee] WHERE RecordStatus = 1 and FirstName = [" + searchBox.Text + "] OR LastName = [" + searchBox.Text + "] or BirthDate = [" + searchBox.Text + "] "; RadGrid2.DataBind(); // string search = radSearchEmployee.Text; } } else { RadGrid2.DataSource = GetEmployee(); RadGrid2.DataBind(); } }
private void SearchEventRaiser(SearchBoxEventArgs e) { if (Search != null) { Search(this, e); } }
protected void radSearchUser_Search(object sender, SearchBoxEventArgs e) { RadSearchBox searchBox = (RadSearchBox)sender; string userId = string.Empty; string likeCondition; Guid userid = new Guid(); if (e.DataItem != null) { userId = ((Dictionary <string, object>)e.DataItem)["UserId"].ToString(); userid = Guid.Parse(userId); if (!string.IsNullOrEmpty(userId)) { likeCondition = string.Format("'{0}{1}%'", searchBox.Filter == SearchBoxFilter.Contains ? "%" : "", ((Dictionary <string, object>)e.DataItem)["UserId"].ToString()); RadGrid2.DataSource = GetUserbyUserId(userid); RadGrid2.DataBind(); } } else { RadGrid2.DataSource = GetUsers(); RadGrid2.DataBind(); } }
protected void radSearchawbIssuance_Search(object sender, SearchBoxEventArgs e) { RadSearchBox searchBox = (RadSearchBox)sender; string id = string.Empty; string likeCondition; Guid awbId = new Guid(); Guid bcoId = new Guid(); if (e.DataItem != null) { // id = ((Dictionary<string, object>)e.DataItem)["AwbIssuanceId"].ToString(); var dataItem = ((Dictionary <string, object>)e.DataItem); var awbIssuanceId = dataItem["AwbIssuanceId"].ToString(); var bco = dataItem["BCOid"].ToString(); awbId = Guid.Parse(awbIssuanceId); bcoId = Guid.Parse(bco); if (!string.IsNullOrEmpty(id)) { likeCondition = string.Format("'{0}{1}%'", searchBox.Filter == SearchBoxFilter.Contains ? "%" : "", ((Dictionary <string, object>)e.DataItem)["AwbIssuanceId"].ToString()); RadGrid2.DataSource = GetAwbIssuanceById(bcoId, awbId); RadGrid2.DataBind(); } } else { RadGrid2.DataSource = GetAWBIssuance(); RadGrid2.DataBind(); } }
protected void radCompany_Search(object sender, SearchBoxEventArgs e) { RadSearchBox searchBox = (RadSearchBox)sender; string companyId = string.Empty; string likeCondition; Guid compId = new Guid(); if (e.DataItem != null) { companyId = ((Dictionary <string, object>)e.DataItem)["CompanyId"].ToString(); compId = Guid.Parse(companyId); if (!string.IsNullOrEmpty(companyId)) { likeCondition = string.Format("'{0}{1}%'", searchBox.Filter == SearchBoxFilter.Contains ? "%" : "", ((Dictionary <string, object>)e.DataItem)["CompanyId"].ToString()); RadGrid2.DataSource = GetCompanyById(compId); RadGrid2.DataBind(); } } else { RadGrid2.DataSource = GetCompany(); RadGrid2.DataBind(); } }
protected void rsbPart_Search(object sender, SearchBoxEventArgs e) { string[] split = rsbPart.Text.Split('|'); if (split.Length > 1) { rsbPart.Text = split[1]; } }
protected void OnSearchServer(object sender, SearchBoxEventArgs e) { if (OnSearchItemSelect != null) { string[] split = e.Text.Split('|'); if (split.Length > 0) { OnSearchItemSelect(split[0]); } } }
protected void OnSearchServer(object sender, SearchBoxEventArgs e) { string pname = " "; if (OnSearchItemSelect != null) { if (e.Value != null) { SelectedPersonID = Convert.ToDecimal(e.Value.ToString()); pname = e.Text; } OnSearchItemSelect(pname); } }
public void searchBaseItem_clicked(object sender, SearchBoxEventArgs e) { string baseItemCode = searchBaseItem.Text; //check for not null if (baseItemCode != "") { var baseItemsDataSource = _baseItemManagement.GetBaseItemList(baseItemCode); RadListViewBaseItems.DataSource = baseItemsDataSource; RadListViewBaseItems.DataBind(); } else { RadListViewBaseItems.DataSource = GetBaseItemsDataSource(); RadListViewBaseItems.DataBind(); } }
protected void radSearchUser_Search(object sender, SearchBoxEventArgs e) { RadSearchBox searchBox = (RadSearchBox)sender; string SOAnumber = string.Empty; if (e.DataItem != null) { SOAnumber = e.Text; RadGrid2.DataSource = DataSource.AsEnumerable().Where(x => x.Field <String>("StatementOfAccountNo").Contains(SOAnumber)); RadGrid2.DataBind(); } else { RadGrid2.DataSource = DataSource; RadGrid2.DataBind(); } }
protected void txtBusquedaFormulario_OnSearch(object sender, SearchBoxEventArgs e) { try { if (e.Value != null && e.Value != "0" && !string.IsNullOrEmpty(e.Value.Trim())) { Response.Redirect("~/Agente/FrmAgenteNuevoTicket.aspx?idUsuarioSolicitante=" + IdUsuarioSolicito + "&IdArbol=" + e.Value + "&Canal=" + (int)BusinessVariables.EnumeradoresKiiniNet.EnumCanal.Portal + "&UsuarioSolicita=" + IdUsuarioSolicito); } } catch (Exception ex) { if (_lstError == null) { _lstError = new List <string>(); } _lstError.Add(ex.Message); Alerta = _lstError; } }
protected void author_pub_Search(object sender, SearchBoxEventArgs e) { if (!string.IsNullOrWhiteSpace(e.Value)) { CurrentResource.Author = e.Value; HomoryContext.Value.SaveChanges(); } }
protected void publisher_Search(object sender, SearchBoxEventArgs e) { reBind(); }
protected void rsbCoopFunding_Search(object sender, SearchBoxEventArgs e) { rgCoopFunding.Rebind(); }
protected void peek_Search(object sender, SearchBoxEventArgs e) { view.Rebind(); }
protected void rsbSearch_Search(object sender, SearchBoxEventArgs e) { query = e.Text; rgResults.Rebind(); }