Пример #1
0
 public static bool Delete(Registratie reg)
 {
     if (reg == null) return false;
     _table.DeleteOnSubmit(reg);
     return SubmitChanges();
 }
Пример #2
0
 public static bool Add(Registratie reg)
 {
     _table.InsertOnSubmit(reg);
     return SubmitChanges();
 }
Пример #3
0
 public static bool CheckIn(string location, string modeOfTransport, double dist)
 {
     if (IsLoggedIn()) return false;
     var reg = new Registratie(location, modeOfTransport, dist);
     return Add(reg);
 }
Пример #4
0
 private void SetLabels()
 {
     _selectedReg = _registraties[lbRegs.SelectedIndex];
     dtCheckIn.Value = _selectedReg.CheckIn;
     dtCheckOut.Value = _selectedReg.CheckOut ?? DateTime.Now;
     lblLocation.Text = _selectedReg.Location;
     lblTransportValue.Text = _selectedReg.ModeOfTransport == "" ? "n.v.t" : _selectedReg.ModeOfTransport;
 }