Esempio n. 1
0
    public IQueryable<ER_waittime>getTimeByID(int _id)
    {
        ERwaitClassDataContext objERDC = new ERwaitClassDataContext();
        var allTimes = objERDC.ER_waittimes.Where(x => x.Id == _id).Select(x => x);
        return allTimes;

    }
Esempio n. 2
0
 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;
     }
 }
Esempio n. 3
0
    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;
        }
    }
Esempio n. 4
0
    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;
        }
    }
Esempio n. 5
0
    //This function gets latest wait time for public side

    public IQueryable<ER_waittime> getlatestWaittimes()
    {
        ERwaitClassDataContext objERDC = new ERwaitClassDataContext();
        var latesttimes = objERDC.ER_waittimes.OrderByDescending(x => x.checked_in).Take(1);
        return latesttimes;
    }
Esempio n. 6
0
 public IQueryable<ER_waittime>getwaitTimes()
 {
     ERwaitClassDataContext objERDC = new ERwaitClassDataContext();
     var allTimes = objERDC.ER_waittimes.Select(x => x);
     return allTimes;
 }