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