Ejemplo n.º 1
0
 /// <summary>
 /// 修改数据-未付款自动取消
 /// </summary>
 /// <param name="_legworkOrder"></param>
 /// <returns></returns>
 public async static Task <bool> UpdatePaymentTimeout(LegworkOrderModel _legworkOrder)
 {
     using (var db = new DataContext())
     {
         var model = db.Legwork_Order.FirstOrDefault(q => q.OrderID == _legworkOrder.OrderID);
         model.Status     = (int)LegworkOrderStatus.Invalid;
         model.CancelTime = DateTime.Now;
         return(await db.SaveChangesAsync() > 0);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 修改数据-自动确认收货
 /// </summary>
 /// <param name="_legworkOrder"></param>
 /// <returns></returns>
 public async static Task <bool> UpdateAutoConfirmTime(LegworkOrderModel _legworkOrder)
 {
     using (var db = new DataContext())
     {
         var model = db.Legwork_Order.FirstOrDefault(q => q.OrderID == _legworkOrder.OrderID);
         model.Status       = (int)LegworkOrderStatus.Complete;
         model.CompleteTime = DateTime.Now;
         return(await db.SaveChangesAsync() > 0);
     }
 }