public static void Update(clsTimeLogEntry entry) { string action = "update"; string arguments = "&serializedEntry=" + entry.Serialize(); string url = createUrl(action, arguments); string responseString = getResponseString(url); entry.Deserialize(responseString); }
private void delete() { clsTimeLogList.UserID = Request.QueryString["userID"]; string serializedEntry = Request.QueryString["serializedEntry"]; clsTimeLogEntry entry = new clsTimeLogEntry(); entry.Deserialize(serializedEntry); mTimeLogList.Delete(entry); string responseString = "ok"; Response.Write(responseString); }
public static List <clsTimeLogEntry> GetAllEntries(TimeLogDate beginDate, TimeLogDate endDate) { string action = "getAllEntries"; string arguments = "&beginDate=" + beginDate.ToShortDateString() + "&endDate=" + endDate.ToShortDateString(); string url = createUrl(action, arguments); string responseString = getResponseString(url); List <clsTimeLogEntry> entries = new List <clsTimeLogEntry>(); string[] serializedResponses = responseString.Split('\n'); foreach (string serializedResponse in serializedResponses) { if (serializedResponse != "") { clsTimeLogEntry entry = new clsTimeLogEntry(); entry.Deserialize(serializedResponse); entries.Add(entry); } } return(entries); }