本文整理汇总了C#中OrderInfo.CheckAction方法的典型用法代码示例。如果您正苦于以下问题:C# OrderInfo.CheckAction方法的具体用法?C# OrderInfo.CheckAction怎么用?C# OrderInfo.CheckAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OrderInfo
的用法示例。
在下文中一共展示了OrderInfo.CheckAction方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConfirmPay
public static bool ConfirmPay(OrderInfo order)
{
ManagerHelper.CheckPrivilege(Privilege.CofimOrderPay);
bool flag = false;
if (order.CheckAction(OrderActions.SELLER_CONFIRM_PAY))
{
OrderDao dao = new OrderDao();
order.OrderStatus = OrderStatus.BuyerAlreadyPaid;
order.PayDate = new DateTime?(DateTime.Now);
flag = dao.UpdateOrder(order, null);
if (!flag)
{
return flag;
}
dao.UpdatePayOrderStock(order.OrderId);
foreach (LineItemInfo info in order.LineItems.Values)
{
ProductDao dao2 = new ProductDao();
ProductInfo productDetails = dao2.GetProductDetails(info.ProductId);
productDetails.SaleCounts += info.Quantity;
productDetails.ShowSaleCounts += info.Quantity;
dao2.UpdateProduct(productDetails, null);
}
UpdateUserAccount(order);
Messenger.OrderPayment(new MemberDao().GetMember(order.UserId), order.OrderId, order.GetTotal());
EventLogs.WriteOperationLog(Privilege.CofimOrderPay, string.Format(CultureInfo.InvariantCulture, "确认收款编号为\"{0}\"的订单", new object[] { order.OrderId }));
}
return flag;
}
示例2: ConfirmOrderFinish
public static bool ConfirmOrderFinish(OrderInfo order)
{
ManagerHelper.CheckPrivilege(Privilege.EditOrders);
bool flag = false;
if (order.CheckAction(OrderActions.SELLER_FINISH_TRADE))
{
order.OrderStatus = OrderStatus.Finished;
order.FinishDate = new DateTime?(DateTime.Now);
flag = new OrderDao().UpdateOrder(order, null);
if (flag)
{
EventLogs.WriteOperationLog(Privilege.EditOrders, string.Format(CultureInfo.InvariantCulture, "完成编号为\"{0}\"的订单", new object[] { order.OrderId }));
}
}
return flag;
}
示例3: CloseTransaction
public static bool CloseTransaction(OrderInfo order)
{
ManagerHelper.CheckPrivilege(Privilege.EditOrders);
if (order.CheckAction(OrderActions.SELLER_CLOSE))
{
order.OrderStatus = OrderStatus.Closed;
bool flag = new OrderDao().UpdateOrder(order, null);
if (order.GroupBuyId > 0)
{
GroupBuyInfo groupBuy = GroupBuyHelper.GetGroupBuy(order.GroupBuyId);
groupBuy.SoldCount -= order.GetGroupBuyProductQuantity();
GroupBuyHelper.UpdateGroupBuy(groupBuy);
}
if (flag)
{
EventLogs.WriteOperationLog(Privilege.EditOrders, string.Format(CultureInfo.InvariantCulture, "关闭了订单“{0}”", new object[] { order.OrderId }));
}
return flag;
}
return false;
}
示例4: UpdateOrderShippingMode
public static bool UpdateOrderShippingMode(OrderInfo order)
{
ManagerHelper.CheckPrivilege(Privilege.EditOrders);
if (order.CheckAction(OrderActions.MASTER_SELLER_MODIFY_SHIPPING_MODE))
{
bool flag = new OrderDao().UpdateOrder(order, null);
if (flag)
{
EventLogs.WriteOperationLog(Privilege.EditOrders, string.Format(CultureInfo.InvariantCulture, "修改了订单“{0}”的配送方式", new object[] { order.OrderId }));
}
return flag;
}
return false;
}
示例5: UpdateOrderAmount
public static bool UpdateOrderAmount(OrderInfo order)
{
ManagerHelper.CheckPrivilege(Privilege.EditOrders);
bool flag = false;
if (order.CheckAction(OrderActions.SELLER_MODIFY_TRADE))
{
flag = new OrderDao().UpdateOrder(order, null);
if (flag)
{
EventLogs.WriteOperationLog(Privilege.EditOrders, string.Format(CultureInfo.InvariantCulture, "修改了编号为\"{0}\"订单的金额", new object[] { order.OrderId }));
}
}
return flag;
}
示例6: SendGoods
public static bool SendGoods(OrderInfo order)
{
ManagerHelper.CheckPrivilege(Privilege.OrderSendGoods);
bool flag = false;
if (order.CheckAction(OrderActions.SELLER_SEND_GOODS))
{
OrderDao dao = new OrderDao();
order.OrderStatus = OrderStatus.SellerAlreadySent;
order.ShippingDate = new DateTime?(DateTime.Now);
flag = dao.UpdateOrder(order, null);
if (!flag)
{
return flag;
}
if (order.Gateway.ToLower() == "hishop.plugins.payment.podrequest")
{
dao.UpdatePayOrderStock(order.OrderId);
foreach (LineItemInfo info in order.LineItems.Values)
{
ProductDao dao2 = new ProductDao();
ProductInfo productDetails = dao2.GetProductDetails(info.ProductId);
productDetails.SaleCounts += info.Quantity;
productDetails.ShowSaleCounts += info.Quantity;
dao2.UpdateProduct(productDetails, null);
}
UpdateUserAccount(order);
}
EventLogs.WriteOperationLog(Privilege.OrderSendGoods, string.Format(CultureInfo.InvariantCulture, "发货编号为\"{0}\"的订单", new object[] { order.OrderId }));
}
return flag;
}
示例7: MondifyAddress
public static bool MondifyAddress(OrderInfo order)
{
ManagerHelper.CheckPrivilege(Privilege.EditOrders);
if (order.CheckAction(OrderActions.MASTER_SELLER_MODIFY_DELIVER_ADDRESS))
{
bool flag = new OrderDao().UpdateOrder(order, null);
if (flag)
{
EventLogs.WriteOperationLog(Privilege.EditOrders, string.Format(CultureInfo.InvariantCulture, "修改了订单“{0}”的收货地址", new object[] { order.OrderId }));
}
return flag;
}
return false;
}