/// <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 scheduling statuses. /// </summary> /// <param name="projectId"> /// The project id. /// </param> /// <returns> /// The <see cref="SchedulingStatusList"/>. /// </returns> public SchedulingStatusList GetSchedulingStatuses(int projectId) { var selectioncontext = new ScrumNotesDbClassDataContext( ConfigurationManager.ConnectionStrings["ScrumNotesCombinerConnectionString"].ToString()); List<SchedulingStatusViewList> ssl1 = (from s in selectioncontext.ScheduleStatus from p in selectioncontext.Projects where p.Id.Equals(projectId) select new SchedulingStatusViewList { Id = s.Id, Allias = s.Allias, DayOfWeek = s.DayOfWeek.ToString(), DayOfMonth = s.DayOfMonth.ToString(), ScheduledTime = s.ScheduledTime.ToString(), ProjectName = p.Allias }).ToList(); var ssl2 = new SchedulingStatusList(ssl1); selectioncontext.Dispose(); return ssl2; }