/// <summary> /// 0:正常状态 /// 1:用户回收站 /// 2:用户彻底删除|管理员删除订单时,返还优惠卷,并删除支付单 ///(仅可操作未完成支付的支付单) /// </summary> public bool CancelOrder(M_OrderList orderMod) { B_Payment payBll = new B_Payment(); M_Payment payMod = payBll.SelModelByOrder(orderMod); //支付单不存在,或状态不为未支付,则忽略 if (payMod == null) { return(false); } //返还优惠卷 if (!string.IsNullOrEmpty(payMod.ArriveDetail)) { B_Arrive avBll = new B_Arrive(); M_Arrive avMod = avBll.SelReturnModel(DataConvert.CLng(payMod.ArriveDetail)); if (avMod != null && avMod.State == 10) { avMod.State = 1; avMod.UseRemind = "订单[" + orderMod.OrderNo + "]取消,返还优惠卷"; avBll.GetUpdate(avMod); } } //返回积分,需计算积分的值 if (payMod.UsePoint > 0) { } DBCenter.UpdateSQL(payMod.TbName, "Status=" + (int)M_Payment.PayStatus.NoPay + ",MoneyTrue=0,IsDel=1", "PaymentID=" + payMod.PaymentID); return(true); }
public string GetPayPlatName(string payno) { M_Payment payMod = new B_Payment().SelModelByPayNo(payno); return(GetPayPlatName(payMod)); }