Example #1
0
        public MyParameter AddWhereParameter(SQLiteParameter param)
        {
            MyParameter my_param = new MyParameter(param.ParameterName, param);

            _whereParameters.Add(my_param);
            return(my_param);
        }
Example #2
0
        public void GetSimilarStorageItems(string pInputString)
        {
            string[] inputWords = this.GetSuitableDescriptionWords(pInputString);
            this.Query.ResetWhereParameters();
            //StorageItem storageItem = new StorageItem();
            foreach (string toSearchWordLoop in inputWords)
            {
                if (this.Query.ParameterCount > 0)
                {
                    this.Query.AddConjunction(MyConj.And);
                }
                this.Query.OpenParenthesis();

                string toSearchWord = "%" + toSearchWordLoop + "%";

                MyParameter descParameter1 = this.Query.AddWhereParameter(StorageItemDT.Parameters.Description);
                descParameter1.Operator = MyOperand.Like;
                descParameter1.Value    = toSearchWord.ToLower();
                //descParameter1.Conjuction = WhereParameter.Conj.Or;


                MyParameter descParameter2 = this.Query.AddWhereParameter(StorageItemDT.Parameters.Description);
                descParameter2.Operator   = MyOperand.Like;
                descParameter2.Value      = toSearchWord.ToUpper();
                descParameter2.Conjuction = MyConj.Or;

                this.Query.CloseParenthesis();
            }

            this.Query.Load();
            //return storageItem.AsList();
        }
Example #3
0
        public MyParameter AddWhereParameter(String columnName, MyOperand op, SQLiteParameter param, object value)
        {
            MyParameter my_param = new MyParameter(columnName, param)
            {
                Operator = op, Value = value
            };

            _whereParameters.Add(my_param);
            return(my_param);
        }
Example #4
0
        //public MyParameter AddWhereParameter(string columnName, IDataParameter param)
        //{
        //    MyParameter my_param = new MyParameter(columnName, param);
        //    _whereParameters.Add(my_param);
        //    return my_param;
        //}
        public MyParameter AddWhereParameter(SQLiteParameter param, object value)
        {
            MyParameter my_param = new MyParameter(param.ParameterName, param)
            {
                Value = value
            };

            _whereParameters.Add(my_param);
            return(my_param);
        }
Example #5
0
 public void AddWhereParameter(MyParameter wItem)
 {
     _whereParameters.Add(wItem);
 }