partial void DeleteRehabProgram(RehabProgram instance);
 partial void InsertRehabProgram(RehabProgram instance);
 partial void UpdateRehabProgram(RehabProgram instance);
        public static bool StoreDataRehabBilateral(objDataSample DataSample, int UserID)
        {
            DataClasses.RehabProgram rehabProgram = new RehabProgram();
            rehabProgram.UserID = UserID;
            rehabProgram.Date = DateTime.Now;
            rehabProgram.SessionDuration = DataSample.SessionDuration.TotalSeconds;
            rehabProgram.LeftMaxConcP = DataSample.SessionMaxEcceTorqueAbs;
            rehabProgram.LeftMaxEcceP = DataSample.SessionMaxEcceTorqueBack;
            rehabProgram.RightMaxConcP = DataSample.SessionMaxConcTorqueAbs;
            rehabProgram.RightMaxEcceP = DataSample.SessionMaxConcTorqueBack;
            rehabProgram.LeftAvgConcP = DataSample.SessionAvgEcceTorqueAbs;
            rehabProgram.LeftAvgEcceP = DataSample.SessionAvgEcceTorqueAbs;
            rehabProgram.RightAvgConcP = DataSample.SessionAvgConcTorqueAbs;
            rehabProgram.RightAvgEcceP = DataSample.SessionAvgConcTorqueBack;
            rehabProgram.LeftStrengthIndex = DataSample.SessionStrengthIndexBack;
            rehabProgram.LeftEnduranceIndex = DataSample.SessionEnduranceIndexBack;
            rehabProgram.RightStrengthIndex = DataSample.SessionStrengthIndexAbs;
            rehabProgram.RightEnduranceIndex = DataSample.SessionEnduranceIndexAbs;
            rehabProgram.DistConc = DataSample.DistanceConc;
            rehabProgram.DistEcce = DataSample.DistanceEcce;
            rehabProgram.EnergyBurned = DataSample.TotalEnergyBurned;

            if (GlobalVariables.WriteToRemoteServer == true)
            {
                if (StoreDataRehabBilateral_RemoteDB(rehabProgram, UserID) == true)
                    return true;
                else
                    return false;
            }
            else if (GlobalVariables.WriteToRemoteServer == false)
            {
                if (StoreDataRehabBilateral_LocalDB(rehabProgram, UserID) == true)
                    return true;
                else
                    return false;
            }
            else
                return false;
        }