예제 #1
0
        private void siparisler_ilk5_Click(object sender, EventArgs e)
        {
            List <Order> orders = Order.GetOrders();

            dataGridView1.DataSource = null;
            dataGridView1.DataSource = Order.GetDataTable("SELECT TOP 5* FROM Orders");
        }
예제 #2
0
        private void firstFive_Click(object sender, EventArgs e)
        {
            List <Order> orders = Order.GetOrders();

            dataGridView1.DataSource = null;
            dataGridView1.DataSource = orders.Take(5).ToList();
        }
예제 #3
0
        private void justDates_Click(object sender, EventArgs e)
        {
            List <Order> orders = Order.GetOrders();

            dataGridView1.DataSource = null;
            dataGridView1.DataSource = orders.Select(x => x.OrderDate).ToList();
        }
예제 #4
0
        private void yangwang_Click(object sender, EventArgs e)
        {
            List <Order> orders = Order.GetOrders();
            var          filter = orders.Where(x => x.Customer.ContactName == "Yang Wang").ToList();

            dataGridView1.DataSource = null;
            dataGridView1.DataSource = filter;
        }
예제 #5
0
        private void qtyofOrders_Click(object sender, EventArgs e)
        {
            List <Order> orders = Order.GetOrders();
            //int sayi = orders.Count();
            int sayi2 = orders.Count;

            MessageBox.Show(sayi2.ToString());
        }
예제 #6
0
        private void siparisler_son5_Click(object sender, EventArgs e)
        {
            List <Order> orders = Order.GetOrders();

            dataGridView1.DataSource = null;
            dataGridView1.DataSource = orders.OrderByDescending(x => x.OrderID).Take(5).Select(x => new
            {
                x.OrderID,
                x.Customer.ContactName,
                x.OrderDate
            }).ToList();
        }
예제 #7
0
        private void tum_siparis_Click(object sender, EventArgs e)
        {
            var gorunen = Order.GetOrders().Select(satir => new
            {
                SiparisNo = satir.OrderID,
                Tarih     = satir.OrderDate,
                Musteri   = satir.Customer.ContactName
            });

            dataGridView1.DataSource = null;
            dataGridView1.DataSource = gorunen.ToList();
        }
예제 #8
0
 private void button7_Click(object sender, EventArgs e)
 {
     List <Order> orders = Order.GetOrders();
     int          sayi   = orders.Count;
 }
예제 #9
0
 private void siparis_sayisi_Click(object sender, EventArgs e)
 {
     dataGridView1.DataSource = null;
     MessageBox.Show(Order.GetOrders().Count.ToString());
 }
예제 #10
0
 private void yang_wang_Click(object sender, EventArgs e)
 {
     dataGridView1.DataSource = null;
     dataGridView1.DataSource = Order.GetOrders().Where(x => x.Customer.ContactName == "Yang Wang").ToList();
 }
예제 #11
0
 private void son_5_Click(object sender, EventArgs e)
 {
     dataGridView1.DataSource = null;
     //Skip(10).Take(5)// 10 kayıt atla sıradaki 5 kaydı al
     dataGridView1.DataSource = Order.GetOrders().OrderByDescending(x => x.OrderID).Take(5).ToList();
 }
예제 #12
0
 private void ilk_5_Click(object sender, EventArgs e)
 {
     dataGridView1.DataSource = null;
     //Skip(10).Take(5)// 10 kayıt atla sıradaki 5 kaydı al
     dataGridView1.DataSource = Order.GetOrders().Take(5).Select(x => new { x.OrderID, x.Customer.ContactName, x.OrderDate }).ToList();
 }
예제 #13
0
 private void sadece_tarih_Click(object sender, EventArgs e)
 {
     dataGridView1.DataSource = null;
     dataGridView1.DataSource = Order.GetOrders().Select(x => x.OrderDate).ToList();
 }