Exemplo n.º 1
0
        public IHttpActionResult GetTime()
        {
            TimeReturn tr = new TimeReturn();

            try
            {
                using (var ctx = new CentralWsAuthEntity())
                {
                    foreach (var x in ctx.presmat_v2_getBuzzStartDate_EndDate())
                    {
                        tr.timeStart = x.buzzlookUp_startDate.ToString();
                        tr.timeEnd   = x.buzzlookUp_endDate.ToString();
                    }

                    return(Ok(new { tr }));
                }
            }
            catch (Exception e)
            {
                return(Ok(new { result = e }));
            }
        }
Exemplo n.º 2
0
        public IHttpActionResult StartTimer()
        {
            try
            {
                using (var ctx = new CentralWsAuthEntity())
                {
                    if (ctx.presmat_v2_getBuzzStartDate_EndDate().Count() < 1)
                    {
                        ctx.presmat_v2_insert_time_to_lookup();

                        return(Ok(new { result = 200 }));
                    }
                    else
                    {
                        return(Ok(new { result = 105 }));
                    }
                }
            }
            catch (Exception e)
            {
                return(Ok(new { result = e }));
            }
        }