Exemple #1
0
        public void Update(int Id, Ajanda model)
        {
            var update = GetById(Id);

            update.Icerik        = model.Icerik;
            update.BaslamaTarihi = model.BaslamaTarihi;
            update.BitisTarihi   = model.BitisTarihi;
            update.Durumu        = model.Durumu;
            SetTable();
        }
Exemple #2
0
        private void btnGuncelle_Click(object sender, EventArgs e)
        {
            Ajanda model = _ajanda.GetById(globalId);

            model.BaslamaTarihi = dtBaslamaTarihi.Value;
            model.BitisTarihi   = dtBitisTarihi.Value;
            model.Icerik        = txtIcerik.Text;
            _ajanda.Update(globalId, model);

            SoundPlayer ses = new SoundPlayer();

            ses.SoundLocation = Sabitler.appPath + @"ses\guncelle.wav";
            ses.Play();
            ses.Dispose();
        }
Exemple #3
0
        private void btnYeni_Click(object sender, EventArgs e)
        {
            Ajanda model = new Ajanda();

            model.BaslamaTarihi = dtBaslamaTarihi.Value;
            model.BitisTarihi   = dtBitisTarihi.Value;
            model.Icerik        = txtIcerik.Text;
            model.Durumu        = true;
            _ajanda.Insert(model);

            txtIcerik.Text = "";

            BekleyenleriYukle();
            BitenleriYukle();

            SoundPlayer ses = new SoundPlayer();

            ses.SoundLocation = Sabitler.appPath + @"ses\kapat.wav";
            ses.Play();
            ses.Dispose();
        }
Exemple #4
0
        public AjandaBLL()
        {
            System.IO.StreamReader file = new System.IO.StreamReader(Sabitler.appPath + @"db\Ajanda.txt");

            string row;

            while ((row = file.ReadLine()) != null)
            {
                string[] column = row.Split('#');
                Ajanda   model  = new Ajanda();
                model.Id            = Convert.ToInt32(column[0]);
                model.Icerik        = column[1];
                model.BaslamaTarihi = Convert.ToDateTime(column[2]);
                model.BitisTarihi   = Convert.ToDateTime(column[3]);
                model.Durumu        = Convert.ToBoolean(column[4]);

                db.Add(model);
            }

            file.Close();
            file.Dispose();
        }
Exemple #5
0
 public void Insert(Ajanda model)
 {
     model.Id = GenelAraclar.GetId("Ajanda");
     db.Add(model);
     SetTable();
 }