int ReminderTime; int cacheExparationTime; string CellPhone; ObjCacheManager = CacheFactory.GetCacheManager("parkingCache"); m_CacheInterval = TimerCache.CacheInterval; dt = DL.DataLayer.LoadToCache(SP_LOAD_CACHE, m_CacheInterval.ToString()).Tables[0];//UniParkDAL.DalManager.GetDataTable(SP_LOAD_CACHE, sqlParams); if (dt != null && dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { ReminderTime = Convert.ToInt32(dr["ReminderTime"]); CellPhone = CleanPhoneNumber(dr["Mobile"].ToString(), "972"); TimeSpan DateDiff = DateTime.Parse(dr["IntervalEnd"].ToString()).Subtract(DateTime.Now); string Minutes = DateDiff.Minutes.ToString(); if (ReminderTime > 0) { cacheExparationTime = ReminderTime; ReminderTime = Convert.ToInt32(Minutes) - ReminderTime; m_message = string.Format("your parking will end in {0} minutes", ReminderTime.ToString()); m_AbsoulteTime = new AbsoluteTime(TimeSpan.FromMinutes(cacheExparationTime)); ObjCacheManager.Add(CellPhone, m_message, CacheItemPriority.Normal, new CallService(), m_AbsoulteTime); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)