partial void DeleteGrucoxRehabLeftLegSession(GrucoxRehabLeftLegSession instance);
 partial void InsertGrucoxRehabLeftLegSession(GrucoxRehabLeftLegSession instance);
 partial void UpdateGrucoxRehabLeftLegSession(GrucoxRehabLeftLegSession instance);
        private static bool StoreDataRehabLeft_RemoteDB(DataClasses.RehabProgramLeft rehabProgramLeft, int UserID)
        {
            GrucoxRehabLeftLegSession RehabLeftLegSession = new GrucoxRehabLeftLegSession();
            RehabLeftLegSession.DeviceUID = (new Grucox.DataManager(CalibrationSettings.Default.DataManagerConnectionString)).GetDeviceMacAddress();
            RehabLeftLegSession.LiveUserID = UserID;
            RehabLeftLegSession.SessionDate = DateTime.Now.Subtract(TimeSpan.FromMinutes(10));
            RehabLeftLegSession.SessionDuration = TimeSpan.FromSeconds(rehabProgramLeft.SessionDuration.Value);
            RehabLeftLegSession.LeftMaxConcP = Convert.ToDecimal(rehabProgramLeft.LeftMaxConcP.Value);
            RehabLeftLegSession.LeftMaxEcceP = Convert.ToDecimal(rehabProgramLeft.LeftMaxEcceP.Value);
            RehabLeftLegSession.RightMaxConcP = Convert.ToDecimal(rehabProgramLeft.RightMaxConcP.Value);
            RehabLeftLegSession.RightMaxEcceP = Convert.ToDecimal(rehabProgramLeft.RightMaxEcceP.Value);
            RehabLeftLegSession.LeftAvgConcP = Convert.ToDecimal(rehabProgramLeft.LeftAvgConcP.Value);
            RehabLeftLegSession.LeftAvgEcceP = Convert.ToDecimal(rehabProgramLeft.LeftAvgEcceP.Value);
            RehabLeftLegSession.RightAvgConcP = Convert.ToDecimal(rehabProgramLeft.RightAvgConcP.Value);
            RehabLeftLegSession.RightAvgEcceP = Convert.ToDecimal(rehabProgramLeft.RightAvgEcceP.Value);
            RehabLeftLegSession.LeftStrengthIndex = Convert.ToDecimal(rehabProgramLeft.LeftStrengthIndex.Value);
            RehabLeftLegSession.LeftEnduranceIndex = Convert.ToDecimal(rehabProgramLeft.LeftEnduranceIndex.Value);
            RehabLeftLegSession.RightStrengthIndex = Convert.ToDecimal(rehabProgramLeft.RightStrengthIndex.Value);
            RehabLeftLegSession.RightEnduranceIndex = Convert.ToDecimal(rehabProgramLeft.RightEnduranceIndex.Value);
            RehabLeftLegSession.DistConc = Convert.ToDecimal(rehabProgramLeft.DistConc.Value);
            RehabLeftLegSession.DistEcce = Convert.ToDecimal(rehabProgramLeft.DistEcce.Value);
            RehabLeftLegSession.EnergyBurned = Convert.ToDecimal(rehabProgramLeft.EnergyBurned.Value);
            RehabLeftLegSession.SessionDescription = "Rehab Program - Left Leg";


            DataClasses.GrucoxDataClassesRemoteDBDataContext dc = new DataClasses.GrucoxDataClassesRemoteDBDataContext();

            var matchedItem = (from sessions in dc.GetTable<DataClasses.GrucoxRehabLeftLegSession>()                           //**************************************
                               where sessions.ItemID == RehabLeftLegSession.ItemID                                             //******Check if customer already exists
                               select sessions).SingleOrDefault();                                                             //**************************************

            if (matchedItem == null)                                                //If customer does not exist
            {
                try
                {
                    dc.GrucoxRehabLeftLegSessions.InsertOnSubmit(RehabLeftLegSession);
                    dc.GrucoxRehabLeftLegSessions.Context.SubmitChanges();                      //Add the new customer to the Customers Table
                    return true;
                }
                catch (Exception ex)
                {
                    return false;
                }
            }
            else                                                                    //Customer already exists
            {
                try
                {
                    dc.SubmitChanges();
                    return true;
                }
                catch (Exception ex)
                {
                    return false;
                }
            }
        }