public ActionResult DetailUctu() { UcetDao ucetDao = new UcetDao(); Ucet ucet = ucetDao.GetByLogin(User.Identity.Name); return(View(ucet)); }
public ActionResult nastaveniUctu() { UcetDao ucetDao = new UcetDao(); Ucet ucet = ucetDao.GetByLogin(User.Identity.Name); return(PartialView(ucet)); }
public override string[] GetRolesForUser(string username) { UcetDao ucetDao = new UcetDao(); Ucet ucet = ucetDao.GetByLogin(username); if (ucet == null) { return(new string[] {}); } return(new string[] { ucet.RoleUzivatele.Identifikator }); }
public override bool IsUserInRole(string username, string roleName) { UcetDao ucetDao = new UcetDao(); Ucet ucet = ucetDao.GetByLogin(username); if (ucet == null) { return(false); } return(ucet.RoleUzivatele.Identifikator == roleName); }
public ActionResult prehledObjednavek() { UcetDao ucetDao = new UcetDao(); Ucet ucet = ucetDao.GetByLogin(User.Identity.Name); ObjednavkaDao objednavkaDao = new ObjednavkaDao(); IList <Objednavka> objednavky = objednavkaDao.GetByUzivatel(ucet.Id); ucet.Objednavky = objednavky; return(PartialView(objednavky)); }