//makes a object with all the info for the basic layout public Models.Layout GetLayoutInfo(string UNI, Dal.AD ad, Dal.SQL sql) { Models.Person person = ad.GetUserInfo(UNI); string name = person.Name; bool admin = person.Admin; bool webAdmin = sql.IsWebAdmin(UNI); List <Models.Group> groupList = sql.GetGroupListForUser(UNI); return(new Models.Layout(groupList, name, admin, webAdmin)); }
//makes a person with all information of the user public Models.Person GetFullPerson(string UNI, Dal.AD ad, Dal.SQL sql) { Models.Person p = sql.GetUserInfo(UNI); string uni = UNI; List <Models.Group> groups = sql.GetGroupListForUser(UNI); List <Models.Course> courses = p.Courses; p = ad.GetUserInfo(UNI); string name = p.Name; string studing = p.Studing; bool admin = p.Admin; Models.Person person = new Models.Person(name, UNI, studing, courses, groups, admin); return(person); }