Beispiel #1
0
        public JsonResult <short> GetLastFromQueue()

        {
            var ret      = new Order();
            var queueDao = new QueueModel(Context);
            var queue    = queueDao.GetQueue();

            if (queue.Count > 0)
            {
                ret = queue.Dequeue();
                ret.ProcessingDate = DateTime.Now;

                Context.UpdateOrder(ret);
            }

            return(Json(ret.OrderType ?? default(short)));
        }