public void addrec(string date, string lastday) { DateTime d = DateTime.ParseExact(date, defDateFormat, CultureInfo.InvariantCulture); TRRec r = TRRec.GetRec(d, CurrentContext.User.ID); if (r == null) { TRRec.NewRec(d, CurrentContext.User.ID, lastday == "True"); } }
public TRRec gettrrec(string date) { if (!CurrentContext.Valid) { return(null); } DateTime d = DateTime.ParseExact(date, defDateFormat, CultureInfo.InvariantCulture); TRRec r = TRRec.GetRec(d, CurrentContext.User.ID); return(r); }
public void todayrrec(string lastday) { if (!CurrentContext.Valid) { return; } DateTime d = DateTime.Today; TRRec r = TRRec.GetRec(d, CurrentContext.User.ID); if (r == null) { TRRec.NewRec(d, CurrentContext.User.ID, lastday == "True"); } }
public static string GetRecString() { if (!CurrentContext.Valid) { return(""); } DateTime d = DateTime.Today; TRRec r = TRRec.GetRec(d, CurrentContext.User.ID); if (r != null) { r.DONE = Uri.EscapeDataString(r.DONE); for (int i = 0; i < r.TASKSEVENTS.Count; i++) { r.TASKSEVENTS[i].DEFECT.SUMMARY = Uri.EscapeDataString(r.TASKSEVENTS[i].DEFECT.SUMMARY); } } return(JsonConvert.SerializeObject(r)); }