예제 #1
0
        public ActionResult DetailUctu()
        {
            UcetDao ucetDao = new UcetDao();
            Ucet    ucet    = ucetDao.GetByLogin(User.Identity.Name);

            return(View(ucet));
        }
예제 #2
0
        public ActionResult nastaveniUctu()
        {
            UcetDao ucetDao = new UcetDao();
            Ucet    ucet    = ucetDao.GetByLogin(User.Identity.Name);

            return(PartialView(ucet));
        }
예제 #3
0
        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 });
        }
예제 #4
0
        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);
        }
예제 #5
0
        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));
        }