예제 #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            List <SiparisModel> siparisler  = HelperSiparis.GetList();
            List <SiparisModel> siparisler2 = new List <SiparisModel>();

            foreach (var item in siparisler)
            {
                if (item.Tarih.Year == DateTime.Now.Year && item.Tarih.Month == DateTime.Now.Month && item.Tarih.Day == DateTime.Now.Day)
                {
                    siparisler2.Add(item);
                }
            }
            dataGridView2.Rows.Clear();
            foreach (var item in siparisler2)
            {
                if (!item.AktifMi)
                {
                    dataGridView2.Rows.Add(item.SiparisId, item.Musteri.Ad, item.Musteri.Soyad, item.Durum, item.Musteri.Adres, item.Tutar);
                }
            }
        }
예제 #2
0
        public void DatabaseYenile()
        {
            dataGridView1.Rows.Clear();
            List <Musteri> musteriler = HelperMusteri.GetList();

            foreach (var item in musteriler)
            {
                if (!item.AktifMi)
                {
                    dataGridView1.Rows.Add(item.MusteriId, item.Ad, item.Soyad, item.Tel, item.Adres);
                }
            }
            dataGridView2.Rows.Clear();
            List <SiparisModel> siparisModels = HelperSiparis.GetList();

            foreach (var item in siparisModels)
            {
                if (!item.AktifMi)
                {
                    dataGridView2.Rows.Add(item.SiparisId, item.Musteri.Ad, item.Musteri.Soyad, item.Durum, item.Musteri.Adres, item.Tutar);
                }
            }
        }