public static void NewRec(DateTime d, int personid, bool lastday) { AddObject(_Tabl, new string[] { _perid, _dat }, new object[] { personid, d }, ""); if (lastday) { string update = string.Format(@" UPDATE {0} SET {1} = (SELECT TOP 1 T2.{1} FROM {0} T2 WHERE T2.{2} < ? AND T2.{3} = ? ORDER BY T2.{2} DESC) WHERE {2} = ? AND {3} = ? " , _Tabl, _done, _dat, _perid); SQLExecute(update, new object[] { d, personid, d, personid }); } NotifyHub.NotifyRoomChange(); }
public static void DelRec(int id) { DeleteObject(_Tabl, id.ToString(), _pid); NotifyHub.NotifyRoomChange(); }