Ejemplo n.º 1
0
        public void KullanicilariGuncelle()
        {
            kullanicilarUserControl.listView1.Items.Clear();
            List <Kullanici> kullanicilar = CafeDB.Kullanicilar.KullanicilariListele();

            foreach (Kullanici kullanici in kullanicilar)
            {
                int count = kullanicilarUserControl.listView1.Items.Count;
                kullanicilarUserControl.listView1.Items.Add(kullanici.KullaniciID.ToString());
                kullanicilarUserControl.listView1.Items[count].SubItems.Add(kullanici.KullaniciAdi);
                kullanicilarUserControl.listView1.Items[count].SubItems.Add(kullanici.Sifre);
                kullanicilarUserControl.listView1.Items[count].SubItems.Add(CafeDB.YetkiToString(kullanici.Yetki));
            }

            ListViewRenklendir();
        }
Ejemplo n.º 2
0
        public void LogGuncelle()
        {
            durumlarUserControl.flowLayoutPanel3.BackColor = Color.FromArgb(150, 168, 168);
            List <Rapor> raporlar = CafeDB.Log.LogListe();

            foreach (Rapor rapor in raporlar)
            {
                Kayit     log       = rapor.Kayit;
                Kullanici kullanici = rapor.Kullanici;
                GroupBox  control   = durumlarUserControl.flowLayoutPanel3.Controls["Kullanici" + log.KayitID] as GroupBox;
                control.Font      = new Font("Century Gothic", 16, FontStyle.Bold);
                control.Text      = "#" + log.KayitID + " - " + kullanici.KullaniciAdi + "(" + CafeDB.YetkiToString(kullanici.Yetki) + ")";
                control.ForeColor = Color.FromArgb(41, 55, 65);
                FlowLayoutPanel flow = control.Controls["flow"] as FlowLayoutPanel;
                flow.Font = new Font("Century Gothic", 12, FontStyle.Regular);
                Label labelZaman = flow.Controls["labelZaman"] as Label;
                Label labelIslem = flow.Controls["labelIslem"] as Label;
                labelZaman.Text = log.KayitZaman.ToString();
                labelIslem.Text = log.KayitIslem;
            }
        }