Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var parms = new ShirtQueryParameters();

            if (checkedListBox1.CheckedItems.Count != 0)
            {
                // If so, loop through all checked items and print results.
                string s = "";


                MessageBox.Show(s);
            }
        }
Esempio n. 2
0
        public IQueryable <TLADM_Colours> Query(ShirtQueryParameters parameters)
        {
            var clrs = _context.TLADM_Colours.AsQueryable();

            //Query by color.
            if (parameters.Colors.Count > 0)
            {
                var colorPredicate = PredicateBuilder.False <TLADM_Colours>();

                foreach (var color in parameters.Colors)
                {
                    var temp = color;
                    colorPredicate = colorPredicate.Or(s => s.Col_Id == temp.Col_Id);
                }

                clrs = clrs.AsExpandable().Where(colorPredicate);
            }

            return(clrs);
        }