private void CloseOrder(HttpContext context) { string text = context.Request.Form["orderId"]; string closeReason = context.Request.Form["CloseReason"]; if (string.IsNullOrWhiteSpace(text)) { throw new HidistroAshxException("异常的参数:订单编号"); } OrderInfo orderInfo = OrderHelper.GetOrderInfo(text); if (orderInfo == null) { throw new HidistroAshxException("异常的参数:订单编号"); } orderInfo.CloseReason = closeReason; if (OrderHelper.CloseTransaction(orderInfo)) { MemberInfo user = Users.GetUser(orderInfo.UserId); Messenger.OrderClosed(user, orderInfo, orderInfo.CloseReason); orderInfo.OnClosed(); base.ReturnSuccessResult(context, "操作成功", 0, true); return; } throw new HidistroAshxException("关闭订单失败"); }
private void btnCloseOrder_Click(object sender, System.EventArgs e) { this.order.CloseReason = this.ddlCloseReason.SelectedValue; if (OrderHelper.CloseTransaction(this.order)) { IUser user = Users.GetUser(this.order.UserId); Messenger.OrderClosed(user, this.order, this.order.CloseReason); this.order.OnClosed(); this.ShowMsg("关闭订单成功", true); return; } this.ShowMsg("关闭订单失败", false); }
private void btnCloseOrder_Click(object sender, EventArgs e) { this.order.CloseReason = this.ddlCloseReason.SelectedValue; if (OrderHelper.CloseTransaction(this.order)) { this.order.OnClosed(); this.ShowMsg("关闭订单成功", true); } else { this.ShowMsg("关闭订单失败", false); } }
private void btnCloseOrder_Click(object sender, System.EventArgs e) { this.order.CloseReason = this.ddlCloseReason.SelectedValue; if ("请选择关闭的理由" == this.order.CloseReason) { this.ShowMsg("请选择关闭的理由", false); return; } if (OrderHelper.CloseTransaction(this.order)) { this.order.OnClosed(); this.ShowMsgAndReUrl("关闭订单成功", true, "OrderDetails.aspx?OrderId=" + this.orderId + "&t=" + System.DateTime.Now.ToString("HHmmss")); return; } this.ShowMsg("关闭订单失败", false); }
private void btnCloseOrder_Click(object sender, EventArgs e) { OrderInfo orderInfo = OrderHelper.GetOrderInfo(this.hidOrderId.Value); orderInfo.CloseReason = this.ddlCloseReason.SelectedValue; if (OrderHelper.CloseTransaction(orderInfo)) { orderInfo.OnClosed(); this.BindOrders(); Messenger.OrderClosed(MemberHelper.GetMember(orderInfo.UserId), orderInfo, orderInfo.CloseReason, wid); this.ShowMsg("关闭订单成功", true); } else { this.ShowMsg("关闭订单失败", false); } }
private void btnCloseOrder_Click(object sender, System.EventArgs e) { OrderInfo orderInfo = OrderHelper.GetOrderInfo(this.hidOrderId.Value); orderInfo.CloseReason = this.ddlCloseReason.SelectedValue; if ("请选择关闭的理由" == orderInfo.CloseReason) { this.ShowMsg("请选择关闭的理由", false); return; } if (OrderHelper.CloseTransaction(orderInfo)) { orderInfo.OnClosed(); this.BindOrders(); this.ShowMsg("关闭订单成功", true); return; } this.ShowMsg("关闭订单失败", false); }
private void btnCloseOrder_Click(object sender, EventArgs e) { Order.CloseReason = ddlCloseReason.SelectedValue; if (OrderHelper.CloseTransaction(Order)) { int userId = Order.UserId; if (userId == 0x44c) { userId = 0; } Messenger.OrderClosed(Users.GetUser(userId), Order.OrderId, Order.CloseReason); Order.OnClosed(); ShowMsg("关闭订单成功", true); Page.Response.Redirect(Globals.ApplicationPath + "/Admin/sales/ClosedOrderDetails.aspx?OrderId=" + Order.OrderId); } else { ShowMsg("关闭订单失败", false); } }
private void btnCloseOrder_Click(object sender, System.EventArgs e) { OrderInfo orderInfo = OrderHelper.GetOrderInfo(this.hidOrderId.Value); orderInfo.CloseReason = this.ddlCloseReason.SelectedValue; if (OrderHelper.CloseTransaction(orderInfo)) { int num = orderInfo.UserId; if (num == 1100) { num = 0; } Hidistro.Membership.Core.IUser user = Hidistro.Membership.Context.Users.GetUser(num); Messenger.OrderClosed(user, orderInfo.OrderId, orderInfo.CloseReason); orderInfo.OnClosed(); this.BindOrders(); this.ShowMsg("关闭订单成功", true); return; } this.ShowMsg("关闭订单失败", false); }
protected void btnCloseOrder_Click(object sender, EventArgs e) { OrderInfo orderInfo = OrderHelper.GetOrderInfo(hidOrderId.Value); orderInfo.CloseReason = ddlCloseReason.SelectedValue; if (OrderHelper.CloseTransaction(orderInfo)) { int userId = orderInfo.UserId; if (userId == 1100)//0x44c) { userId = 0; } Messenger.OrderClosed(Users.GetUser(userId), orderInfo.OrderId, orderInfo.CloseReason); orderInfo.OnClosed(); BindOrders(); ShowMsg("关闭订单成功", true); } else { ShowMsg("关闭订单失败", false); } }
private void btnCloseOrder_Click(object sender, EventArgs e) { string orderId = this.hidOrderId.Value; if (orderId == "sel") { string selectedValue = this.ddlCloseReason.SelectedValue; if ("请选择关闭的理由" == selectedValue) { this.ShowMsg("请选择关闭的理由", false); } else { string str3 = Globals.RequestFormStr("CheckBoxGroup"); if (str3.Length <= 0) { this.ShowMsg("请先选择要批量关闭的订单", false); } else { string[] strArray = str3.Split(new char[] { ',' }); int num = 0; foreach (string str4 in strArray) { if (!string.IsNullOrEmpty(str4)) { OrderInfo orderInfo = OrderHelper.GetOrderInfo(str4); orderInfo.CloseReason = selectedValue; if (OrderHelper.CloseTransaction(orderInfo)) { orderInfo.OnClosed(); num++; } } } if (num > 0) { this.ShowMsg("成功关闭" + num.ToString() + "个订单", true); } else { this.ShowMsg("关闭订单失败", false); } this.BindOrders(); } } } else { OrderInfo order = OrderHelper.GetOrderInfo(orderId); order.CloseReason = this.ddlCloseReason.SelectedValue; if ("请选择关闭的理由" == order.CloseReason) { this.ShowMsg("请选择关闭的理由", false); } else if (OrderHelper.CloseTransaction(order)) { order.OnClosed(); this.BindOrders(); this.ShowMsg("关闭订单成功", true); } else { this.ShowMsg("关闭订单失败", false); } } }
private void btnCloseOrder_Click(object sender, System.EventArgs e) { string value = this.hidOrderId.Value; if (value == "sel") { string selectedValue = this.ddlCloseReason.SelectedValue; if ("请选择关闭的理由" == selectedValue) { this.ShowMsg("请选择关闭的理由", false); return; } string text = Globals.RequestFormStr("CheckBoxGroup"); if (text.Length <= 0) { this.ShowMsg("请先选择要批量关闭的订单", false); return; } string[] array = text.Split(new char[] { ',' }); int num = 0; string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string text2 = array2[i]; if (!string.IsNullOrEmpty(text2)) { OrderInfo orderInfo = OrderHelper.GetOrderInfo(text2); orderInfo.CloseReason = selectedValue; if (OrderHelper.CloseTransaction(orderInfo)) { orderInfo.OnClosed(); num++; } } } if (num > 0) { this.ShowMsg("成功关闭" + num.ToString() + "个订单", true); } else { this.ShowMsg("关闭订单失败", false); } this.BindOrders(); return; } else { OrderInfo orderInfo2 = OrderHelper.GetOrderInfo(value); orderInfo2.CloseReason = this.ddlCloseReason.SelectedValue; if ("请选择关闭的理由" == orderInfo2.CloseReason) { this.ShowMsg("请选择关闭的理由", false); return; } if (OrderHelper.CloseTransaction(orderInfo2)) { orderInfo2.OnClosed(); this.BindOrders(); this.ShowMsg("关闭订单成功", true); return; } this.ShowMsg("关闭订单失败", false); return; } }