コード例 #1
0
        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;
        }
コード例 #2
0
ファイル: ICardService.cs プロジェクト: rauhryan/kokugen
        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;
        }
コード例 #3
0
 private void ExistingProjectSelectButton_Click(object sender, EventArgs e)
 {
     inputGroupBox.Visible = false;
     project = _projectService.GetProjectFromName(ExistingProjectSelectBox.Text);
     timer = new TimeRecord();
 }
コード例 #4
0
ファイル: ICardService.cs プロジェクト: rauhryan/kokugen
 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);
 }
コード例 #5
0
ファイル: ICardService.cs プロジェクト: rauhryan/kokugen
 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>();
 }