partial void InsertGrucoxDynamicStrengthTestSession(GrucoxDynamicStrengthTestSession instance);
 partial void DeleteGrucoxDynamicStrengthTestSession(GrucoxDynamicStrengthTestSession instance);
        private static bool StoreDataDynamicStrength_RemoteDB(DataClasses.DynamicStrengthTest dynamicStrengthTest, int UserID)
        {
            GrucoxDynamicStrengthTestSession DynamicStrengthTestSession = new GrucoxDynamicStrengthTestSession();
            DynamicStrengthTestSession.DeviceUID = (new Grucox.DataManager(CalibrationSettings.Default.DataManagerConnectionString)).GetDeviceMacAddress();
            DynamicStrengthTestSession.LiveUserID = UserID;
            DynamicStrengthTestSession.SessionDate = DateTime.Now.Subtract(TimeSpan.FromMinutes(10));
            DynamicStrengthTestSession.LeftMaxTorqueConc = Convert.ToDecimal(dynamicStrengthTest.LeftMaxTorqueConc);
            DynamicStrengthTestSession.LeftMaxTorqueEcce = Convert.ToDecimal(dynamicStrengthTest.LeftMaxTorqueEcce);
            DynamicStrengthTestSession.RightMaxTorqueConc = Convert.ToDecimal(dynamicStrengthTest.RightMaxTorqueConc);
            DynamicStrengthTestSession.RightMaxTorqueEcce = Convert.ToDecimal(dynamicStrengthTest.RightMaxTorqueEcce);
            DynamicStrengthTestSession.SpeedLeftMaxConc = Convert.ToDecimal(dynamicStrengthTest.SpeedLeftMaxConc);
            DynamicStrengthTestSession.SpeedLeftMaxEcce = Convert.ToDecimal(dynamicStrengthTest.SpeedLeftMaxEcce);
            DynamicStrengthTestSession.SpeedRightMaxConc = Convert.ToDecimal(dynamicStrengthTest.SpeedRightMaxConc);
            DynamicStrengthTestSession.SpeedRightMaxEcce = Convert.ToDecimal(dynamicStrengthTest.SpeedRightMaxEcce);

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

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

            if (matchedItem == null)                                                //If customer does not exist
            {
                try
                {
                    dc.GrucoxDynamicStrengthTestSessions.InsertOnSubmit(DynamicStrengthTestSession);
                    dc.GrucoxDynamicStrengthTestSessions.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;
                }
            }
        }