public void Update (Kreyos_User_Activities p_activity)
 {
     this.ActivityBestLap = p_activity.ActivityBestLap;
     this.ActivityAvgLap = p_activity.ActivityAvgLap;
     this.ActivityCurrentLap = p_activity.ActivityCurrentLap;
     this.ActivityAvgPace = p_activity.ActivityAvgPace;
     this.ActivityPace = p_activity.ActivityPace;
     this.ActivityTopSpeed = p_activity.ActivityTopSpeed;
     this.ActivityAvgSpeed = p_activity.ActivityAvgSpeed;
     this.ActivitySpeed = p_activity.ActivitySpeed;
     this.ActivityElevation = p_activity.ActivityElevation;
     this.ActivityAltitude = p_activity.ActivityAltitude;
     this.ActivityMaxHeart = p_activity.ActivityMaxHeart;
     this.AvgActivityHeart = p_activity.AvgActivityHeart;
     this.ActivityHeart = p_activity.ActivityHeart;
     this.Activity_ID = p_activity.Activity_ID;
     this.Sport_ID = p_activity.Sport_ID;
     this.KreyosUserID = p_activity.KreyosUserID;
     this.ActivityCalories = p_activity.ActivityCalories;
     this.ActivitySteps = p_activity.ActivitySteps;
     this.Coordinates = p_activity.Coordinates;
     this.ActivityDistance = p_activity.ActivityDistance;   
 }
예제 #2
0
 public void Update(Kreyos_User_Activities p_activity)
 {
     this.ActivityBestLap    = p_activity.ActivityBestLap;
     this.ActivityAvgLap     = p_activity.ActivityAvgLap;
     this.ActivityCurrentLap = p_activity.ActivityCurrentLap;
     this.ActivityAvgPace    = p_activity.ActivityAvgPace;
     this.ActivityPace       = p_activity.ActivityPace;
     this.ActivityTopSpeed   = p_activity.ActivityTopSpeed;
     this.ActivityAvgSpeed   = p_activity.ActivityAvgSpeed;
     this.ActivitySpeed      = p_activity.ActivitySpeed;
     this.ActivityElevation  = p_activity.ActivityElevation;
     this.ActivityAltitude   = p_activity.ActivityAltitude;
     this.ActivityMaxHeart   = p_activity.ActivityMaxHeart;
     this.AvgActivityHeart   = p_activity.AvgActivityHeart;
     this.ActivityHeart      = p_activity.ActivityHeart;
     this.Activity_ID        = p_activity.Activity_ID;
     this.Sport_ID           = p_activity.Sport_ID;
     this.KreyosUserID       = p_activity.KreyosUserID;
     this.ActivityCalories   = p_activity.ActivityCalories;
     this.ActivitySteps      = p_activity.ActivitySteps;
     this.Coordinates        = p_activity.Coordinates;
     this.ActivityDistance   = p_activity.ActivityDistance;
 }
예제 #3
0
 //~~~insert new activity
 public void InsertActivity (Kreyos_User_Activities p_activity)
 {
     using (var dbConn = new SQLiteConnection(this.KreyosDBPath))
     {
         dbConn.RunInTransaction(() =>
         {
             dbConn.Insert(p_activity);
         });
     }
 } 
예제 #4
0
        //~~~update existing activity
        public void UpdateActivity (Kreyos_User_Activities p_activity)
        {
            using (var dbConn = new SQLiteConnection(this.KreyosDBPath))
            {
                var existingActivity = dbConn.Query<Kreyos_User_Activities>("select * from Kreyos_User_Activities where CreatedTime =" + p_activity.CreatedTime).FirstOrDefault();
                if (existingActivity != null)
                {
                    existingActivity.Update(p_activity);                             

                    dbConn.RunInTransaction(() =>
                    {
                        dbConn.Update(existingActivity);
                    });
                }
            }
        }
예제 #5
0
 public void AddActivity(Kreyos_User_Activities p_act)
 {
     m_userActivities.Add(p_act);
 }
예제 #6
0
        /****************************************************************
         * Public Functionalities
         **/
        public void AddActivities (ActivityDataDoc p_data)
        {
            if (p_data == null) { return; }
            if (p_data.data == null) { return; }
            if (p_data.data.Count == 0) { return; }
            List<ActivityDataRow> unitData = (List<ActivityDataRow>)p_data.data;

            foreach (ActivityDataRow row in unitData)
            {
                Kreyos_User_Activities act = new Kreyos_User_Activities();
                act.UpdateFromRow(row);
                this.AddActivity(act);
            }

            this.Save();
        }