public bool commitDelete(int _id) { ERwaitClassDataContext objERDC = new ERwaitClassDataContext(); using (objERDC) { var objDelER= objERDC.ER_waittimes.Single(x => x.Id == _id); objERDC.ER_waittimes.DeleteOnSubmit(objDelER); objERDC.SubmitChanges(); return true; } }
public bool commitUpdate(int _id,DateTime _waititme, DateTime _checkedin) { ERwaitClassDataContext objERDC = new ERwaitClassDataContext(); using (objERDC) { var objUpERtime = objERDC.ER_waittimes.Single(x => x.Id == _id); objUpERtime.wait_time = _waititme.TimeOfDay; objUpERtime.checked_in = _checkedin; objERDC.SubmitChanges(); return true; } }
public bool commitInsert(DateTime _waittime,DateTime _checkedin) { ERwaitClassDataContext objERDC = new ERwaitClassDataContext(); using (objERDC) { ER_waittime objnewWaittime = new ER_waittime(); objnewWaittime.wait_time = _waittime.TimeOfDay; objnewWaittime.checked_in = _checkedin; objERDC.ER_waittimes.InsertOnSubmit(objnewWaittime); objERDC.SubmitChanges(); return true; } }