private void SaveButton_Click(object sender, EventArgs e)
        {
            project= new Project()
                         {
                             Company = new Company(){Id = Guid.NewGuid(),Name=CompanyNameTextBox.Text,},
                             Name = NewProjectNameTextBox.Text,
                             NumberOfSessions = 1,

                         };

            inputGroupBox.Visible = false;
            StartButton.Visible = true;
        }
Exemple #2
0
        public Card CreateCard(Card card, Project project, User user)
        {
            var newcard = new Card
            {
                Title = card.Title,
                Size = card.Size,
                Priority = card.Priority,
                Deadline = card.Deadline,
                Details = card.Details,
                Project = project,
                Color = "grey",
                Status = CardStatus.New,
                AssignedTo = user

            };

            var lastCard = project.GetCards().OrderByDescending(x => x.CardNumber).Take(1).FirstOrDefault();

            newcard.CardNumber = lastCard == null ? 1 : lastCard.CardNumber + 1;

            return newcard;
        }
 private void ExistingProjectSelectButton_Click(object sender, EventArgs e)
 {
     inputGroupBox.Visible = false;
     project = _projectService.GetProjectFromName(ExistingProjectSelectBox.Text);
     timer = new TimeRecord();
 }
Exemple #4
0
 public IEnumerable<Card> GetCards(Project project)
 {
     return _session.CreateCriteria<Card>()
        .SetFetchMode("GetTasks", FetchMode.Eager)
        .Add(NHibernate.Criterion.Expression.Eq("Project", project))
         .List<Card>();
     //return _cardRepository.Query().Where(c => c.Project == project);
 }
Exemple #5
0
 public IEnumerable<Card> GetCompleteCards(Project project)
 {
     return _session.CreateCriteria<Card>()
        .SetFetchMode("GetActivities", FetchMode.Eager)
        .Add(Restrictions.Eq("Project", project))
        .Add(Restrictions.IsNotNull("DateCompleted"))
         .List<Card>();
 }