Пример #1
0
 private void BindCharges(PurchaseOrderInfo purchaseOrder)
 {
     lblModeName.Text = purchaseOrder.ModeName;
     litFreight.Text = Globals.FormatMoney(purchaseOrder.AdjustedFreight);
     litOptionPrice.Text = Globals.FormatMoney(purchaseOrder.GetOptionPrice());
     litDiscount.Text = Globals.FormatMoney(purchaseOrder.AdjustedDiscount);
     litTotalPrice.Text = Globals.FormatMoney(purchaseOrder.GetPurchaseTotal());
     string str = string.Empty;
     if (purchaseOrder.PurchaseOrderOptions.Count > 0)
     {
         foreach (PurchaseOrderOptionInfo info in purchaseOrder.PurchaseOrderOptions)
         {
             string str2 = str;
             str = str2 + info.ListDescription + ":" + info.ItemDescription + ";" + info.CustomerTitle + ":" + info.CustomerDescription;
         }
     }
     if (!string.IsNullOrEmpty(str))
     {
         litOderItem.Text = "(" + str + ")";
     }
 }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     btnConfirmPay.Click += new EventHandler(btnConfirmPay_Click);
     btnBack.Click += new EventHandler(btnBack_Click);
     btnBack1.Click += new EventHandler(btnBack_Click);
     imgBtnBack.Click += new System.Web.UI.ImageClickEventHandler(btnBack_Click);
     if (string.IsNullOrEmpty(base.Request.QueryString["PurchaseOrderId"]))
     {
         base.GotoResourceNotFound();
     }
     else
     {
         purchaseOrderId = base.Request.QueryString["PurchaseOrderId"];
         purchaseOrder = SubsiteSalesHelper.GetPurchaseOrder(purchaseOrderId);
         if (!base.IsPostBack)
         {
             if (purchaseOrder == null)
             {
                 base.GotoResourceNotFound();
             }
             else
             {
                 if (purchaseOrder.IsManualPurchaseOrder)
                 {
                     litorder.Visible = false;
                     litOrderId.Visible = false;
                 }
                 else
                 {
                     litOrderId.Text = purchaseOrder.OrderId;
                 }
                 litPurchaseOrderId.Text = purchaseOrder.PurchaseOrderId;
                 lblPurchaseDate.Time = purchaseOrder.PurchaseDate;
                 lblTotalPrice.Money = purchaseOrder.GetPurchaseTotal();
                 AccountSummaryInfo myAccountSummary = SubsiteStoreHelper.GetMyAccountSummary();
                 lblUseableBalance.Money = myAccountSummary.UseableBalance;
             }
         }
     }
 }
Пример #3
0
 public static bool ConfirmPayPurchaseOrder(PurchaseOrderInfo purchaseOrder)
 {
     ManagerHelper.CheckPrivilege(Privilege.EditPurchaseorder);
     bool flag = SalesProvider.Instance().ConfirmPayPurchaseOrder(purchaseOrder);
     if (flag)
     {
         SalesProvider.Instance().UpdateProductStock(purchaseOrder.PurchaseOrderId);
         SalesProvider.Instance().UpdateDistributorAccount(purchaseOrder.GetPurchaseTotal(), purchaseOrder.DistributorId);
         Users.ClearUserCache(Users.GetUser(purchaseOrder.DistributorId));
         EventLogs.WriteOperationLog(Privilege.EditPurchaseorder, string.Format(CultureInfo.InvariantCulture, "对编号为\"{0}\"的采购单线下收款", new object[] { purchaseOrder.PurchaseOrderId }));
     }
     return flag;
 }
Пример #4
0
 public override bool UpdatePurchaseOrderAmount(PurchaseOrderInfo purchaseOrder)
 {
     DbCommand sqlStringCommand = database.GetSqlStringCommand("UPDATE Hishop_PurchaseOrders SET PurchaseTotal=@PurchaseTotal, PurchaseProfit=@PurchaseProfit, AdjustedDiscount=@AdjustedDiscount WHERE PurchaseOrderId=@PurchaseOrderId");
     database.AddInParameter(sqlStringCommand, "PurchaseTotal", DbType.Currency, purchaseOrder.GetPurchaseTotal());
     database.AddInParameter(sqlStringCommand, "PurchaseProfit", DbType.Currency, purchaseOrder.GetPurchaseProfit());
     database.AddInParameter(sqlStringCommand, "PurchaseOrderId", DbType.String, purchaseOrder.PurchaseOrderId);
     database.AddInParameter(sqlStringCommand, "AdjustedDiscount", DbType.Currency, purchaseOrder.AdjustedDiscount);
     return (database.ExecuteNonQuery(sqlStringCommand) == 1);
 }
Пример #5
0
 public override bool UpdatePurchaseOrder(PurchaseOrderInfo purchaseOrder)
 {
     DbCommand sqlStringCommand = database.GetSqlStringCommand("UPDATE Hishop_PurchaseOrders SET Weight=@Weight,PurchaseProfit=@PurchaseProfit,PurchaseTotal=@PurchaseTotal,AdjustedFreight=@AdjustedFreight WHERE PurchaseOrderId=@PurchaseOrderId");
     database.AddInParameter(sqlStringCommand, "Weight", DbType.Int32, purchaseOrder.Weight);
     database.AddInParameter(sqlStringCommand, "PurchaseProfit", DbType.Decimal, purchaseOrder.GetPurchaseProfit());
     database.AddInParameter(sqlStringCommand, "PurchaseTotal", DbType.Decimal, purchaseOrder.GetPurchaseTotal());
     database.AddInParameter(sqlStringCommand, "AdjustedFreight", DbType.Decimal, purchaseOrder.AdjustedFreight);
     database.AddInParameter(sqlStringCommand, "PurchaseOrderId", DbType.String, purchaseOrder.PurchaseOrderId);
     return (database.ExecuteNonQuery(sqlStringCommand) > 0);
 }
Пример #6
0
 public override bool CreatePurchaseOrder(PurchaseOrderInfo purchaseOrder, DbTransaction dbTran)
 {
     string str;
     if (purchaseOrder == null)
     {
         return false;
     }
     DbCommand sqlStringCommand = database.GetSqlStringCommand(" ");
     StringBuilder builder = new StringBuilder();
     builder.Append("INSERT INTO Hishop_PurchaseOrders(PurchaseOrderId, OrderId, Remark, ManagerMark, ManagerRemark, AdjustedDiscount,PurchaseStatus, CloseReason, PurchaseDate, DistributorId, Distributorname,DistributorEmail, DistributorRealName, DistributorQQ, DistributorWangwang, DistributorMSN,ShippingRegion, Address, ZipCode, ShipTo, TelPhone, CellPhone, ShippingModeId, ModeName,RealShippingModeId, RealModeName, RegionId, Freight, AdjustedFreight, ShipOrderNumber, Weight,RefundStatus, RefundAmount, RefundRemark, OrderTotal, PurchaseProfit, PurchaseTotal, TaobaoOrderId,ExpressCompanyName,ExpressCompanyAbb)VALUES (@PurchaseOrderId, @OrderId, @Remark, @ManagerMark, @ManagerRemark, @AdjustedDiscount,@PurchaseStatus, @CloseReason, @PurchaseDate, @DistributorId, @Distributorname,@DistributorEmail, @DistributorRealName, @DistributorQQ, @DistributorWangwang, @DistributorMSN,@ShippingRegion, @Address, @ZipCode, @ShipTo, @TelPhone, @CellPhone, @ShippingModeId, @ModeName,@RealShippingModeId, @RealModeName, @RegionId, @Freight, @AdjustedFreight, @ShipOrderNumber, @PurchaseWeight,@RefundStatus, @RefundAmount, @RefundRemark, @OrderTotal, @PurchaseProfit, @PurchaseTotal, @TaobaoOrderId,@ExpressCompanyName,@ExpressCompanyAbb);");
     database.AddInParameter(sqlStringCommand, "PurchaseOrderId", DbType.String, purchaseOrder.PurchaseOrderId);
     if (purchaseOrder.OrderId == null)
     {
         database.AddInParameter(sqlStringCommand, "OrderId", DbType.String, DBNull.Value);
     }
     else
     {
         database.AddInParameter(sqlStringCommand, "OrderId", DbType.String, purchaseOrder.OrderId);
     }
     if (purchaseOrder.Remark == null)
     {
         database.AddInParameter(sqlStringCommand, "Remark", DbType.String, DBNull.Value);
     }
     else
     {
         database.AddInParameter(sqlStringCommand, "Remark", DbType.String, purchaseOrder.Remark);
     }
     if (purchaseOrder.ManagerMark.HasValue)
     {
         database.AddInParameter(sqlStringCommand, "ManagerMark", DbType.Int32, (int)purchaseOrder.ManagerMark.Value);
     }
     else
     {
         database.AddInParameter(sqlStringCommand, "ManagerMark", DbType.Int32, DBNull.Value);
     }
     database.AddInParameter(sqlStringCommand, "ManagerRemark", DbType.String, purchaseOrder.ManagerRemark);
     database.AddInParameter(sqlStringCommand, "AdjustedDiscount", DbType.Currency, purchaseOrder.AdjustedDiscount);
     database.AddInParameter(sqlStringCommand, "PurchaseStatus", DbType.Int32, (int)purchaseOrder.PurchaseStatus);
     database.AddInParameter(sqlStringCommand, "CloseReason", DbType.String, purchaseOrder.CloseReason);
     database.AddInParameter(sqlStringCommand, "PurchaseDate", DbType.DateTime, DateTime.Now);
     database.AddInParameter(sqlStringCommand, "DistributorId", DbType.Int32, purchaseOrder.DistributorId);
     database.AddInParameter(sqlStringCommand, "Distributorname", DbType.String, purchaseOrder.Distributorname);
     database.AddInParameter(sqlStringCommand, "DistributorEmail", DbType.String, purchaseOrder.DistributorEmail);
     database.AddInParameter(sqlStringCommand, "DistributorRealName", DbType.String, purchaseOrder.DistributorRealName);
     database.AddInParameter(sqlStringCommand, "DistributorQQ", DbType.String, purchaseOrder.DistributorQQ);
     database.AddInParameter(sqlStringCommand, "DistributorWangwang", DbType.String, purchaseOrder.DistributorWangwang);
     database.AddInParameter(sqlStringCommand, "DistributorMSN", DbType.String, purchaseOrder.DistributorMSN);
     database.AddInParameter(sqlStringCommand, "ShippingRegion", DbType.String, purchaseOrder.ShippingRegion);
     database.AddInParameter(sqlStringCommand, "Address", DbType.String, purchaseOrder.Address);
     database.AddInParameter(sqlStringCommand, "ZipCode", DbType.String, purchaseOrder.ZipCode);
     database.AddInParameter(sqlStringCommand, "ShipTo", DbType.String, purchaseOrder.ShipTo);
     database.AddInParameter(sqlStringCommand, "TelPhone", DbType.String, purchaseOrder.TelPhone);
     database.AddInParameter(sqlStringCommand, "CellPhone", DbType.String, purchaseOrder.CellPhone);
     database.AddInParameter(sqlStringCommand, "ShippingModeId", DbType.Int32, purchaseOrder.ShippingModeId);
     database.AddInParameter(sqlStringCommand, "ModeName", DbType.String, purchaseOrder.ModeName);
     database.AddInParameter(sqlStringCommand, "RealShippingModeId", DbType.Int32, purchaseOrder.RealShippingModeId);
     database.AddInParameter(sqlStringCommand, "RealModeName", DbType.String, purchaseOrder.RealModeName);
     database.AddInParameter(sqlStringCommand, "RegionId", DbType.Int32, purchaseOrder.RegionId);
     database.AddInParameter(sqlStringCommand, "Freight", DbType.Currency, purchaseOrder.Freight);
     database.AddInParameter(sqlStringCommand, "AdjustedFreight", DbType.Currency, purchaseOrder.AdjustedFreight);
     database.AddInParameter(sqlStringCommand, "ShipOrderNumber", DbType.String, purchaseOrder.ShipOrderNumber);
     database.AddInParameter(sqlStringCommand, "PurchaseWeight", DbType.Int32, purchaseOrder.Weight);
     database.AddInParameter(sqlStringCommand, "RefundStatus", DbType.Int32, (int)purchaseOrder.RefundStatus);
     database.AddInParameter(sqlStringCommand, "RefundAmount", DbType.Currency, purchaseOrder.RefundAmount);
     database.AddInParameter(sqlStringCommand, "RefundRemark", DbType.String, purchaseOrder.RefundRemark);
     database.AddInParameter(sqlStringCommand, "OrderTotal", DbType.Currency, purchaseOrder.OrderTotal);
     database.AddInParameter(sqlStringCommand, "PurchaseProfit", DbType.Currency, purchaseOrder.GetPurchaseProfit());
     database.AddInParameter(sqlStringCommand, "PurchaseTotal", DbType.Currency, purchaseOrder.GetPurchaseTotal());
     database.AddInParameter(sqlStringCommand, "TaobaoOrderId", DbType.String, purchaseOrder.TaobaoOrderId);
     database.AddInParameter(sqlStringCommand, "ExpressCompanyAbb", DbType.String, purchaseOrder.ExpressCompanyAbb);
     database.AddInParameter(sqlStringCommand, "ExpressCompanyName", DbType.String, purchaseOrder.ExpressCompanyName);
     int num = 0;
     foreach (PurchaseOrderItemInfo info in purchaseOrder.PurchaseOrderItems)
     {
         str = num.ToString();
         builder.Append("INSERT INTO Hishop_PurchaseOrderItems(PurchaseOrderId, SkuId, ProductId, SKU, Quantity,  CostPrice, ").Append("ItemListPrice, ItemPurchasePrice, ItemDescription, ItemHomeSiteDescription, SKUContent, ThumbnailsUrl, Weight) VALUES( @PurchaseOrderId").Append(",@SkuId").Append(str).Append(",@ProductId").Append(str).Append(",@SKU").Append(str).Append(",@Quantity").Append(str).Append(",@CostPrice").Append(str).Append(",@ItemListPrice").Append(str).Append(",@ItemPurchasePrice").Append(str).Append(",@ItemDescription").Append(str).Append(",@ItemHomeSiteDescription").Append(str).Append(",@SKUContent").Append(str).Append(",@ThumbnailsUrl").Append(str).Append(",@Weight").Append(str).Append(");");
         database.AddInParameter(sqlStringCommand, "SkuId" + str, DbType.String, info.SkuId);
         database.AddInParameter(sqlStringCommand, "ProductId" + str, DbType.Int32, info.ProductId);
         database.AddInParameter(sqlStringCommand, "SKU" + str, DbType.String, info.SKU);
         database.AddInParameter(sqlStringCommand, "Quantity" + str, DbType.Int32, info.Quantity);
         database.AddInParameter(sqlStringCommand, "CostPrice" + str, DbType.Currency, info.ItemCostPrice);
         database.AddInParameter(sqlStringCommand, "ItemListPrice" + str, DbType.Currency, info.ItemListPrice);
         database.AddInParameter(sqlStringCommand, "ItemPurchasePrice" + str, DbType.Currency, info.ItemPurchasePrice);
         database.AddInParameter(sqlStringCommand, "ItemDescription" + str, DbType.String, info.ItemDescription);
         database.AddInParameter(sqlStringCommand, "ItemHomeSiteDescription" + str, DbType.String, info.ItemHomeSiteDescription);
         database.AddInParameter(sqlStringCommand, "SKUContent" + str, DbType.String, info.SKUContent);
         database.AddInParameter(sqlStringCommand, "ThumbnailsUrl" + str, DbType.String, info.ThumbnailsUrl);
         database.AddInParameter(sqlStringCommand, "Weight" + str, DbType.Int32, info.ItemWeight);
         num++;
     }
     foreach (PurchaseOrderGiftInfo info2 in purchaseOrder.PurchaseOrderGifts)
     {
         str = num.ToString();
         builder.Append("INSERT INTO Hishop_PurchaseOrderGifts(PurchaseOrderId, GiftId, GiftName, CostPrice, PurchasePrice, ").Append("ThumbnailsUrl, Quantity) VALUES( @PurchaseOrderId,").Append("@GiftId").Append(str).Append(",@GiftName").Append(str).Append(",@CostPrice").Append(str).Append(",@PurchasePrice").Append(str).Append(",@ThumbnailsUrl").Append(str).Append(",@Quantity").Append(str).Append(");");
         database.AddInParameter(sqlStringCommand, "GiftId" + str, DbType.Int32, info2.GiftId);
         database.AddInParameter(sqlStringCommand, "GiftName" + str, DbType.String, info2.GiftName);
         database.AddInParameter(sqlStringCommand, "Quantity" + str, DbType.Int32, info2.Quantity);
         database.AddInParameter(sqlStringCommand, "CostPrice" + str, DbType.Currency, info2.CostPrice);
         database.AddInParameter(sqlStringCommand, "PurchasePrice" + str, DbType.Currency, info2.PurchasePrice);
         database.AddInParameter(sqlStringCommand, "ThumbnailsUrl" + str, DbType.String, info2.ThumbnailsUrl);
         num++;
     }
     foreach (PurchaseOrderOptionInfo info3 in purchaseOrder.PurchaseOrderOptions)
     {
         builder.Append("INSERT INTO Hishop_PurchaseOrderOptions (PurchaseOrderId, LookupListId, LookupItemId, ListDescription, ItemDescription, AdjustedPrice, CustomerTitle, CustomerDescription)").Append(" VALUES (@PurchaseOrderId, @LookupListId").Append(num).Append(", @LookupItemId").Append(num).Append(", @ListDescription").Append(num).Append(", @ItemDescription").Append(num).Append(", @AdjustedPrice").Append(num).Append(", @CustomerTitle").Append(num).Append(", @CustomerDescription").Append(num).Append(");");
         database.AddInParameter(sqlStringCommand, "LookupListId" + num, DbType.Int32, info3.LookupListId);
         database.AddInParameter(sqlStringCommand, "LookupItemId" + num, DbType.Int32, info3.LookupItemId);
         database.AddInParameter(sqlStringCommand, "ListDescription" + num, DbType.String, info3.ListDescription);
         database.AddInParameter(sqlStringCommand, "ItemDescription" + num, DbType.String, info3.ItemDescription);
         database.AddInParameter(sqlStringCommand, "AdjustedPrice" + num, DbType.Currency, info3.AdjustedPrice);
         database.AddInParameter(sqlStringCommand, "CustomerTitle" + num, DbType.String, info3.CustomerTitle);
         database.AddInParameter(sqlStringCommand, "CustomerDescription" + num, DbType.String, info3.CustomerDescription);
         num++;
     }
     sqlStringCommand.CommandText = builder.ToString().Remove(builder.Length - 1);
     if (dbTran != null)
     {
         return (database.ExecuteNonQuery(sqlStringCommand, dbTran) > 0);
     }
     return (database.ExecuteNonQuery(sqlStringCommand) > 0);
 }
Пример #7
0
 public override bool ResetPurchaseTotal(PurchaseOrderInfo purchaseOrder, DbTransaction dbTran)
 {
     DbCommand sqlStringCommand = database.GetSqlStringCommand("Update Hishop_PurchaseOrders set PurchaseTotal=@PurchaseTotal,PurchaseProfit=@PurchaseProfit where PurchaseOrderId=@PurchaseOrderId");
     database.AddInParameter(sqlStringCommand, "PurchaseTotal", DbType.Decimal, purchaseOrder.GetPurchaseTotal());
     database.AddInParameter(sqlStringCommand, "PurchaseOrderId", DbType.String, purchaseOrder.PurchaseOrderId);
     database.AddInParameter(sqlStringCommand, "PurchaseProfit", DbType.Decimal, purchaseOrder.GetPurchaseProfit());
     if (dbTran != null)
     {
         return (database.ExecuteNonQuery(sqlStringCommand, dbTran) == 1);
     }
     return (database.ExecuteNonQuery(sqlStringCommand) == 1);
 }
Пример #8
0
 private void WritPurchaseOrderInfo(PurchaseOrderInfo prurchaseOrder, ShippersInfo shipper)
 {
     string[] strArray = RegionHelper.GetFullRegion(prurchaseOrder.RegionId, ",").Split(new char[] { ',' });
     StringBuilder builder = new StringBuilder();
     builder.AppendLine("<nodes>");
     builder.AppendLine("<item>");
     builder.AppendLine("<name>收货人-姓名</name>");
     builder.AppendFormat("<rename>{0}</rename>", prurchaseOrder.ShipTo);
     builder.AppendLine("</item>");
     builder.AppendLine("<item>");
     builder.AppendLine("<name>收货人-电话</name>");
     builder.AppendFormat("<rename>{0}</rename>", prurchaseOrder.TelPhone + "_");
     builder.AppendLine("</item>");
     builder.AppendLine("<item>");
     builder.AppendLine("<name>收货人-手机</name>");
     builder.AppendFormat("<rename>{0}</rename>", prurchaseOrder.CellPhone + "_");
     builder.AppendLine("</item>");
     builder.AppendLine("<item>");
     builder.AppendLine("<name>收货人-邮编</name>");
     builder.AppendFormat("<rename>{0}</rename>", prurchaseOrder.ZipCode + "_");
     builder.AppendLine("</item>");
     builder.AppendLine("<item>");
     builder.AppendLine("<name>收货人-地址</name>");
     builder.AppendFormat("<rename>{0}</rename>", prurchaseOrder.Address);
     builder.AppendLine("</item>");
     if (strArray.Length > 0)
     {
         builder.AppendLine("<item>");
         builder.AppendLine("<name>收货人-地区1级</name>");
         builder.AppendFormat("<rename>{0}</rename>", strArray[0]);
         builder.AppendLine("</item>");
     }
     if (strArray.Length > 1)
     {
         builder.AppendLine("<item>");
         builder.AppendLine("<name>收货人-地区2级</name>");
         builder.AppendFormat("<rename>{0}</rename>", strArray[1]);
         builder.AppendLine("</item>");
     }
     if (strArray.Length > 2)
     {
         builder.AppendLine("<item>");
         builder.AppendLine("<name>收货人-地区3级</name>");
         builder.AppendFormat("<rename>{0}</rename>", strArray[2]);
         builder.AppendLine("</item>");
     }
     if (shipper != null)
     {
         string[] strArray2 = RegionHelper.GetFullRegion(shipper.RegionId, ",").Split(new char[] { ',' });
         builder.AppendLine("<item>");
         builder.AppendLine("<name>发货人-姓名</name>");
         builder.AppendFormat("<rename>{0}</rename>", shipper.ShipperName);
         builder.AppendLine("</item>");
         builder.AppendLine("<item>");
         builder.AppendLine("<name>发货人-手机</name>");
         builder.AppendFormat("<rename>{0}</rename>", shipper.CellPhone + "_");
         builder.AppendLine("</item>");
         builder.AppendLine("<item>");
         builder.AppendLine("<name>发货人-电话</name>");
         builder.AppendFormat("<rename>{0}</rename>", shipper.TelPhone + "_");
         builder.AppendLine("</item>");
         builder.AppendLine("<item>");
         builder.AppendLine("<name>发货人-地址</name>");
         builder.AppendFormat("<rename>{0}</rename>", shipper.Address);
         builder.AppendLine("</item>");
         builder.AppendLine("<item>");
         builder.AppendLine("<name>发货人-邮编</name>");
         builder.AppendFormat("<rename>{0}</rename>", shipper.Zipcode + "_");
         builder.AppendLine("</item>");
         if (strArray2.Length > 0)
         {
             builder.AppendLine("<item>");
             builder.AppendLine("<name>发货人-地区1级</name>");
             builder.AppendFormat("<rename>{0}</rename>", strArray2[0]);
             builder.AppendLine("</item>");
         }
         if (strArray2.Length > 1)
         {
             builder.AppendLine("<item>");
             builder.AppendLine("<name>发货人-地区2级</name>");
             builder.AppendFormat("<rename>{0}</rename>", strArray2[1]);
             builder.AppendLine("</item>");
         }
         if (strArray2.Length > 2)
         {
             builder.AppendLine("<item>");
             builder.AppendLine("<name>发货人-地区3级</name>");
             builder.AppendFormat("<rename>{0}</rename>", strArray2[2]);
             builder.AppendLine("</item>");
         }
     }
     builder.AppendLine("<item>");
     builder.AppendLine("<name>订单-订单号</name>");
     builder.AppendFormat("<rename>{0}</rename>", prurchaseOrder.PurchaseOrderId);
     builder.AppendLine("</item>");
     builder.AppendLine("<item>");
     builder.AppendLine("<name>订单-总金额</name>");
     builder.AppendFormat("<rename>{0}</rename>", prurchaseOrder.GetPurchaseTotal() + "_");
     builder.AppendLine("</item>");
     builder.AppendLine("<item>");
     builder.AppendLine("<name>订单-物品总重量</name>");
     builder.AppendFormat("<rename>{0}</rename>", prurchaseOrder.Weight);
     builder.AppendLine("</item>");
     builder.AppendLine("<item>");
     builder.AppendLine("<name>订单-备注</name>");
     builder.AppendFormat("<rename>{0}</rename>", prurchaseOrder.ManagerRemark);
     builder.AppendLine("</item>");
     string shipperId = "";
     if ((prurchaseOrder.PurchaseOrderItems != null) && (prurchaseOrder.PurchaseOrderItems.Count > 0))
     {
         foreach (PurchaseOrderItemInfo info in prurchaseOrder.PurchaseOrderItems)
         {
             object obj2 = shipperId;
             shipperId = string.Concat(new object[] { obj2, "货号 ", info.SKU, " ", info.SKUContent, " \x00d7", info.Quantity, "\n" });
         }
         shipperId = shipperId.Replace(";", "").Replace(";", "").Replace(":", ":");
     }
     builder.AppendLine("<item>");
     builder.AppendLine("<name>订单-详情</name>");
     builder.AppendFormat("<rename>{0}</rename>", shipperId);
     builder.AppendLine("</item>");
     builder.AppendLine("<item>");
     builder.AppendLine("<name>订单-送货时间</name>");
     builder.AppendFormat("<rename>{0}</rename>", prurchaseOrder.ShippingDate);
     builder.AppendLine("</item>");
     builder.AppendLine("<item>");
     builder.AppendLine("<name>网店名称</name>");
     builder.AppendFormat("<rename>{0}</rename>", HiContext.Current.SiteSettings.SiteName);
     builder.AppendLine("</item>");
     builder.AppendLine("<item>");
     builder.AppendLine("<name>√</name>");
     builder.AppendFormat("<rename>{0}</rename>", "√");
     builder.AppendLine("</item>");
     builder.AppendLine("<item>");
     builder.AppendLine("<name>自定义内容</name>");
     builder.AppendFormat("<rename>{0}</rename>", "null");
     builder.AppendLine("</item>");
     builder.AppendLine("</nodes>");
     base.Response.Write(builder.ToString());
 }
Пример #9
0
 public static bool ConfirmPay(BalanceDetailInfo balance, PurchaseOrderInfo purchaseOrder)
 {
     if (!purchaseOrder.CheckAction(PurchaseOrderActions.DISTRIBUTOR_CONFIRM_PAY))
     {
         return false;
     }
     bool flag = SubsiteSalesProvider.Instance().ConfirmPay(balance, purchaseOrder.PurchaseOrderId);
     if (flag)
     {
         SubsiteSalesProvider.Instance().UpdateProductStock(purchaseOrder.PurchaseOrderId);
         SubsiteSalesProvider.Instance().UpdateDistributorAccount(purchaseOrder.GetPurchaseTotal());
         Users.ClearUserCache(Users.GetUser(purchaseOrder.DistributorId));
     }
     return flag;
 }
Пример #10
0
 private void SetControl(PurchaseOrderInfo purchaseOrder)
 {
     if (!purchaseOrder.CheckAction(PurchaseOrderActions.MASTER_REJECT_REFUND))
     {
         base.GotoResourceNotFound();
     }
     else
     {
         Distributor distributor = DistributorHelper.GetDistributor(purchaseOrder.DistributorId);
         if (distributor == null)
         {
             base.GotoResourceNotFound();
         }
         else
         {
             litDistributorName.Text = distributor.Username;
             litOrderId.Text = purchaseOrder.OrderId;
             lblOrderDate.Time = purchaseOrder.PurchaseDate;
             litPurchaseOrderId.Text = purchaseOrder.PurchaseOrderId;
             lblTotalPrice.Money = purchaseOrder.GetPurchaseTotal();
             lblPurchaseStatus.PuchaseStatusCode = (int)purchaseOrder.PurchaseStatus;
             if (purchaseOrder.PurchaseStatus == OrderStatus.SellerAlreadySent)
             {
                 lblRefundTotal.Visible = false;
                 litRefundComment.Text = "退款金额不得大于" + lblTotalPrice.Money + "元.已发货订单允许全额或部分退款。";
             }
             else
             {
                 txtRefundTotal.Style.Add(HtmlTextWriterStyle.Display, "none");
                 lblRefundTotal.Money = lblTotalPrice.Money;
                 litRefundComment.Text = "已付款等待发货订单只允许全额退款.退款后采购单自动变为关闭状态。";
             }
         }
     }
 }