예제 #1
0
        public static void ReadMemberReport()
        {
            HeaderMessage.EnterNameOfMember();
            string name = ValidInputValue.GetName();

            foreach (var member in ReaderMembersAndReports.members)
            {
                if (member.Name == name)
                {
                    StandardMessage.ReportForPeriod();

                    foreach (var report in ReaderMembersAndReports.reportOfMembers)
                    {
                        string[] dataOfReport = report.Split(new char[] { ',' });

                        if (dataOfReport[1].Contains(member.Name))
                        {
                            CalcSalary.GetSalaryOfMember(member);
                        }
                    }
                    StandardMessage.MemberHoursAndSalaryForPeriod(member);
                    return;
                }
            }

            ErrorMessage.MemberIsNotExists();
            ReadMemberReport();
        }
예제 #2
0
        public static void ReadReportAndSalary(IMember member)
        {
            StandardMessage.ReportForPeriod();

            CalcSalary.GetSalaryOfMember(member);

            StandardMessage.TotalHoursAndSalary(member);
        }
예제 #3
0
        static public void ReadAllReport()
        {
            StandardMessage.ReportForPeriod();

            foreach (var member in ReaderMembersAndReports.members)
            {
                foreach (var report in ReaderMembersAndReports.reportOfMembers)
                {
                    string[] dataOfReport = report.Split(new char[] { ',' });

                    if (dataOfReport[1].Contains(member.Name))
                    {
                        CalcSalary.GetSalaryOfMember(member);
                    }
                }
                StandardMessage.MemberHoursAndSalaryForPeriod(member);
            }
        }