/// <summary> /// Initializes a new instance of the <see cref="NewProject"/> class. /// </summary> /// <param name="create"> /// The create. /// </param> /// <param name="userlist"> /// The userlist. /// </param> /// <param name="currentaction"> /// The currentaction. /// </param> /// <param name="ssl"> /// The ssl. /// </param> /// <param name="ulfp"> /// The ulfp. /// </param> public NewProject( bool create, UsersList userlist, string currentaction, SchedulingStatusList ssl, UsersListForProject ulfp) { if (create == false) { this.ListForProjectAdmin = userlist; } this.SchedulingStatusList = ssl; this.action = currentaction; this.UsersListForProject = ulfp; }
/// <summary> /// The get users list. /// </summary> /// <returns> /// The <see cref="UsersList"/>. /// </returns> public UsersList GetUsersList() { // Fetching users for Project Administrator listbox var selectioncontext = new ScrumNotesDbClassDataContext( ConfigurationManager.ConnectionStrings["ScrumNotesCombinerConnectionString"].ToString()); var userslist = new UsersList(); List<UserForModel> p2 = (from p in selectioncontext.Users select new UserForModel { ADUsername = p.ADUserName, Allias = p.Allias, Email = p.Email, Id = p.Id }).ToList(); // ADUserName = p.ADUserName, Allias = p.Allias, Email = p.Email, Id = p.Id}).ToList(); var p1 = new UsersList(); p1.UsersViewList = p2; selectioncontext.Dispose(); return p1; }
/// <summary> /// The get users in project. /// </summary> /// <param name="id"> /// The id. /// </param> /// <returns> /// The <see cref="UsersList"/>. /// </returns> public UsersList GetUsersInProject(int id) { var selectioncontext = new ScrumNotesDbClassDataContext( ConfigurationManager.ConnectionStrings["ScrumNotesCombinerConnectionString"].ToString()); List<UserForModel> p1 = (from u in selectioncontext.Users from r in selectioncontext.Roles where r.ProjectId.Equals(id) select new UserForModel { Allias = u.Allias }).ToList(); var userlist = new UsersList(); userlist.UsersViewList = p1; selectioncontext.Dispose(); return userlist; }