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 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"); } }