private void LokSubject_SearchFilterChanged(object sender, MyCommonWPFControls.SearchFilterArg e) { if (e.SingleFilterValue != null) { if (!e.FilerBySelectedValue) { var subjects = bizSecuritySubject.GetSecuritySubjects(e.SingleFilterValue); e.ResultItemsSource = subjects; } else { var id = Convert.ToInt32(e.SingleFilterValue); if (id > 0) { var subject = bizSecuritySubject.GetSecuritySubject(id); e.ResultItemsSource = new List <SecuritySubjectDTO> { subject }; } else { e.ResultItemsSource = null; } } } }
public void SearchSecuritySubjects() { BizSecuritySubject bizSecuritySubject = new BizSecuritySubject(); dtgItems.ItemsSource = bizSecuritySubject.GetSecuritySubjects(txtName.Text); }