Пример #1
0
        public static List <Report> GetAllReportsOfUnderlings(Guid id)
        {
            var res = new List <Report>();

            foreach (var underlingId in BDStaffController.GetEmployee(id).Underlings)
            {
                res.AddRange(GetAllReportsOfEmployee(underlingId));
            }

            return(res);
        }
Пример #2
0
        public override string ToString()
        {
            string s = "";

            foreach (var task in SolvedTasks)
            {
                s += task.Name + '\n';
            }
            return("Отчет\n" +
                   $"Создатель отчета - {BDStaffController.GetEmployee(Owner).Name}\n" +
                   $"Описание - {Description}\n" +
                   $"Выполненные задачи:\n {s}");
        }
Пример #3
0
        private void Save_Click(object sender, RoutedEventArgs e)
        {
            Guid idEmplSprint;

            if (!Guid.TryParse(EId.Text, out idEmplSprint))
            {
                MessageBox.Show("Неправильный формат id");
            }
            else
            {
                var descSprintRep = TDisc.Text;
                BDReportsController.CreateSprintReport(idEmplSprint, descSprintRep);
                if (BDStaffController.GetEmployee(idEmplSprint).IsTeamLead)
                {
                    MessageBox.Show("Отчет за спринт\n" +
                                    BDReportsController.GetSprintReport());
                    Environment.Exit(0);
                }
            }
        }