Beispiel #1
0
        /// <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;
        }
Beispiel #2
0
 /// <summary>
 /// The get users for project roles.
 /// </summary>
 /// <param name="projectId">
 /// The project id.
 /// </param>
 /// <returns>
 /// The <see cref="UsersListForProject"/>.
 /// </returns>
 public UsersListForProject GetUsersForProjectRoles(int projectId)
 {
     var selectioncontext =
         new ScrumNotesDbClassDataContext(
             ConfigurationManager.ConnectionStrings["ScrumNotesCombinerConnectionString"].ToString());
     List<UsersViewListForProject> ulfp1;
     ulfp1 = (from u in selectioncontext.Users
              from r in selectioncontext.Roles
              where r.ProjectId.Equals(projectId)
              select
                  new UsersViewListForProject
                      {
                          Id = u.Id,
                          Allias = u.Allias,
                          ADusername = u.ADUserName,
                          Email = u.Email,
                          Role = r.Name
                      }).ToList();
     var ulfp2 = new UsersListForProject(ulfp1);
     selectioncontext.Dispose();
     return ulfp2;
 }