public Boolean FreeSlot(string slotid, DateTime tout, decimal amount) { try { return(ParkingEntryService.FreeSlot(slotid, tout, amount)); } catch (Exception ex) { throw ex; } }
public decimal GetAmount(string entryid, DateTime tout) { try { return(ParkingEntryService.GetTotalAmount(entryid, tout)); } catch (Exception ex) { throw ex; } }
public ParkingEntryViewModel(string slotid) { Entries = new ObservableCollection <ParkingEntry>(); try { ParkingEntryEntity e = ParkingEntryService.GetCurrentParkingEntryInfo(slotid); Entries.Add(new ParkingEntry(e)); } catch (Exception ex) { throw ex; } }
public Boolean AddParkingEntry() { if (SlotID == null) { throw new Exception("Slot ID not set"); } if (VehicleNumber == 0) { throw new Exception("Vehicle number not provided"); } TimeIn = DateTime.Now; try { var result = ParkingEntryService.AddParkingEntry(SlotID, VehicleNumber, TimeIn); return(result); } catch (Exception ex) { throw ex; } }