partial void DeleteGrucoxVO2MaxTestSession(GrucoxVO2MaxTestSession instance);
 partial void InsertGrucoxVO2MaxTestSession(GrucoxVO2MaxTestSession instance);
 partial void UpdateGrucoxVO2MaxTestSession(GrucoxVO2MaxTestSession instance);
        public static bool StoreData_VO2MaxTest_RemoteDB(DataClasses.VO2MaxTestConcForward vO2MaxTestConcForw, int UserID)
        {
            GrucoxVO2MaxTestSession VO2MaxTestSession = new GrucoxVO2MaxTestSession();
            VO2MaxTestSession.DeviceUID = (new Grucox.DataManager(CalibrationSettings.Default.DataManagerConnectionString)).GetDeviceMacAddress();
            VO2MaxTestSession.LiveUserID = UserID;
            VO2MaxTestSession.SessionDate = DateTime.Now.Subtract(TimeSpan.FromMinutes(10));
            VO2MaxTestSession.VO2Max = Convert.ToDecimal(vO2MaxTestConcForw.VO2Max.Value);
            VO2MaxTestSession.VO2MaxRel = Convert.ToDecimal(vO2MaxTestConcForw.VO2MaxRel.Value);
            VO2MaxTestSession.MaxConcPower = Convert.ToDecimal(vO2MaxTestConcForw.MaxConcPower.Value);

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

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

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