Exemplo n.º 1
0
    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");
        }
    }
Exemplo n.º 2
0
    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);
    }
Exemplo n.º 3
0
    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");
        }
    }
Exemplo n.º 4
0
    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));
    }