Exemple #1
0
        public void LogYerlestir()
        {
            durumlarUserControl.flowLayoutPanel3.Controls.Clear();
            List <Rapor> raporlar = CafeDB.Log.LogListe();

            foreach (Rapor rapor in raporlar)
            {
                Kayit    log      = rapor.Kayit;
                GroupBox groupBox = new GroupBox();
                groupBox.Name = "Kullanici" + log.KayitID;
                groupBox.Size = new Size(this.Size.Width - 40, groupBox.Size.Height);
                FlowLayoutPanel flow = new FlowLayoutPanel();
                flow.Name          = "flow";
                flow.FlowDirection = FlowDirection.TopDown;
                Label labelZaman = new Label();
                labelZaman.AutoSize = true;
                labelZaman.Name     = "labelZaman";
                Label labelIslem = new Label();
                labelIslem.AutoSize = true;
                labelIslem.Name     = "labelIslem";
                flow.Controls.Add(labelZaman);
                flow.Controls.Add(labelIslem);
                groupBox.Controls.Add(flow);
                flow.Dock = DockStyle.Fill;
                durumlarUserControl.flowLayoutPanel3.Controls.Add(groupBox);
            }
        }
Exemple #2
0
            public static List <Rapor> LogListe()
            {
                baglanti();
                List <Rapor>    loglar = new List <Rapor>();
                OleDbCommand    komut  = new OleDbCommand("SELECT * FROM Kayitlar AS KA INNER JOIN Kullanicilar AS KU ON KA.Log_ID=KU.Kullanici_ID", con);
                OleDbDataReader oku    = komut.ExecuteReader();

                while (oku.Read())
                {
                    Kayit     log       = new Kayit(Convert.ToInt32(oku["Log_ID"]), Convert.ToDateTime(oku["Log_Zaman"]), oku["Log_Islem"].ToString());
                    Kullanici kullanici = new Kullanici(Convert.ToInt32(oku["Kullanici_ID"]), oku["Kullanici_Adi"].ToString(), oku["Kullanici_Sifre"].ToString(), Convert.ToByte(oku["Kullanici_Yetki"]));
                    Rapor     rapor     = new Rapor(log, kullanici);
                    loglar.Add(rapor);
                }
                bitir();
                return(loglar);
            }
Exemple #3
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;
            }
        }
Exemple #4
0
 public Rapor(Kayit kayit, Kullanici kullanici)
 {
     this.kayit     = kayit;
     this.kullanici = kullanici;
 }