protected override void PageLoad() { base.PageLoad(); int orderId = RequestHelper.GetQueryString <int>("orderId"); int orderDetailId = RequestHelper.GetQueryString <int>("orderDetailId"); string action = RequestHelper.GetQueryString <string>("Action"); if (action == "CalcCanRefundMoney") { int refundCount = RequestHelper.GetQueryString <int>("num"); order = OrderBLL.Read(orderId); orderDetail = OrderDetailBLL.Read(orderDetailId); var refundMsg = JWRefund.CanRefund(order, orderDetail, refundCount); ResponseHelper.Write(Newtonsoft.Json.JsonConvert.SerializeObject(refundMsg)); ResponseHelper.End(); } if (action == "Submit") { this.Submit(); } order = OrderBLL.Read(orderId); if (order.Id > 0) { JWRefundMsg refundMsg = new JWRefundMsg(); if (orderDetailId > 0) { orderDetail = OrderDetailBLL.Read(orderDetailId); refundMsg = JWRefund.CanRefund(order, orderDetail, 1); } else { refundMsg = JWRefund.CanRefund(order); } canRefundMoney = refundMsg.CanRefundMoney; orderRefundList = OrderRefundBLL.ReadListValid(order.Id); } Title = "退款申请"; }
protected void Page_Load(object sender, EventArgs e) { int orderId = RequestHelper.GetQueryString <int>("orderId"); int orderDetailId = RequestHelper.GetQueryString <int>("orderDetailId"); string action = RequestHelper.GetQueryString <string>("Action"); if (action == "CalcCanRefundMoney") { int refundCount = RequestHelper.GetQueryString <int>("num"); order = OrderBLL.Read(orderId); orderDetail = OrderDetailBLL.Read(orderDetailId); var refundMsg = JWRefund.CanRefund(order, orderDetail, refundCount); ResponseHelper.Write(Newtonsoft.Json.JsonConvert.SerializeObject(refundMsg)); ResponseHelper.End(); } if (!Page.IsPostBack) { order = OrderBLL.Read(orderId); if (order.Id > 0) { CheckAdminPower("OrderRefundApply", PowerCheckType.Single); JWRefundMsg refundMsg = new JWRefundMsg(); if (orderDetailId > 0) { orderDetail = OrderDetailBLL.Read(orderDetailId); refundMsg = JWRefund.CanRefund(order, orderDetail, 1); } else { refundMsg = JWRefund.CanRefund(order); } canRefundMoney = refundMsg.CanRefundMoney; RefundMoney.Text = canRefundMoney.ToString(); orderRefundList = OrderRefundBLL.ReadListValid(order.Id); } } }