示例#1
0
        public EventViewModel retrieve(EventViewModel e)
        {
            dbSchoolsEntities db   = new dbSchoolsEntities();
            ApplicationUser   user = System.Web.HttpContext.Current.GetOwinContext().GetUserManager <ApplicationUserManager>().FindById(System.Web.HttpContext.Current.User.Identity.GetUserId());

            e.ProfId = db.Profesori.ToList().Find(x => x.Guid == user.Id).Id;

            return(e);
        }
示例#2
0
        public PrezentaViewModel retrieve(PrezentaViewModel e)
        {
            dbSchoolsEntities db   = new dbSchoolsEntities();
            ApplicationUser   user = System.Web.HttpContext.Current.GetOwinContext().GetUserManager <ApplicationUserManager>().FindById(System.Web.HttpContext.Current.User.Identity.GetUserId());

            e.StudentId = db.Studenti.ToList().Find(x => x.GUID == user.Id).Id;

            return(e);
        }