Esempio n. 1
0
 public Boolean FreeSlot(string slotid, DateTime tout, decimal amount)
 {
     try
     {
         return(ParkingEntryService.FreeSlot(slotid, tout, amount));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 2
0
 public decimal GetAmount(string entryid, DateTime tout)
 {
     try
     {
         return(ParkingEntryService.GetTotalAmount(entryid, tout));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 3
0
 public ParkingEntryViewModel(string slotid)
 {
     Entries = new ObservableCollection <ParkingEntry>();
     try
     {
         ParkingEntryEntity e = ParkingEntryService.GetCurrentParkingEntryInfo(slotid);
         Entries.Add(new ParkingEntry(e));
     } catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 4
0
        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;
            }
        }