private PurchaseOrderInfo GetPurchaseOrderInfo() { PurchaseOrderInfo purchaseOrderInfo = new PurchaseOrderInfo(); Hidistro.Membership.Context.Distributor distributor = Hidistro.Membership.Context.Users.GetUser(Hidistro.Membership.Context.HiContext.Current.User.UserId) as Hidistro.Membership.Context.Distributor; int num = int.Parse(this.radioPaymentMode.SelectedValue); PaymentModeInfo paymentMode = SubsiteStoreHelper.GetPaymentMode(num); if (paymentMode != null) { purchaseOrderInfo.PaymentTypeId = num; purchaseOrderInfo.PaymentType = paymentMode.Name; purchaseOrderInfo.Gateway = paymentMode.Gateway; } string purchaseOrderId = this.GeneratePurchaseOrderId(); purchaseOrderInfo.PurchaseOrderId = purchaseOrderId; System.Collections.Generic.IList <PurchaseShoppingCartItemInfo> purchaseShoppingCartItemInfos = SubsiteSalesHelper.GetPurchaseShoppingCartItemInfos(); decimal num2 = 0m; if (purchaseShoppingCartItemInfos.Count >= 1) { foreach (PurchaseShoppingCartItemInfo current in purchaseShoppingCartItemInfos) { PurchaseOrderItemInfo purchaseOrderItemInfo = new PurchaseOrderItemInfo(); purchaseOrderItemInfo.PurchaseOrderId = purchaseOrderId; purchaseOrderItemInfo.SkuId = current.SkuId; purchaseOrderItemInfo.ThumbnailsUrl = current.ThumbnailsUrl; purchaseOrderItemInfo.SKUContent = current.SKUContent; purchaseOrderItemInfo.SKU = current.SKU; purchaseOrderItemInfo.Quantity = current.Quantity; purchaseOrderItemInfo.ProductId = current.ProductId; purchaseOrderItemInfo.ItemWeight = current.ItemWeight; purchaseOrderItemInfo.ItemCostPrice = current.CostPrice; purchaseOrderItemInfo.ItemPurchasePrice = current.ItemPurchasePrice; purchaseOrderItemInfo.ItemListPrice = current.ItemListPrice; purchaseOrderItemInfo.ItemDescription = current.ItemDescription; purchaseOrderItemInfo.ItemHomeSiteDescription = current.ItemDescription; num2 += current.ItemWeight * current.Quantity; purchaseOrderInfo.PurchaseOrderItems.Add(purchaseOrderItemInfo); } ShippingModeInfo shippingMode = SubsiteSalesHelper.GetShippingMode(this.radioShippingMode.SelectedValue.Value, true); purchaseOrderInfo.ShipTo = this.txtShipTo.Text.Trim(); if (this.rsddlRegion.GetSelectedRegionId().HasValue) { purchaseOrderInfo.RegionId = this.rsddlRegion.GetSelectedRegionId().Value; } purchaseOrderInfo.Address = Globals.HtmlEncode(this.txtAddress.Text.Trim()); purchaseOrderInfo.TelPhone = this.txtTel.Text.Trim(); purchaseOrderInfo.ZipCode = this.txtZipcode.Text.Trim(); purchaseOrderInfo.CellPhone = this.txtMobile.Text.Trim(); purchaseOrderInfo.OrderId = null; purchaseOrderInfo.RealShippingModeId = this.radioShippingMode.SelectedValue.Value; purchaseOrderInfo.RealModeName = shippingMode.Name; purchaseOrderInfo.ShippingModeId = this.radioShippingMode.SelectedValue.Value; purchaseOrderInfo.ModeName = shippingMode.Name; purchaseOrderInfo.AdjustedFreight = SubsiteSalesHelper.CalcFreight(purchaseOrderInfo.RegionId, num2, shippingMode); purchaseOrderInfo.Freight = purchaseOrderInfo.AdjustedFreight; purchaseOrderInfo.ShippingRegion = this.rsddlRegion.SelectedRegions; purchaseOrderInfo.Remark = Globals.HtmlEncode(this.txtRemark.Text.Trim()); purchaseOrderInfo.PurchaseStatus = OrderStatus.WaitBuyerPay; purchaseOrderInfo.DistributorId = distributor.UserId; purchaseOrderInfo.Distributorname = distributor.Username; purchaseOrderInfo.DistributorEmail = distributor.Email; purchaseOrderInfo.DistributorRealName = distributor.RealName; purchaseOrderInfo.DistributorQQ = distributor.QQ; purchaseOrderInfo.DistributorWangwang = distributor.Wangwang; purchaseOrderInfo.DistributorMSN = distributor.MSN; purchaseOrderInfo.RefundStatus = RefundStatus.None; purchaseOrderInfo.Weight = num2; } return(purchaseOrderInfo); }
private PurchaseOrderInfo GetPurchaseOrderInfo() { PurchaseOrderInfo info = new PurchaseOrderInfo(); Distributor user = Users.GetUser(HiContext.Current.User.UserId) as Distributor; int modeId = int.Parse(this.radioPaymentMode.SelectedValue); PaymentModeInfo paymentMode = SubsiteStoreHelper.GetPaymentMode(modeId); if (paymentMode != null) { info.PaymentTypeId = modeId; info.PaymentType = paymentMode.Name; info.Gateway = paymentMode.Gateway; } string str = this.GeneratePurchaseOrderId(); info.PurchaseOrderId = str; IList <PurchaseShoppingCartItemInfo> purchaseShoppingCartItemInfos = SubsiteSalesHelper.GetPurchaseShoppingCartItemInfos(); decimal totalWeight = 0M; if (purchaseShoppingCartItemInfos.Count >= 1) { foreach (PurchaseShoppingCartItemInfo info3 in purchaseShoppingCartItemInfos) { PurchaseOrderItemInfo item = new PurchaseOrderItemInfo(); item.PurchaseOrderId = str; item.SkuId = info3.SkuId; item.ThumbnailsUrl = info3.ThumbnailsUrl; item.SKUContent = info3.SKUContent; item.SKU = info3.SKU; item.Quantity = info3.Quantity; item.ProductId = info3.ProductId; item.ItemWeight = info3.ItemWeight; item.ItemCostPrice = info3.CostPrice; item.ItemPurchasePrice = info3.ItemPurchasePrice; item.ItemListPrice = info3.ItemListPrice; item.ItemDescription = info3.ItemDescription; item.ItemHomeSiteDescription = info3.ItemDescription; totalWeight += info3.ItemWeight * info3.Quantity; info.PurchaseOrderItems.Add(item); } ShippingModeInfo shippingMode = SubsiteSalesHelper.GetShippingMode(this.radioShippingMode.SelectedValue.Value, true); info.ShipTo = this.txtShipTo.Text.Trim(); if (this.rsddlRegion.GetSelectedRegionId().HasValue) { info.RegionId = this.rsddlRegion.GetSelectedRegionId().Value; } info.Address = Globals.HtmlEncode(this.txtAddress.Text.Trim()); info.TelPhone = this.txtTel.Text.Trim(); info.ZipCode = this.txtZipcode.Text.Trim(); info.CellPhone = this.txtMobile.Text.Trim(); info.OrderId = null; info.RealShippingModeId = this.radioShippingMode.SelectedValue.Value; info.RealModeName = shippingMode.Name; info.ShippingModeId = this.radioShippingMode.SelectedValue.Value; info.ModeName = shippingMode.Name; info.AdjustedFreight = SubsiteSalesHelper.CalcFreight(info.RegionId, totalWeight, shippingMode); info.Freight = info.AdjustedFreight; info.ShippingRegion = this.rsddlRegion.SelectedRegions; info.Remark = Globals.HtmlEncode(this.txtRemark.Text.Trim()); info.PurchaseStatus = OrderStatus.WaitBuyerPay; info.DistributorId = user.UserId; info.Distributorname = user.Username; info.DistributorEmail = user.Email; info.DistributorRealName = user.RealName; info.DistributorQQ = user.QQ; info.DistributorWangwang = user.Wangwang; info.DistributorMSN = user.MSN; info.RefundStatus = RefundStatus.None; info.Weight = totalWeight; } return(info); }
private PurchaseOrderInfo GetPurchaseOrder(Trade trade) { PurchaseOrderInfo info = new PurchaseOrderInfo(); info.PurchaseOrderId = "MPO" + trade.Tid.ToString(); info.TaobaoOrderId = trade.Tid.ToString(); info.ShipTo = trade.ReceiverName; info.ShippingRegion = trade.ReceiverState + trade.ReceiverCity + trade.ReceiverDistrict; info.RegionId = RegionHelper.GetRegionIdByName(trade.ReceiverState, trade.ReceiverCity, trade.ReceiverDistrict); info.Address = trade.ReceiverAddress; info.TelPhone = trade.ReceiverPhone; info.ZipCode = trade.ReceiverZip; info.CellPhone = trade.ReceiverMobile; info.ShippingModeId = shippingMode.ModeId; info.ModeName = shippingMode.Name; info.RealShippingModeId = shippingMode.ModeId; info.RealModeName = shippingMode.Name; info.AdjustedDiscount = 0M; info.OrderTotal = decimal.Parse(trade.Payment); int totalWeight = 0; foreach (Order order in trade.Orders) { DataTable skuContent = SubSiteProducthelper.GetSkuContent(order.NumIid, order.OuterSkuId); if ((skuContent != null) && (skuContent.Rows.Count > 0)) { PurchaseOrderItemInfo item = new PurchaseOrderItemInfo(); foreach (DataRow row in skuContent.Rows) { if (!(string.IsNullOrEmpty(row["AttributeName"].ToString()) || string.IsNullOrEmpty(row["ValueStr"].ToString()))) { object sKUContent = item.SKUContent; item.SKUContent = string.Concat(new object[] { sKUContent, row["AttributeName"], ":", row["ValueStr"], "; " }); } } item.PurchaseOrderId = info.PurchaseOrderId; item.SkuId = (string)skuContent.Rows[0]["SkuId"]; item.ProductId = (int)skuContent.Rows[0]["ProductId"]; if (skuContent.Rows[0]["SKU"] != DBNull.Value) { item.SKU = (string)skuContent.Rows[0]["SKU"]; } if (skuContent.Rows[0]["Weight"] != DBNull.Value) { item.ItemWeight = (int)skuContent.Rows[0]["Weight"]; } item.ItemPurchasePrice = (decimal)skuContent.Rows[0]["PurchasePrice"]; item.Quantity = int.Parse(order.Num.ToString()); item.ItemListPrice = (decimal)skuContent.Rows[0]["SalePrice"]; if (skuContent.Rows[0]["CostPrice"] != DBNull.Value) { item.ItemCostPrice = (decimal)skuContent.Rows[0]["CostPrice"]; } item.ItemDescription = (string)skuContent.Rows[0]["ProductName"]; item.ItemHomeSiteDescription = (string)skuContent.Rows[0]["ProductName"]; if (skuContent.Rows[0]["ThumbnailUrl40"] != DBNull.Value) { item.ThumbnailsUrl = (string)skuContent.Rows[0]["ThumbnailUrl40"]; } totalWeight += item.ItemWeight * item.Quantity; info.PurchaseOrderItems.Add(item); } } if (info.PurchaseOrderItems.Count <= 0) { return(null); } info.Weight = totalWeight; info.AdjustedFreight = SubsiteSalesHelper.CalcFreight(info.RegionId, totalWeight, shippingMode); info.Freight = info.AdjustedFreight; info.PurchaseStatus = OrderStatus.WaitBuyerPay; info.RefundStatus = RefundStatus.None; info.DistributorId = distributor.UserId; info.Distributorname = distributor.Username; info.DistributorEmail = distributor.Email; info.DistributorRealName = distributor.RealName; info.DistributorQQ = distributor.QQ; info.DistributorWangwang = distributor.Wangwang; info.DistributorMSN = distributor.MSN; return(info); }
protected void btnSubmit_Click(object sender, EventArgs e) { if (this.ValidateCreateOrder()) { string str2 = ""; PurchaseOrderInfo purchaseOrderInfo = new PurchaseOrderInfo(); Distributor user = Users.GetUser(HiContext.Current.User.UserId) as Distributor; string str3 = this.GeneratePurchaseOrderId(); purchaseOrderInfo.PurchaseOrderId = str3; decimal totalWeight = 0M; for (int i = 0; i < this.rpTaobaoOrder.Items.Count; i++) { CheckBox box = (CheckBox)this.rpTaobaoOrder.Items[i].FindControl("chkTbOrder"); if (box.Checked) { str2 = str2 + this.tbOrders[i].orderId + ","; Repeater repeater = (Repeater)this.rpTaobaoOrder.Items[i].FindControl("reOrderItems"); IList <tbOrderItem> items = this.tbOrders[i].items; for (int j = 0; j < repeater.Items.Count; j++) { if (items[j].localSkuId.Trim() == "") { string msg = string.Format("在授权给分销商的商品中没有找到淘宝商品:{0}!请重新查找", items[j].title); this.ShowMsg(msg, false); return; } string localSkuId = items[j].localSkuId; TextBox box2 = (TextBox)repeater.Items[j].FindControl("productNumber"); int num4 = Convert.ToInt32(box2.Text); bool flag = false; foreach (PurchaseOrderItemInfo info2 in purchaseOrderInfo.PurchaseOrderItems) { if (info2.SKU == localSkuId) { flag = true; info2.Quantity += num4; totalWeight += info2.ItemWeight * num4; } } if (!flag) { DataTable skuContentBySku = SubSiteProducthelper.GetSkuContentBySku(localSkuId); PurchaseOrderItemInfo item = new PurchaseOrderItemInfo(); if (num4 > ((int)skuContentBySku.Rows[0]["Stock"])) { this.ShowMsg("商品库存不够", false); return; } foreach (DataRow row in skuContentBySku.Rows) { if (!string.IsNullOrEmpty(row["AttributeName"].ToString()) && !string.IsNullOrEmpty(row["ValueStr"].ToString())) { object sKUContent = item.SKUContent; item.SKUContent = string.Concat(new object[] { sKUContent, row["AttributeName"], ":", row["ValueStr"], "; " }); } } item.PurchaseOrderId = str3; item.SkuId = localSkuId; item.ProductId = (int)skuContentBySku.Rows[0]["ProductId"]; if (skuContentBySku.Rows[0]["SKU"] != DBNull.Value) { item.SKU = (string)skuContentBySku.Rows[0]["SKU"]; } if (skuContentBySku.Rows[0]["Weight"] != DBNull.Value) { item.ItemWeight = (decimal)skuContentBySku.Rows[0]["Weight"]; } item.ItemPurchasePrice = (decimal)skuContentBySku.Rows[0]["PurchasePrice"]; item.Quantity = num4; item.ItemListPrice = (decimal)skuContentBySku.Rows[0]["SalePrice"]; if (skuContentBySku.Rows[0]["CostPrice"] != DBNull.Value) { item.ItemCostPrice = (decimal)skuContentBySku.Rows[0]["CostPrice"]; } item.ItemDescription = (string)skuContentBySku.Rows[0]["ProductName"]; item.ItemHomeSiteDescription = (string)skuContentBySku.Rows[0]["ProductName"]; if (skuContentBySku.Rows[0]["ThumbnailUrl40"] != DBNull.Value) { item.ThumbnailsUrl = (string)skuContentBySku.Rows[0]["ThumbnailUrl40"]; } totalWeight += item.ItemWeight * num4; purchaseOrderInfo.PurchaseOrderItems.Add(item); } } } } if (str2 == "") { this.ShowMsg("至少选择一个淘宝订单!!", false); } else { ShippingModeInfo shippingMode = SubsiteSalesHelper.GetShippingMode(this.radioShippingMode.SelectedValue.Value, true); purchaseOrderInfo.ShipTo = this.txtShipTo.Text.Trim(); if (this.rsddlRegion.GetSelectedRegionId().HasValue) { purchaseOrderInfo.RegionId = this.rsddlRegion.GetSelectedRegionId().Value; } purchaseOrderInfo.Address = this.txtAddress.Text.Trim(); purchaseOrderInfo.TelPhone = this.txtTel.Text.Trim(); purchaseOrderInfo.ZipCode = this.txtZipcode.Text.Trim(); purchaseOrderInfo.CellPhone = this.txtMobile.Text.Trim(); purchaseOrderInfo.OrderId = null; purchaseOrderInfo.RealShippingModeId = this.radioShippingMode.SelectedValue.Value; purchaseOrderInfo.RealModeName = shippingMode.Name; purchaseOrderInfo.ShippingModeId = this.radioShippingMode.SelectedValue.Value; purchaseOrderInfo.ModeName = shippingMode.Name; purchaseOrderInfo.AdjustedFreight = SubsiteSalesHelper.CalcFreight(purchaseOrderInfo.RegionId, totalWeight, shippingMode); purchaseOrderInfo.Freight = purchaseOrderInfo.AdjustedFreight; purchaseOrderInfo.ShippingRegion = this.rsddlRegion.SelectedRegions; purchaseOrderInfo.PurchaseStatus = OrderStatus.WaitBuyerPay; purchaseOrderInfo.DistributorId = user.UserId; purchaseOrderInfo.Distributorname = user.Username; purchaseOrderInfo.DistributorEmail = user.Email; purchaseOrderInfo.DistributorRealName = user.RealName; purchaseOrderInfo.DistributorQQ = user.QQ; purchaseOrderInfo.DistributorWangwang = user.Wangwang; purchaseOrderInfo.DistributorMSN = user.MSN; purchaseOrderInfo.RefundStatus = RefundStatus.None; purchaseOrderInfo.Weight = totalWeight; purchaseOrderInfo.Remark = null; purchaseOrderInfo.TaobaoOrderId = str2; if (purchaseOrderInfo.PurchaseOrderItems.Count == 0) { this.ShowMsg("您暂时未选择您要添加的商品", false); } else if (SubsiteSalesHelper.CreatePurchaseOrder(purchaseOrderInfo)) { SubsiteSalesHelper.ClearPurchaseShoppingCart(); this.ResponseCookies(); base.Response.Redirect(Globals.ApplicationPath + "/Shopadmin/purchaseOrder/ChoosePayment.aspx?PurchaseOrderId=" + purchaseOrderInfo.PurchaseOrderId); } else { this.ShowMsg("提交采购单失败", false); } } } }
protected void btnSubmit_Click(object sender, System.EventArgs e) { if (!this.ValidateCreateOrder()) { return; } string text = ""; PurchaseOrderInfo purchaseOrderInfo = new PurchaseOrderInfo(); Hidistro.Membership.Context.Distributor distributor = Hidistro.Membership.Context.Users.GetUser(Hidistro.Membership.Context.HiContext.Current.User.UserId) as Hidistro.Membership.Context.Distributor; string purchaseOrderId = this.GeneratePurchaseOrderId(); purchaseOrderInfo.PurchaseOrderId = purchaseOrderId; decimal num = 0m; for (int i = 0; i < this.rpTaobaoOrder.Items.Count; i++) { System.Web.UI.WebControls.CheckBox checkBox = (System.Web.UI.WebControls.CheckBox) this.rpTaobaoOrder.Items[i].FindControl("chkTbOrder"); if (checkBox.Checked) { text += this.tbOrders[i].orderId; text += ","; System.Web.UI.WebControls.Repeater repeater = (System.Web.UI.WebControls.Repeater) this.rpTaobaoOrder.Items[i].FindControl("reOrderItems"); System.Collections.Generic.IList <SubmitTaobaoPurchaseorderCart.tbOrderItem> items = this.tbOrders[i].items; for (int j = 0; j < repeater.Items.Count; j++) { if (items[j].localSkuId.Trim() == "") { string string_ = string.Format("在授权给分销商的商品中没有找到淘宝商品:{0}!请重新查找", items[j].title); this.ShowMsg(string_, false); return; } string localSkuId = items[j].localSkuId; System.Web.UI.WebControls.TextBox textBox = (System.Web.UI.WebControls.TextBox)repeater.Items[j].FindControl("productNumber"); int num2 = System.Convert.ToInt32(textBox.Text); bool flag = false; foreach (PurchaseOrderItemInfo current in purchaseOrderInfo.PurchaseOrderItems) { if (current.SKU == localSkuId) { flag = true; current.Quantity += num2; num += current.ItemWeight * num2; } } if (!flag) { System.Data.DataTable skuContentBySku = SubSiteProducthelper.GetSkuContentBySku(localSkuId); PurchaseOrderItemInfo purchaseOrderItemInfo = new PurchaseOrderItemInfo(); if (num2 > (int)skuContentBySku.Rows[0]["Stock"]) { this.ShowMsg("商品库存不够", false); return; } foreach (System.Data.DataRow dataRow in skuContentBySku.Rows) { if (!string.IsNullOrEmpty(dataRow["AttributeName"].ToString()) && !string.IsNullOrEmpty(dataRow["ValueStr"].ToString())) { PurchaseOrderItemInfo expr_23B = purchaseOrderItemInfo; object sKUContent = expr_23B.SKUContent; expr_23B.SKUContent = string.Concat(new object[] { sKUContent, dataRow["AttributeName"], ":", dataRow["ValueStr"], "; " }); } } purchaseOrderItemInfo.PurchaseOrderId = purchaseOrderId; purchaseOrderItemInfo.SkuId = localSkuId; purchaseOrderItemInfo.ProductId = (int)skuContentBySku.Rows[0]["ProductId"]; if (skuContentBySku.Rows[0]["SKU"] != System.DBNull.Value) { purchaseOrderItemInfo.SKU = (string)skuContentBySku.Rows[0]["SKU"]; } if (skuContentBySku.Rows[0]["Weight"] != System.DBNull.Value) { purchaseOrderItemInfo.ItemWeight = (decimal)skuContentBySku.Rows[0]["Weight"]; } purchaseOrderItemInfo.ItemPurchasePrice = (decimal)skuContentBySku.Rows[0]["PurchasePrice"]; purchaseOrderItemInfo.Quantity = num2; purchaseOrderItemInfo.ItemListPrice = (decimal)skuContentBySku.Rows[0]["SalePrice"]; if (skuContentBySku.Rows[0]["CostPrice"] != System.DBNull.Value) { purchaseOrderItemInfo.ItemCostPrice = (decimal)skuContentBySku.Rows[0]["CostPrice"]; } purchaseOrderItemInfo.ItemDescription = (string)skuContentBySku.Rows[0]["ProductName"]; purchaseOrderItemInfo.ItemHomeSiteDescription = (string)skuContentBySku.Rows[0]["ProductName"]; if (skuContentBySku.Rows[0]["ThumbnailUrl40"] != System.DBNull.Value) { purchaseOrderItemInfo.ThumbnailsUrl = (string)skuContentBySku.Rows[0]["ThumbnailUrl40"]; } num += purchaseOrderItemInfo.ItemWeight * num2; purchaseOrderInfo.PurchaseOrderItems.Add(purchaseOrderItemInfo); } } } } if (text == "") { this.ShowMsg("至少选择一个淘宝订单!!", false); return; } ShippingModeInfo shippingMode = SubsiteSalesHelper.GetShippingMode(this.radioShippingMode.SelectedValue.Value, true); purchaseOrderInfo.ShipTo = this.txtShipTo.Text.Trim(); if (this.rsddlRegion.GetSelectedRegionId().HasValue) { purchaseOrderInfo.RegionId = this.rsddlRegion.GetSelectedRegionId().Value; } purchaseOrderInfo.Address = this.txtAddress.Text.Trim(); purchaseOrderInfo.TelPhone = this.txtTel.Text.Trim(); purchaseOrderInfo.ZipCode = this.txtZipcode.Text.Trim(); purchaseOrderInfo.CellPhone = this.txtMobile.Text.Trim(); purchaseOrderInfo.OrderId = null; purchaseOrderInfo.RealShippingModeId = this.radioShippingMode.SelectedValue.Value; purchaseOrderInfo.RealModeName = shippingMode.Name; purchaseOrderInfo.ShippingModeId = this.radioShippingMode.SelectedValue.Value; purchaseOrderInfo.ModeName = shippingMode.Name; purchaseOrderInfo.AdjustedFreight = SubsiteSalesHelper.CalcFreight(purchaseOrderInfo.RegionId, num, shippingMode); purchaseOrderInfo.Freight = purchaseOrderInfo.AdjustedFreight; purchaseOrderInfo.ShippingRegion = this.rsddlRegion.SelectedRegions; purchaseOrderInfo.PurchaseStatus = OrderStatus.WaitBuyerPay; purchaseOrderInfo.DistributorId = distributor.UserId; purchaseOrderInfo.Distributorname = distributor.Username; purchaseOrderInfo.DistributorEmail = distributor.Email; purchaseOrderInfo.DistributorRealName = distributor.RealName; purchaseOrderInfo.DistributorQQ = distributor.QQ; purchaseOrderInfo.DistributorWangwang = distributor.Wangwang; purchaseOrderInfo.DistributorMSN = distributor.MSN; purchaseOrderInfo.RefundStatus = RefundStatus.None; purchaseOrderInfo.Weight = num; purchaseOrderInfo.Remark = null; purchaseOrderInfo.TaobaoOrderId = text; if (purchaseOrderInfo.PurchaseOrderItems.Count == 0) { this.ShowMsg("您暂时未选择您要添加的商品", false); return; } if (SubsiteSalesHelper.CreatePurchaseOrder(purchaseOrderInfo)) { SubsiteSalesHelper.ClearPurchaseShoppingCart(); this.ResponseCookies(); base.Response.Redirect(Globals.ApplicationPath + "/Shopadmin/purchaseOrder/ChoosePayment.aspx?PurchaseOrderId=" + purchaseOrderInfo.PurchaseOrderId); return; } this.ShowMsg("提交采购单失败", false); }