Esempio n. 1
0
        private static void AddCourseTable(SimplePageVM model, List <System.Tuple <Course, decimal> > courses,
                                           bool showPrice, bool isEng = false)
        {
            var courseTitle = isEng ? "Course" : "Курс";
            var hourTitle   = isEng ? "Hours" : "Часы";
            var priceTitle  = isEng ? "Price" : "Цена БО";

            var table = H.table[H.Head(courseTitle, hourTitle, showPrice ? priceTitle : null),
                                courses.OrderBy(x => x.Item1.GetNameOrEng(isEng))
                                .Select(x => H.Row2(H.td[Links.CourseLink(null, x.Item1.UrlName, x.Item1.GetNameOrEng(isEng))].Style("text-align:left;"),
                                                    (int)x.Item1.BaseHours,
                                                    showPrice ? x.Item2.MoneyString() : null))].Class("table");

            model.Controls.Add(
                new SimplePageVM.Control(table.ToString()));
        }