Esempio n. 1
0
 void NormalizeDate(ContentValues values)
 {
     // normalize the date value
     if (values.ContainsKey(WeatherContract.Weather.ColumnDate))
     {
         long dateValue = values.GetAsLong(WeatherContract.Weather.ColumnDate);
         values.Put(WeatherContract.Weather.ColumnDate, WeatherContract.NormalizeDate(dateValue));
     }
 }
Esempio n. 2
0
        private void PersistDateTime(string name, ContentValues values)
        {
            if (values == null)
            {
                throw new InvalidOperationException(" values is null!!!");
            }
            String kDatetime      = values.GetAsString(PREF_KEY);
            long   vDateTimeTicks = values.GetAsLong(PREF_VALUE);

            GetDPreference(name).SetPrefLong(kDatetime, vDateTimeTicks);
        }
Esempio n. 3
0
        private void PersistLong(String name, ContentValues values)
        {
            if (values == null)
            {
                throw new InvalidOperationException(" values is null!!!");
            }
            String kLong = values.GetAsString(PREF_KEY);
            long   vLong = values.GetAsLong(PREF_VALUE);

            GetDPreference(name).SetPrefLong(kLong, vLong);
        }