public EventDetailsView(CalendarEvents _calendarEvents)
 {
     InitializeComponent();
     eventsDetailsViewModel = new  EventsDetailsViewModel(_calendarEvents);
     BindingContext         = eventsDetailsViewModel;
     eventsDb = new EventsDb();
 }
Esempio n. 2
0
        private void OnAddClicked(object sender, EventArgs e)
        {
            EventsDb eventsDb = new EventsDb();

            CalendarEvents calendarEvents = new CalendarEvents();

            calendarEvents.Id          = eventsDb.GetAll().Count() == rowCount ? rowCount : eventsDb.GetAll().Count() + 1;
            calendarEvents.Title       = eventTitle.Text.Trim();
            calendarEvents.Description = description.Text.Trim();
            calendarEvents.Date        = eventDate.Text.Trim();
            calendarEvents.RowColor    = "#2196F3";

            eventsDb.Insert(calendarEvents);
        }
Esempio n. 3
0
 public int Update(CalendarEvents entity)
 {
     return(_connection.Update(entity));
 }
Esempio n. 4
0
 public int Insert(CalendarEvents entity)
 {
     return(_connection.Insert(entity));
 }