Beispiel #1
0
        private void ParolaDogrula(string kullanici, string sifre)
        {
            AlfaDBEntities ade = new AlfaDBEntities();

            var kullanici_islemi = ade.Kullanicis
                                   .FirstOrDefault(u => u.KullaniciAdi == kullanici &&
                                                   u.KullaniciSifre == sifre);

            var kullanici_adi   = txtKullaniciAdi.Text;
            var kullanici_sifre = txtParola.Text;

            if (kullanici_adi != string.Empty && kullanici_sifre != string.Empty)
            {
                if (kullanici_islemi != null)
                {
                    Yonetim yonetim = new Yonetim();
                    yonetim.Show();
                    this.Hide();
                }
                else
                {
                    XtraMessageBox.Show("Kullanıcı Adı Ya da Parola Yanlış", "HATA");
                }
            }
            else
            {
                XtraMessageBox.Show("Kullanıcı Adı Ya da Parola Alanı Boş Bırakılamaz!", "HATA");
            }
        }
Beispiel #2
0
        public TelRehber()
        {
            InitializeComponent();

            dbContext = new AlfaDBEntities();
            dbContext.TelefonRehberis.Load();
            bindingSource1.DataSource = dbContext.TelefonRehberis.Local.ToBindingList().Reverse();
        }
Beispiel #3
0
        public void TemaGetir()
        {
            Alfa.AlfaDBEntities dbContext = new AlfaDBEntities();
            Tema tema = dbContext.Temas.Where(c => c.id == 1).FirstOrDefault();

            DevExpress.Skins.SkinManager.EnableFormSkins();
            DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(tema.TemaAdi);
        }
Beispiel #4
0
        private void TSec(string tema_adi)
        {
            Alfa.AlfaDBEntities dbContext = new AlfaDBEntities();
            Tema tema = dbContext.Temas.Where(c => c.id == 1).FirstOrDefault();

            tema.TemaAdi = tema_adi;
            dbContext.SaveChanges();
        }
Beispiel #5
0
        private void NotGuncelle(int not_id, string baslik, string icerik)
        {
            Alfa.AlfaDBEntities dbContext = new AlfaDBEntities();
            Notlar not = dbContext.Notlars.Where(c => c.NotID == not_id).FirstOrDefault();

            not.NotBaslik = baslik;
            not.NotIcerik = icerik;
            dbContext.SaveChanges();
        }
Beispiel #6
0
        public void RehbereEkle(string kisi, string tel)
        {
            AlfaDBEntities dbContext = new AlfaDBEntities();
            TelefonRehberi tr        = new TelefonRehberi();

            tr.KisiAdiSoyadi   = kisi;
            tr.TelefonNumarasi = tel;
            dbContext.TelefonRehberis.Add(tr);
            dbContext.SaveChanges();
        }
Beispiel #7
0
        public void KEkle(string kullanici_adi, string sifre)
        {
            Alfa.AlfaDBEntities dbContext = new AlfaDBEntities();
            Kullanici           kullanici = new Kullanici();

            kullanici.KullaniciAdi   = kullanici_adi;
            kullanici.KullaniciSifre = sifre;
            dbContext.Kullanicis.Add(kullanici);
            dbContext.SaveChanges();
        }
Beispiel #8
0
        public void NotEkle(string baslik, string icerik)
        {
            Alfa.AlfaDBEntities dbContext = new AlfaDBEntities();
            Notlar not = new Notlar();

            not.NotBaslik = baslik;
            not.NotIcerik = icerik;
            dbContext.Notlars.Add(not);
            dbContext.SaveChanges();
        }
Beispiel #9
0
 public void RehberGuncelle()
 {
     dbContext = new AlfaDBEntities();
     dbContext.TelefonRehberis.Load();
     bindingSource1.DataSource = dbContext.TelefonRehberis.Local.ToBindingList().Reverse();
 }