Example #1
0
        public bool addShake(string name, string time)
        {
            var model = new Shake()
            {
                id        = Guid.NewGuid(),
                username  = name,
                shakeTime = DateTime.Parse(time),
            };

            if (ShakeAccess.Exist(name))
            {
                return(ShakeAccess.update(model));
            }
            return(ShakeAccess.Add(model));
        }
Example #2
0
 public List <Shake> getShakes(string name, string time)
 {
     ShakeAccess.DelOverdueData(DateTime.Parse(time));
     return(ShakeAccess.GetShakes(name, DateTime.Parse(time)));
 }