예제 #1
0
        public IHttpActionResult GetById(int id)
        {
            KullaniciBLL kullaniciBusiness = new KullaniciBLL();
            var          model             = kullaniciBusiness.GetById(id);

            return(Ok(model));
        }
예제 #2
0
        public KullaniciDTO GetByUsername(string username)
        {
            KullaniciBLL kullaniciBusiness = new KullaniciBLL();
            var          model             = kullaniciBusiness.GetByUsername(username);

            return(model);
        }
예제 #3
0
        public KullaniciDTO GetByUsernamePassword(string username, string password)
        {
            KullaniciBLL kullaniciBusiness = new KullaniciBLL();
            var          model             = kullaniciBusiness.GetByUsernamePassword(username, password);

            return(model);
        }
예제 #4
0
        public IHttpActionResult Update(KullaniciDTO model)
        {
            KullaniciBLL kullaniciBusiness = new KullaniciBLL();

            kullaniciBusiness.Update(model);
            return(Ok());
        }
예제 #5
0
        public IHttpActionResult GetByTcknPassword(string tckn, string password)
        {
            KullaniciBLL kullaniciBusiness = new KullaniciBLL();
            var          model             = kullaniciBusiness.GetByTcknPassword(tckn, password);

            return(Ok(model));
        }
예제 #6
0
        public List <KullaniciDTO> Get(int sirketId)
        {
            KullaniciBLL kullaniciBusiness = new KullaniciBLL();
            var          model             = kullaniciBusiness.Get(sirketId);

            return(model);
        }
        public ActionResult Login(LoginModel model, string returnUrl)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    KullaniciBLL kullanici_BLL = new KullaniciBLL();

                    if (kullanici_BLL.KullaniciKontrolü(model))
                    {
                        new UserAuth().SignIn(model, Authentication);
                        return(RedirectToAction("Index", "Home"));
                    }
                    else
                    {
                        ViewBag.Message = "Hatalı Giriş";
                        return(View(model));
                    }
                }
                catch (Exception e)
                {
                    throw;
                }
            }
            return(View(model));
        }
예제 #8
0
        public void FillList(int mankenID)
        {
            DBHelper     dBHelper     = new DBHelper();
            KullaniciBLL kullaniciBLL = new KullaniciBLL();

            _manken = MankenDAL.MankenAdArama(mankenID);
            List <Adres> adress = new List <Adres>();

            Kullanici kullanici = kullaniciBLL.KullaniciGetir(mankenID);

            txtmail.Text            = kullanici.Mail;
            txtsifre.Text           = kullanici.Sifre;
            txtAdres.Text           = _manken.Adres[0].AcikAdres ?? " ";
            txtName.Text            = _manken.Ad;
            txtSurname.Text         = _manken.Soyad;
            txtTel1.Text            = _manken.Telefon[0] ?? " ";
            txtTel2.Text            = _manken.Telefon[1] ?? " ";
            cmbUlke.Text            = _manken.Adres[0].Ulke;
            cmbKategori.Text        = _manken.KategoriID.ToString();
            txtSehir.Text           = _manken.Adres[0].Sehir;
            cbAyakkabıNo.Text       = _manken.AyakkabiNo.ToString();
            cbBeden.Text            = _manken.Beden.ToString();
            nmKilo.Value            = _manken.Kilo;
            cbSacRengi.Text         = _manken.SacRengi;
            CbGözRengi.Text         = _manken.GözRengi;
            comboBox1.Text          = _manken.AKtifMi.ToString();
            chSehırDısıEvet.Checked = _manken.SehirDisiDurumu;
            chEhliyetEvet.Checked   = _manken.Ehliyet;
            txtLanguage.Text        = _manken.Dil[0] ?? " ";
            txtLanguage2.Text       = _manken.Dil[1] ?? " ";
            txtLanguage3.Text       = _manken.Dil[2] ?? " ";
            txtÖzellik.Text         = _manken.Ozellik;
        }
 public frmKullaniciGuncelle(Kullanici kullanici)
 {
     InitializeComponent();
     _kullanici       = kullanici;
     kullaniciListele = this.Owner as frmKullaniciListele;
     _kullaniciBLL    = new KullaniciBLL();
     _rol             = new RolBLL();
 }
        public IHttpActionResult DeleteByDoktor(int id)
        {
            // doktor delete işleminin ayrı metod içinde yapılmasının nedeni email gönderme işlemininde buradan tetiklenecek olmasıdır.
            RandevuBLL   randevuBusiness   = new RandevuBLL();
            var          randevu           = randevuBusiness.GetById(id);
            KullaniciBLL kullaniciBusiness = new KullaniciBLL();
            var          kullanici         = kullaniciBusiness.GetById((int)randevu.kullaniciID);

            randevuBusiness.Delete(id);
            MailGonder(randevu.doktorAdi, randevu.doktorSoyadi, kullanici.email, (DateTime)randevu.tarih, (TimeSpan)randevu.saat);
            return(Ok());
        }
        public IHttpActionResult Login(string tckn, string password)
        {
            KullaniciBLL kullaniciBusiness = new KullaniciBLL();
            var          model             = kullaniciBusiness.GetByTcknPassword(tckn, password);

            if (model != null)
            {
                FormsAuthentication.SetAuthCookie(model.TCKN, false);

                return(Ok(model));
            }
            else
            {
                return(NotFound());
            }
        }
예제 #12
0
        protected void LoginBtn_Click(object sender, EventArgs e) //Giris
        {
            try
            {
                string mail  = txtEMail.Text;
                string sifre = txtSifre.Text;

                List <Kullanici> kullanici = KullaniciBLL.Select(new Expression <Func <Kullanici, bool> >[] { p => p.Aktif == true, p => p.EMail == mail }).ToList();

                if (kullanici.Count == 0)
                {
                    lblHata.Visible = true;
                    lblHata.Text    = "Hatalı Email Lütfen Tekrar Deneyin..";
                    return;
                }
                else

                //Bu şekildedemyapılabilir şifre kontrolü

                //if (sifre != kullanici[0].Sifre)
                //{
                //    lblHata.Visible = true;
                //    lblHata.Text = "Hatalı Şifre Lütfen Tekrar Deneyin..";
                //    return;
                //}

                if (!txtSifre.Text.Equals(kullanici[0].Sifre))
                {
                    lblHata.Visible = true;
                    lblHata.Text    = "Hatalı Şifre Lütfen Tekrar Deneyin..";
                    return;
                }

                Response.Redirect("yemekcesitleri.aspx");
            }
            catch (Exception ex)
            {
                lblHata.Visible = true;
                lblHata.Text    = "Bir Sorun Oluştu Daha Sonra Tekrar Deneyin..";
                return;
            }
        }
예제 #13
0
            public override void OnActionExecuting(ActionExecutingContext filterContext)
            {
                Kullanici model = HttpContext.Current.Session["Kullanici"] as Kullanici;
                //int uid;
                //if (HttpContext.Current.User.Identity.Name=="")
                //{
                //    uid = 0;
                //}
                //else
                //{
                //    uid = Convert.ToInt32(HttpContext.Current.User.Identity.Name);
                //}

                KullaniciBLL _kullanici = new KullaniciBLL();

                if (!model.KullaniciYetki.Any(x => x.YetkiID == YetkiId))
                {
                    filterContext.Result = new RedirectResult("/Home/YetkisizErisim");
                }
            }
예제 #14
0
 public frmLogin()
 {
     InitializeComponent();
     _kullaniciBLL = new KullaniciBLL();
 }
 public frmKullaniciRaporu()
 {
     InitializeComponent();
     adminPaneli   = this.MdiParent as frmAdminPaneli;
     _kullaniciBLL = new KullaniciBLL();
 }
예제 #16
0
 public frmKayit()
 {
     InitializeComponent();
     kullaniciBLL = new KullaniciBLL();
 }
예제 #17
0
 public frmLogin()
 {
     InitializeComponent();
     _userController = new KullaniciBLL();
 }
예제 #18
0
        public void Add(Kullanici model)
        {
            KullaniciBLL kullaniciBusiness = new KullaniciBLL();

            kullaniciBusiness.Add(model);
        }
예제 #19
0
        public void Delete(int id)
        {
            KullaniciBLL kullaniciBusiness = new KullaniciBLL();

            kullaniciBusiness.Delete(id);
        }
예제 #20
0
 public frmKullaniciListele()
 {
     InitializeComponent();
     _kullaniciBLL = new KullaniciBLL();
 }