App_Code/BLL/Bs_OrderBLL.cs

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BLL.ShoppingCart;
using Com;
/// <summary>
/// Bs_OrderBLL 的摘要说明
/// </summary>
public class Bs_OrderBLL
{
    public readonly Bs_OrderDao dao = new Bs_OrderDao();


    /// <summary>
    /// 新增订单
    /// </summary>
    /// <param name="order"></param>
    /// <param name="cart"></param>
    /// <param name="proCode"></param>
    /// <param name="pay"></param>
    /// <param name="userId"></param>
    public void addOrder(Bs_Orders order, Cart cart, ref string proCode, ref decimal pay, int userId)
    {
        string strSql = "";
        decimal deliverPay = 0;

        DataTable dtDeliver = dao.getDeliverByCode(order.Sy_DeliverCode);

        if (dtDeliver.Rows.Count > 0)
        {
            deliverPay = decimal.Parse(dtDeliver.Rows[0]["amount"].ToString());
            order.DeliverFee = deliverPay;
        }
        Random rd = new Random();
        string orderCode = DateTime.Now.ToString("yyyyMMdd") + rd.Next(1000, 9999).ToString();
        order.Code = orderCode;
        decimal Amount = 0;
        int qty = 0;
        foreach (Product cartPro in cart.Values.Values)
        {
            Bs_Products pro =  Factory.getProBllInstance().getProById(cartPro.ProId);
            Bs_OrdersDtl orderDtl = new Bs_OrdersDtl();
            orderDtl.Bs_OrdersCode = orderCode;
            orderDtl.Price = decimal.Parse(cartPro.Price.ToString());
            orderDtl.Quantity = cartPro.Qty;
            orderDtl.Bs_ProductsCode = pro.Code;
            orderDtl.Amount = (decimal)(cartPro.Price * cartPro.Qty);
            orderDtl.Color = cartPro.Color;
            orderDtl.Width = cartPro.Width;
            orderDtl.Dimension = cartPro.Size;
            dao.addOrderDtl(orderDtl);
            qty += cartPro.Qty;
            Amount += (decimal)orderDtl.Amount;
        }
后面还有 206 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。