public AnnouncementQueryResult GetLesonPlansOrderedByClassName(LessonPlansQuery query)
        {
            var ps = new Dictionary <string, object>
            {
                ["fromClassName"] = query.FromClassName,
                ["toClassName"]   = query.ToClassName
            };

            return(InternalGetAnnouncements("spGetLessonPlansOrderedByClassName", query, ps));
        }
 public AnnouncementQueryResult GetLessonPlansOrderedByDate(LessonPlansQuery query)
 {
     return(InternalGetAnnouncements("spGetLessonPlansOrderedByDate", query, null));
 }
        protected virtual AnnouncementQueryResult InternalGetAnnouncements(string procedureName, LessonPlansQuery query, IDictionary <string, object> additionalParams)
        {
            if (additionalParams == null)
            {
                additionalParams = new Dictionary <string, object>();
            }

            additionalParams.Add("schoolYearId", query.ClassId.HasValue ? (int?)null : schoolYearId);
            additionalParams.Add("classId", query.ClassId);

            var res = InternalGetAnnouncements <LessonPlansQuery>(procedureName, query, additionalParams);

            return(res);
        }