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"); }
private void firstFive_Click(object sender, EventArgs e) { List <Order> orders = Order.GetOrders(); dataGridView1.DataSource = null; dataGridView1.DataSource = orders.Take(5).ToList(); }
private void justDates_Click(object sender, EventArgs e) { List <Order> orders = Order.GetOrders(); dataGridView1.DataSource = null; dataGridView1.DataSource = orders.Select(x => x.OrderDate).ToList(); }
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; }
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()); }
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(); }
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(); }
private void button7_Click(object sender, EventArgs e) { List <Order> orders = Order.GetOrders(); int sayi = orders.Count; }
private void siparis_sayisi_Click(object sender, EventArgs e) { dataGridView1.DataSource = null; MessageBox.Show(Order.GetOrders().Count.ToString()); }
private void yang_wang_Click(object sender, EventArgs e) { dataGridView1.DataSource = null; dataGridView1.DataSource = Order.GetOrders().Where(x => x.Customer.ContactName == "Yang Wang").ToList(); }
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(); }
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(); }
private void sadece_tarih_Click(object sender, EventArgs e) { dataGridView1.DataSource = null; dataGridView1.DataSource = Order.GetOrders().Select(x => x.OrderDate).ToList(); }