コード例 #1
0
        public string CreateOrder(DataAccess.Model.Storage.Order order)
        {
            order.Id   = order.ApplicationId;
            order.Time = DateTime.Now;
            order.Type = Application;

            order.PartitionKey = order.Id;
            order.RowKey       = Application;

            order.Amount = order.Base
                           + order.PickDate
                           //+ order.AnyCategory
                           + order.Emergency
                           + order.Special;

            if (GetOrder(order.Id) == null)
            {
                OrderTable.Insert(order);
            }
            else
            {
                OrderTable.Replace(order);
            }

            return(order.Id);
        }
コード例 #2
0
        public string CreateOrder(DataAccess.Model.Storage.Order order)
        {
            order.Id   = order.ApplicationId;
            order.Time = DateTime.Now;
            order.Type = Application;

            order.PartitionKey = order.Id;
            order.RowKey       = Application;

            order.Amount = order.Base
                           + order.PickDate
                           //+ order.AnyCategory
                           + order.Emergency
                           + order.Special;

            if (GetOrder(order.Id) == null)
            {
                OrderTable.Insert(order);
            }
            else
            {
                OrderTable.Replace(order);
            }

            Task.Run(async() =>
            {
                await Task.Delay(5 * 60 * 1000);
                this.AutoAccept(order.Id);
            });

            return(order.Id);
        }