Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Master.RequiresAuthentication    = true;
            Master.Body.Attributes["class"] += " account ";

            var notificationsData = Core.Entities.Notification.List(PageSize: 10, UserId: Master.CurrentUser.Id, GroupId: Core.Entities.NotificationGroup.Seeking);

            Notifications.RecordCount = notificationsData.Count;
            Notifications.DataSource  = notificationsData;
            Notifications.DataBind();

            var bookingData = Core.Entities.Booking.List(PageSize: 10, UserId: Master.CurrentUser.Id);

            Bookings.RecordCount = bookingData.Count;
            Bookings.DataSource  = bookingData;
            Bookings.DataBind();

            var startDate = DateTime.Today.StartOfDay().AddDays(-(DateTime.Today.Day - 1));

            MonthSummary.Text   = "$" + Core.Entities.Booking.SeekingSummary(Master.CurrentUser.Id, startDate).ToString("N2");
            AllTimeSummary.Text = "$" + Core.Entities.Booking.SeekingSummary(Master.CurrentUser.Id).ToString("N2");
        }