static TimeExpirationLot GetTimer(int id) { TimeExpirationLot findedTimer = timers.Where(p => p.LotId == id).SingleOrDefault(); if (findedTimer == null) { return(null); } return(findedTimer); }
static void DeleteLot(int id) { if (!isLotTimerExists(id)) { return; } TimeExpirationLot findedTimer = timers.Where(p => p.LotId == id).SingleOrDefault(); timers.Remove(findedTimer); }
static bool isLotTimerExists(int LotId) { TimeExpirationLot findedTimer = timers.Where(p => p.LotId == LotId).SingleOrDefault(); if (findedTimer == null) { return(false); } return(true); }