[chronojump] json GetTasks by stationId



commit 1eb11c74c9e134a20c9a4976ea720d4dbbcdc77d
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Jun 28 18:14:05 2017 +0200

    json GetTasks by stationId

 src/gui/networks.cs |    4 ++--
 src/json.cs         |    4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index b722b4d..6612d1c 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -458,7 +458,7 @@ public partial class ChronoJumpWindow
                                selectRowTreeView_persons(treeview_persons, rowToSelect);
                        */
 
-                       List<Task> tasks = json.GetTasks(currentPerson.UniqueID);
+                       List<Task> tasks = json.GetTasks(currentPerson.UniqueID, 
configChronojump.CompujumpStationID);
                        showDialogPersonPopup(tasks);
                }
 
@@ -476,7 +476,7 @@ public partial class ChronoJumpWindow
                        return;
 
                Json json = new Json();
-               List<Task> tasks = json.GetTasks(currentPerson.UniqueID);
+               List<Task> tasks = json.GetTasks(currentPerson.UniqueID, configChronojump.CompujumpStationID);
                showDialogPersonPopup(tasks);
        }
 
diff --git a/src/json.cs b/src/json.cs
index 3e42dd6..bb8bc38 100644
--- a/src/json.cs
+++ b/src/json.cs
@@ -387,7 +387,7 @@ public class Json
                return true;
        }
 
-       public List<Task> GetTasks(int personID)
+       public List<Task> GetTasks(int personID, int stationID)
        {
                // Create a request using a URL that can receive a post.
                WebRequest request = WebRequest.Create (serverUrl + "/getTasks");
@@ -401,6 +401,7 @@ public class Json
                // Creates the json object
                JsonObject json = new JsonObject();
                json.Add("personId", personID.ToString());
+               json.Add("stationId", stationID.ToString());
 
                // Converts it to a String
                String js = json.ToString();
@@ -526,6 +527,7 @@ public class Json
        }
        public bool UpdateTask(int taskId, int done)
        {
+               LogB.Information("At UpdateTask");
                // Create a request using a URL that can receive a post.
                WebRequest request = WebRequest.Create (serverUrl + "/updateTask");
 


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