Ejemplo n.º 1
0
        protected void LoadData(string keyword)
        {
            lookUpEdit1.EditValue = null;

            string exp = LikeData.CreateContainsPattern(keyword);
            List <MaterialEntity> materials = materialDal.QueryMaterial(exp);

            lookUpEdit1.Properties.DataSource = materials;
            lookUpEdit1.ShowPopup();
            lookUpEdit1.Text = keyword;
        }
Ejemplo n.º 2
0
        protected override string OnCreateLookupDisplayFilter(string text, string displayMember)
        {
            List <CriteriaOperator> subStringOperators = new List <CriteriaOperator>();

            foreach (string sString in text.Split(' '))
            {
                string exp = LikeData.CreateContainsPattern(sString);
                List <CriteriaOperator> columnsOperators = new List <CriteriaOperator>();
                foreach (GridColumn col in Columns)
                {
                    if (col.Visible && col.ColumnType == typeof(string))
                    {
                        columnsOperators.Add(new BinaryOperator(col.FieldName, exp, BinaryOperatorType.Like));
                    }
                }
                subStringOperators.Add(new GroupOperator(GroupOperatorType.Or, columnsOperators));
            }
            return(new GroupOperator(GroupOperatorType.And, subStringOperators).ToString());
        }