Exemplo n.º 1
0
        public IResult Delete(int id)
        {
            var value = _adminDal.Get(x => x.Id == id);

            _adminDal.Delete(value);
            return(new SuccessResult());
        }
Exemplo n.º 2
0
        public IDataResult <Admin> GetByAdmin(int id)
        {
            var result = _adminDal.Get(admin => admin.UserId == id);


            return(new SuccessDataResult <Admin>(result));
        }
Exemplo n.º 3
0
 public Admin Get(string adminName, string adminPassword)
 {
     return(_adminDal.Get(new Admin()
     {
         AdminName = adminName, AdminPassword = adminPassword
     }));
 }
Exemplo n.º 4
0
        public Admin GetByID(int id)
        {
            var adm = _adminDal.Get(x => x.AdminID == id);

            adm.AdminUserName = lm.Decrypt(adm.AdminUserName);
            return(adm);
            //return _adminDal.Get(x => x.AdminID == id);
        }
Exemplo n.º 5
0
 public Admin Get(Expression <Func <Admin, bool> > filter, params string[] includeList)
 {
     try
     {
         return(adminDal.Get(filter, includeList));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 6
0
        public Admin Get(Admin admin)
        {
            if (admin != null)
            {
                Admin loginAdmin = _adminDal.Get(x => x.Username.Equals(admin.Username) && x.Password.Equals(admin.Password));

                if (loginAdmin != null)
                {
                    return(loginAdmin);
                }
            }

            return(null);
        }
Exemplo n.º 7
0
        public ActionResult Index(Uye uye, Admin admin)
        {
            var kullanici      = _uyeDal.Get(x => x.Email == uye.Email && x.Sifre == uye.Sifre);
            var adminkullanici = _adminDal.Get(x => x.Email == admin.Email && x.Sifre == admin.Sifre);

            if (kullanici != null)
            {
                FormsAuthentication.SetAuthCookie(kullanici.Email, false);
                return(RedirectToAction("Index", "Profilim"));
            }
            if (adminkullanici != null)
            {
                //FormsAuthentication.SetAuthCookie(kullanici.Email, false);
                return(RedirectToAction("Index", "Admin"));
            }
            else
            {
                return(View());
            }
        }
Exemplo n.º 8
0
        public IDataResult <Admin> GetAdmin(int adminId)
        {
            var model = _adminDal.Get(i => i.Id == adminId);

            return(new SuccessDataResult <Admin>(model, Messages.Success));
        }
Exemplo n.º 9
0
 public Admin GetAdmin(string username, string password)
 {
     return(_adminDal.Get(x => x.AdminUserName == username && x.AdminPassword == password));
 }
Exemplo n.º 10
0
 public Admin GetAdmin(string mail, string password)
 {
     return(_adminDal.Get(x => x.AdminUserName == mail && x.AdminPassword == password));
 }
Exemplo n.º 11
0
 public object GetbyAdminUsername(Admin p)
 {
     return(_adminDal.Get(x => x.AdminUsername == p.AdminUsername && x.AdminPassword == p.AdminPassword));
 }
Exemplo n.º 12
0
 public Admin Get(Admin admin)
 {
     return(_dal.Get(admin));
 }
Exemplo n.º 13
0
 public Admin GetById(int id)
 {
     return(_adminDal.Get(a => a.AdminId == id));
 }
Exemplo n.º 14
0
 public Admin Get(Admin admin)
 {
     return(_adminDal.Get(x => x.AdminUserName == admin.AdminUserName && x.AdminPassword == admin.AdminPassword));
 }
Exemplo n.º 15
0
 public Admin GetById(int id)
 {
     return(_adminDal.Get(x => x.Id == id));
 }
 public Admin Get(Expression <Func <Admin, bool> > filter = null)
 {
     return(_adminDal.Get(filter));
 }
 public Admin Get(Expression <Func <Admin, bool> > filter)
 {
     return(dal.Get(filter));
 }
Exemplo n.º 18
0
 public IDataResult <Admin> GetById(int adminId)
 {
     return(new SuccessDataResult <Admin>(_adminDal.Get(a => a.Id == adminId)));
 }
Exemplo n.º 19
0
        public bool IsExist(AdminDto admin)
        {
            var ad = _adminDal.Get(x => x.AdminUserName == admin.UserName);

            return(VerifyPasswordHash(admin.Password, ad.PasswordHash, ad.PasswordSalt));
        }
Exemplo n.º 20
0
        public void Delete(int id)
        {
            var value = _adminDal.Get(x => x.Id == id);

            _adminDal.Delete(value);
        }
        public void Delete(int adminId)
        {
            var admin = _adminDal.Get(i => i.Id == adminId);

            _adminDal.Delete(admin);
        }
Exemplo n.º 22
0
 public Admin FindByUsernameAndEmail(string username, string email)
 {
     return(_adminDal.Get(i => i.Username == username && i.Email == email));
 }
 public IDataResult <Admin> Get(Expression <Func <Admin, bool> > filter)
 {
     return(_adminDal.Get(filter));
 }
Exemplo n.º 24
0
 public Admin Get(Admin entity)
 {
     return(_adminDal.Get(p => p.AdminId == entity.AdminId));
 }
Exemplo n.º 25
0
 public Admin GetByID(int id)
 {
     return(_adminDal.Get(x => x.AdminID == id));
 }
Exemplo n.º 26
0
 public Admin Get(string kullaniciAdi)
 {
     return(_adminDal.Get(x => x.KullaniciAdi == kullaniciAdi));
 }