public EventDetailsView(CalendarEvents _calendarEvents) { InitializeComponent(); eventsDetailsViewModel = new EventsDetailsViewModel(_calendarEvents); BindingContext = eventsDetailsViewModel; eventsDb = new EventsDb(); }
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); }
public int Update(CalendarEvents entity) { return(_connection.Update(entity)); }
public int Insert(CalendarEvents entity) { return(_connection.Insert(entity)); }