Exemplo n.º 1
0
        public void updateOrder()//
        {
            while (stopthread)
            {
                foreach (Order order in dal.GetOrderList())
                {
                    try
                    {
                        if ((daysBetween(order.CreateDate) > 31 && order.Status != orderStatus.closedNoResponse && order.Status != orderStatus.closedResponse) || (getGuestRequestByKey(order.GuestRequestKey).EntryDate <= DateTime.Today))//אני בממתינה
                        {
                            closeOrderbysite(order);
                        }
                    }
                    catch (Exception) { }
                }

                Thread.Sleep(86400000);//a day
            }
        }