private void btnKullaniciEkleme_Click(object sender, EventArgs e)
        {
            string KAd, Sifre, Sonuc;
            int    Id;

            KAd   = txtKullaniciAdi.Text;
            Sifre = txtSifre.Text;
            if (chckFakulteSekreteri.Checked)
            {
                Id = 1;
            }
            else
            {
                Id = 0;
            }

            KullaniciView K = new KullaniciView()
            {
                KAd   = KAd,
                Sifre = Sifre,
                Type  = Id
            };

            Sonuc = KullaniciIslemleri.KullaniciEkle(K);
            if (Sonuc == "Yes")
            {
                MessageBox.Show("Kullanici Eklendi.");
            }
            else
            {
                MessageBox.Show(Sonuc);
            }
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            KullaniciGirisForm kullaniciGirisForm = new KullaniciGirisForm();
            KullaniciIslemleri kullaniciIslemleri = new KullaniciIslemleri();

            if
            (
                MessageBox.Show
                (
                    "Back to Login Page",
                    "Back to Login Page Dialog",
                    MessageBoxButtons.YesNo,
                    MessageBoxIcon.Warning,
                    MessageBoxDefaultButton.Button2 // hit Enter == No !
                )
                == DialogResult.Yes
            )
            {
                string silKullaniciAdi = KullaniciGirisForm.kullaniciAdiSaklama; //kullanici giris kısmında girilen kullanıcı adı kayıt adip indis tespiti icin kullanıyoruz
                kullaniciIslemleri.Sil(silKullaniciAdi);


                this.Hide();
                kullaniciGirisForm.Show();
            }
        }
Beispiel #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            KayitForm kayitForm = new KayitForm();

            KayitForm.butonisim = "Guncelle";

            KullaniciIslemleri kullaniciIslemleri = new KullaniciIslemleri();

            if
            (
                MessageBox.Show
                (
                    "Back to Login Page",
                    "Back to Login Page Dialog",
                    MessageBoxButtons.YesNo,
                    MessageBoxIcon.Warning,
                    MessageBoxDefaultButton.Button2 // hit Enter == No !
                )
                == DialogResult.Yes
            )
            {
                string guncelleKullaniciAdi = KullaniciGirisForm.kullaniciAdiSaklama;
                this.Hide();
                kullaniciIslemleri.Guncelle(guncelleKullaniciAdi);
                kayitForm.Show();
            }
        }
Beispiel #4
0
        public ActionResult Create([Bind(Include = "OgretmenID,OgretmenAdi,OgretmenSoyadi,Unvan,BaslangicTarihi,AyrilisTarihi,PersonelNumarasi,Sifre")] Ogretmen ogretmen, FormCollection frm, HttpPostedFileBase file)
        {
            ogretmen.IsActive        = true;
            ogretmen.BaslangicTarihi = DateTime.Parse(frm["baslangicTarihi"]);
            ogretmen.Unvan           = frm["unvan"];
            if (ModelState.IsValid)
            {
                string ad = "";
                if (file != null)
                {
                    if (file.ContentLength > 0)
                    {
                        if (Path.GetExtension(file.FileName).ToLower() == ".jpg" || Path.GetExtension(file.FileName).ToLower() == ".png" || Path.GetExtension(file.FileName).ToLower() == ".gif" || Path.GetExtension(file.FileName).ToLower() == ".jpeg")
                        {
                            ad = Guid.NewGuid() + Path.GetExtension(file.FileName);
                            var path = Path.Combine(Server.MapPath("~/images"), ad);
                            file.SaveAs(path);
                        }
                    }
                }

                ogretmen.PersonelNumarasi = "120" + ogretmenConcrete._ogretmenRepository.GetAll().Count();
                OgretmenBilgileri ogretmenBilgileri = new OgretmenBilgileri()
                {
                    TCNo     = frm["OgretmeninBilgisi.TCNo"],
                    Fotograf = ad,
                };
                KullaniciIslemleri.OgretmenEkle(ogretmen, ogretmenBilgileri);
                return(RedirectToAction("Index"));
            }

            return(View(ogretmen));
        }
        public string DerslerinListesiGetir(string SinifDonem)
        {
            var     kullanici = Session["Kullanici"] as Kullanici;
            Ogrenci ogrenci   = db.Ogrenciler.Find(kullanici.Id);

            ViewBag.Ogrenci = ogrenci;

            string dKod = KullaniciIslemleri.DersKoduBul(SinifDonem);

            List <OgrenciDersDTO> ogrencininDersNotlari = db.OgrencilerDersler.Where(x => x.OgrencininDersi.DersKodu.Substring(3, 3) == dKod && x.OgrenciID == ogrenci.OgrenciID).Select(x => new OgrenciDersDTO
            {
                DersAdi     = x.OgrencininDersi.DersAdi,
                DersID      = x.OgrencininDersi.DersID,
                DersKodu    = x.OgrencininDersi.DersKodu,
                DersKredisi = x.OgrencininDersi.DersKredisi,
                Vize1       = x.OgrenciDerslerDonemlerinNotlari.FirstOrDefault(y => y.NotunSinavi.SinavTipi == "Vize-1").Puan,
                Vize2       = x.OgrenciDerslerDonemlerinNotlari.FirstOrDefault(y => y.NotunSinavi.SinavTipi == "Vize-2").Puan,
                Final       = x.OgrenciDerslerDonemlerinNotlari.FirstOrDefault(y => y.NotunSinavi.SinavTipi == "Final").Puan,
                But         = x.OgrenciDerslerDonemlerinNotlari.FirstOrDefault(y => y.NotunSinavi.SinavTipi == "But").Puan
            }).ToList();


            string json = JsonConvert.SerializeObject(ogrencininDersNotlari);

            return(json);
        }
        private void btnKayit_Click(object sender, EventArgs e)
        {
            string KAd, Sifre, Sonuc;
            int    Id;

            KAd   = textBox1.Text;
            Sifre = textBox2.Text;
            if (chckYon.Checked)
            {
                Id = 1;
            }
            else
            {
                Id = 0;
            }
            Sonuc = KullaniciIslemleri.KullaniciEkle(KAd, Sifre, Id);
            if (Sonuc == "Yes")
            {
                MessageBox.Show("Kayıt Tamamlandı");
            }
            else
            {
                MessageBox.Show(Sonuc);
            }
        }
        public ActionResult Index()
        {
            var kullanici = Session["Kullanici"] as DATA.Entities.Kullanici;                                                                    //online kullanıcının idsini çekmek için..
            List <OgrencilerDerslerDonemler> ogrencilerDerslerDonemler = db.OgrencilerDersler.Where(x => x.OgrenciID == kullanici.Id).ToList(); //öğrencinin aldığı bütün öğrencidersdönemler geliyor

            ViewBag.OgrencininDonemSayisi = KullaniciIslemleri.DonemSayisiniVer(ogrencilerDerslerDonemler) + 1;                                 //öğrencinin okuduğu dönem sayısı en fazla 8 olacak şekilde geliyor
            //ViewBag.BolumlerDersler = db.BolumlerDersler.Where(x => x.BolumID == kullanici.Ogrenci.OgrencininFakulteBolumu.BolumID && x.DersID==x.).ToList(); //bölüme göre bölümders gönderiliyor
            return(View(ogrencilerDerslerDonemler));
        }
Beispiel #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     islem = new KullaniciIslemleri();
     if (Session["Kullanici_yetki_id"] == (object)1 || Session["Kullanici_yetki_id"] == (object)2)
     {
         Response.Redirect("Login.aspx");
     }
     else
     {
         Response.Redirect("../default.aspx");
     }
     Label1.Visible = false;
 }
        private void frmKullaniciYonetim_Load(object sender, EventArgs e)
        {
            List <tblKullanicilar> K = KullaniciIslemleri.KullaniciGetir();
            DataTable dt             = new DataTable();

            dt.Columns.Add("Kullanıcı ID");
            dt.Columns.Add("Kullanıcı Adı");
            dt.Columns.Add("Kullanıcı Sifre");

            foreach (var item in K)
            {
                dt.Rows.Add(item.kullanici_ID, item.kullanici_Ad, item.kullanici_Sifre);
            }

            dataGridKullanicilar.DataSource = dt;
        }
Beispiel #10
0
        private void btnGiris_Click(object sender, EventArgs e)
        {
            FilmSecim          filmSecim          = new FilmSecim();
            KullaniciIslemleri kullaniciIslemleri = new KullaniciIslemleri();

            //string kullanici = txtKullaniciAdi.Text;
            //string sifre = txtKullaniciSifre.Text;
            kullaniciAdiSaklama = txtKullaniciAdi.Text; // kullanici adi kayit alıyoruz
            if (kullaniciIslemleri.Giris(txtKullaniciAdi.Text, txtKullaniciSifre.Text))
            {
                this.Hide();
                filmSecim.Show();
            }
            else
            {
                MessageBox.Show("sifre hatali");
            }
        }
        private void btnGiris_Click(object sender, EventArgs e)
        {
            string KAd, Sifre, Sonuc;

            KAd   = txtKAd.Text;
            Sifre = txtSifre.Text;

            Sonuc = KullaniciIslemleri.Login(KAd, Sifre);
            if (Sonuc == "Yes")
            {
                MessageBox.Show("Giriş Yapıldı");
                frmRezervasyon FR = new frmRezervasyon();
                FR.Show();
            }
            else
            {
                MessageBox.Show("Kullanıcı Adı veya Şifre Yanlış");
            }
        }
Beispiel #12
0
        public ActionResult Create([Bind(Include = "OgrenciID,OgrenciAdi,OgrenciSoyadi,OgrenciNumarasi,KayitTarihi,MezuniyetTarihi,FakulteBolumlerID,OgrencininFakulteBolumu,OgrenimSekliID,EgitimDuzeyiID")] Ogrenci ogrenci, FormCollection frm, HttpPostedFileBase file)
        {
            if (ModelState.IsValid)
            {
                string ad = "";
                if (file != null)
                {
                    if (file.ContentLength > 0)
                    {
                        if (Path.GetExtension(file.FileName).ToLower() == ".jpg" || Path.GetExtension(file.FileName).ToLower() == ".png" || Path.GetExtension(file.FileName).ToLower() == ".gif" || Path.GetExtension(file.FileName).ToLower() == ".jpeg")
                        {
                            ad = Guid.NewGuid() + Path.GetExtension(file.FileName);
                            var path = Path.Combine(Server.MapPath("~/images"), ad);
                            file.SaveAs(path);
                        }
                    }
                }


                ogrenci.KayitTarihi       = DateTime.Parse(frm["kayitTarihi"]);
                ogrenci.FakulteBolumlerID = int.Parse(frm["bolumId"]);
                int             sayi            = ogrenciConcrete._ogrenciRepository.GetEntity().Where(x => x.FakulteBolumlerID == ogrenci.FakulteBolumlerID).Count() + 1;
                FakulteBolumler fakulteBolumler = fakulteBolumlerConcrete._fakulteBolumlerRepository.GetById(int.Parse(frm["bolumId"]));
                ogrenci.OgrenciNumarasi = ogrenci.KayitTarihi.Year.ToString() + ogrenci.EgitimDuzeyiID + ogrenci.OgrenimSekliID + fakulteBolumler.FakulteID + fakulteBolumler.BolumID + sayi;
                OgrenciBilgileri ogrenciBilgileri = new OgrenciBilgileri()
                {
                    Adres     = frm["adres"],
                    Fotograf  = ad,
                    OgrenciID = ogrenci.OgrenciID,
                    TCNo      = frm["tc"],
                    Telefon   = frm["telefon"],
                    MezunMu   = false
                };
                KullaniciIslemleri.OgrenciEkle(ogrenci, ogrenciBilgileri);

                return(RedirectToAction("Index"));
            }

            return(View(ogrenci));
        }
        private void btnGirisYap_Click(object sender, EventArgs e)
        {
            string KullaniciAdi = txtMail.Text.Trim();
            string Sifre        = txtSifre.Text.Trim();


            if (OnDenetleme() == true)
            {
                return;
            }
            errorProvider1.Clear();

            KullaniciIslemleri kullaniciIslemleri = new KullaniciIslemleri();
            Kullanici          kullanici          = kullaniciIslemleri.KullaniciLogin(KullaniciAdi, Sifre);

            if (kullanici != null)
            {
                if (kullanici.Adminmi == true)
                {
                    this.Hide();
                    AdminPage adminSayfasi = new AdminPage();
                    adminSayfasi.kullanici = kullanici;
                    adminSayfasi.ShowDialog();
                    this.Close();
                }
            }
            else
            {
                if (hak == 0)
                {
                    Application.Exit();
                }


                hak--;
                MessageBox.Show("Kullanıcı Adı veya Şifre Başarısız !! \nKalan deneme hakkı = " + hak.ToString(), "Hatalı Giriş",
                                MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
        public ActionResult Create([Bind(Include = "YoneticiID,TC,Ad,Soyad,KullaniciAdi,Sifre")] Yonetici yonetici, HttpPostedFileBase file)
        {
            if (ModelState.IsValid)
            {
                string ad = "";
                if (file != null)
                {
                    if (file.ContentLength > 0)
                    {
                        if (Path.GetExtension(file.FileName).ToLower() == ".jpg" || Path.GetExtension(file.FileName).ToLower() == ".png" || Path.GetExtension(file.FileName).ToLower() == ".gif" || Path.GetExtension(file.FileName).ToLower() == ".jpeg")
                        {
                            ad = Guid.NewGuid() + Path.GetExtension(file.FileName);
                            var path = Path.Combine(Server.MapPath("~/images"), ad);
                            file.SaveAs(path);
                        }
                    }
                }
                yonetici.Fotograf = ad;
                KullaniciIslemleri.YoneticiEkle(yonetici);
                return(RedirectToAction("Index"));
            }

            return(View(yonetici));
        }
Beispiel #15
0
 public Users GirisYap(LoginData d)
 {
     return(KullaniciIslemleri.GirisYap(d.UserName, d.UserPassword));
 }
Beispiel #16
0
 public string Kaydol(Users u)
 {
     return(KullaniciIslemleri.Kaydol(u));
 }