Ejemplo n.º 1
0
 private void BtnDoSearch_Click(object sender, RoutedEventArgs e)
 {
     if (this.Text != String.Empty)
     {
         DoSearch?.Invoke(this, this.Text);
     }
 }
Ejemplo n.º 2
0
 private void TextBox_PreviewKeyUp(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         if (this.Text != String.Empty)
         {
             DoSearch?.Invoke(this, this.Text);
         }
     }
 }
Ejemplo n.º 3
0
        public void GetData()
        {
            DoSearch model = new DoSearch();
            int      iNT   = int.Parse(((ComboxItem)this.Type.SelectedItem).Values);

            if (iNT == 0)
            {
                iNT = this.TYPE.INT;
            }
            model.TypeId   = this.returnsearch.TypeId;
            model.Key      = iNT;
            model.SourceID = this.TYPE.INT;
            model.KeyWord  = this.keyword.Text;
            this.GetCategoryID(true);
            model.Category = this.category;
            this.data      = new List <Knowledge>(); //todo
            this.Category();
            this.CategoryIsChecked();
            if ((this.data != null) && (this.data.Count > 0))
            {
                this.IsNull.Visibility  = Visibility.Hidden;
                this.NotNull.Visibility = Visibility.Visible;
            }
            else
            {
                this.IsNull.Visibility        = Visibility.Visible;
                this.NotNull.Visibility       = Visibility.Hidden;
                this.RecordsNumber.Visibility = Visibility.Hidden;
                return;
            }
            if (this.data.Count == 1)
            {
                this.IsReturn = false;
                this.gotokdp(this.data[0]);
            }
            if (this.data.Count > 100)
            {
                this.num.Content = this.data.Count;
                this.RecordsNumber.Visibility = Visibility.Visible;
            }
            else
            {
                this.RecordsNumber.Visibility = Visibility.Hidden;
            }
            this.BoundControls();
        }
Ejemplo n.º 4
0
 private void SearchBox_DoSearch(SearchBox sender, string searchText)
 {
     DoSearch?.Invoke(sender, searchText);
     sender.Text = "";
     cbRangeType.SelectedIndex = 0;
 }