guneysus
6/8/2015 - 3:11 PM

TODO

TODO

            button1.Click += (o, E) =>
            {

                List<Products> urunler = null;

                fiyat = string.IsNullOrEmpty(textBox1.Text) ? (decimal?) null : Convert.ToDecimal(textBox1.Text);

                stok = string.IsNullOrEmpty(textBox2.Text) ? (int?) null : Convert.ToInt32(textBox2.Text);

                if (fiyat != null & stok != null)
                {
                    urunler = db.Products.Where(x => x.UnitPrice > fiyat & x.UnitsInStock < stok).ToList();
                }

                dataGridView1.DataSource = urunler;
            };