[chronojump] Fixed: 641041 personSession data was not fully uploaded



commit dbe30c2ed49a647fe9eafe38f89028d00eda50ae
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Feb 2 20:29:26 2011 +0100

    Fixed: 641041 personSession data was not fully uploaded

 chronojump_server/chronojumpServerCSharp.cs |    3 ++-
 src/person.cs                               |    1 +
 src/personSession.cs                        |    6 ++++++
 src/server.cs                               |    4 ++++
 4 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/chronojump_server/chronojumpServerCSharp.cs b/chronojump_server/chronojumpServerCSharp.cs
index dcb7d12..1d36ab0 100755
--- a/chronojump_server/chronojumpServerCSharp.cs
+++ b/chronojump_server/chronojumpServerCSharp.cs
@@ -132,7 +132,7 @@ public class ChronojumpServer {
 			//file exists and cannot be overwritten
 		}
 	
-		return id; //uniqueID of person at server
+		return id; //uniqueID of session at server
 	}
 	
 	[WebMethod(Description="Update session uploadingState")]
@@ -296,6 +296,7 @@ public class ChronojumpServer {
 	{
 		if(!SqlitePersonSession.PersonSelectExistsInSession(ps.PersonID, ps.SessionID)) {
 			Console.WriteLine("personSession needed");
+			Console.WriteLine(ps.ToString());
 			ps.InsertAtDB(false, Constants.PersonSessionTable);
 			Console.WriteLine("done");
 			return 1; //unused
diff --git a/src/person.cs b/src/person.cs
index 5f5ca08..eb16111 100644
--- a/src/person.cs
+++ b/src/person.cs
@@ -124,6 +124,7 @@ public partial class Person {
 		return this.ToString().GetHashCode();
 	}
 	
+	//some "set"s are needed. If not data of personSession does not arrive to the server
 	
 	public string Name {
 		get { return name; }
diff --git a/src/personSession.cs b/src/personSession.cs
index 0dbc65e..529f706 100644
--- a/src/personSession.cs
+++ b/src/personSession.cs
@@ -100,6 +100,7 @@ public partial class PersonSession {
 		return "[uniqueID: " + uniqueID + "]," + personID + ", " + ", " + sessionID + ", " + height + ", " + weight + ", " + sportID + ", " + speciallityID + ", " + practice + ", " + comments;
 	}
 
+	//some "set"s are needed. If not data of personSession does not arrive to the server
 
 	public int UniqueID {
 		get { return uniqueID; }
@@ -118,10 +119,12 @@ public partial class PersonSession {
 
 	public double Height {
 		get { return height; }
+		set { height = value; }
 	}
 	
 	public double Weight {
 		get { return weight; }
+		set { weight = value; }
 	}
 	
 	public int SportID {
@@ -131,14 +134,17 @@ public partial class PersonSession {
 	
 	public int SpeciallityID {
 		get { return speciallityID; }
+		set { speciallityID = value; }
 	}
 	
 	public int Practice {
 		get { return practice; }
+		set { practice = value; }
 	}
 
 	public string Comments {
 		get { return comments; }
+		set { comments = value; }
 	}
 
 
diff --git a/src/server.cs b/src/server.cs
index 34947e1..97e0fdb 100644
--- a/src/server.cs
+++ b/src/server.cs
@@ -568,6 +568,10 @@ public class Server
 		ps.UniqueID = -1;
 		ps.PersonID = personServerID;
 		ps.SessionID = sessionServerID;
+
+Log.WriteLine("speciallity: ");
+Log.WriteLine(ps.SpeciallityID.ToString());
+
 		myServer.UploadPersonSessionIfNeeded(ps);
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]