Ejemplo n.º 1
0
        public string Print()
        {
            var maximumWorkingDaysString = MaximumWorkingDays == int.MaxValue ? "/" : MaximumWorkingDays.ToString();
            var MinimumWorkingDaysString = MinimumWorkingDays < 1 ? "/" : MinimumWorkingDays.ToString();
            var minimumDateString        = MinimumDate.Equals(DateTime.MinValue) ? "/         " : MinimumDate.ToString("dd/MM/yyy");
            var deadlineDateString       = DeadlineDate.Equals(DateTime.MaxValue) ? "/         " : DeadlineDate.ToString("dd/MM/yyy");

            string CourseCodeWhitespace  = EditorUtilities.GenerateTrailingWhiteSpace(CourseCode, 16);
            string TeacherCodeWhitespace = EditorUtilities.GenerateTrailingWhiteSpace(TeacherGroup.ToString(), 30);



            string line;

            line =
                CourseCode + CourseCodeWhitespace +
                TeacherGroup + TeacherCodeWhitespace + "\t" +
                LectureSize + " \t" + "\t" +
                MinimumWorkingDaysString + "\t" + "\t" +
                StudentSize + "\t" + "\t" + "\t" +
                minimumDateString + "\t" +
                deadlineDateString + "\t" +
                maximumWorkingDaysString + "\t" + "\t" + "\t" +
                IsPcNeeded + "\t" + "\t" + "\t" +
                HoursPerDay;

            return(line);
        }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (obj is EntryCriteria)
            {
                var other = obj as EntryCriteria;

                if (!PageNumber.Equals(other.PageNumber))
                {
                    return(false);
                }

                if (!PageSize.Equals(other.PageSize))
                {
                    return(false);
                }

                if (Tag == null && other.Tag != null)
                {
                    return(false);
                }

                if (Tag != null)
                {
                    if (other.Tag == null || !Tag.Equals(other.Tag))
                    {
                        return(false);
                    }
                }

                if (Category == null && other.Category != null)
                {
                    return(false);
                }

                if (Category != null)
                {
                    if (other.Category == null || !Category.Equals(other.Category))
                    {
                        return(false);
                    }
                }

                if (MinimumDate == null && other.MinimumDate != null)
                {
                    return(false);
                }

                if (MinimumDate != null)
                {
                    if (other.MinimumDate == null || !MinimumDate.Equals(other.MinimumDate))
                    {
                        return(false);
                    }
                }

                if (MaximumDate == null && other.MaximumDate != null)
                {
                    return(false);
                }

                if (MaximumDate != null)
                {
                    if (other.MaximumDate == null || !MaximumDate.Equals(other.MaximumDate))
                    {
                        return(false);
                    }
                }

                return(true);
            }

            return(false);
        }