Exemplo n.º 1
0
        protected override void PageLoad()
        {
            base.PageLoad();
            int queryString = RequestHelper.GetQueryString <int>("ID");

            this.order = OrderBLL.ReadOrder(queryString, base.UserID);
            if (this.order.GiftID > 0)
            {
                this.gift = GiftBLL.ReadGift(this.order.GiftID);
            }
            this.orderDetailList = OrderDetailBLL.ReadOrderDetailByOrder(queryString);
            string str = string.Empty;

            foreach (OrderDetailInfo info in this.orderDetailList)
            {
                if (str == string.Empty)
                {
                    str = info.ProductID.ToString();
                }
                else
                {
                    str = str + "," + info.ProductID.ToString();
                }
            }
            if (str != string.Empty)
            {
                ProductSearchInfo productSearch = new ProductSearchInfo();
                productSearch.InProductID = str;
                this.productList          = ProductBLL.SearchProductList(productSearch);
            }
            OrderDetailBLL.HandlerOrderDetailList(this.orderDetailList, ref this.orderGiftPackVirtualList, ref this.orderCommonProductVirtualList);
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int    orderId = RequestHelper.GetQueryString <int>("OrderId");
            string action  = RequestHelper.GetQueryString <string>("Action");

            if (orderId > 0 && action != string.Empty)
            {
                OrderInfo order = OrderBLL.Read(orderId);
                List <OrderDetailInfo> orderDetailList = OrderDetailBLL.ReadList(orderId);
                switch (action)
                {
                case "Html":
                    HtmlPrint(order, orderDetailList);
                    break;

                case "Excel":
                    ExcelPrint(order, orderDetailList);
                    break;

                case "ExportSingle":
                    ExportSingle();
                    break;

                default:
                    break;
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 读取购物车
        /// </summary>
        private void ReadCart()
        {
            cartList = CartBLL.ReadList(base.UserId);

            //关联的商品
            int count = 0;

            int[] ids      = cartList.Select(k => k.ProductId).ToArray();
            var   products = ProductBLL.SearchList(1, ids.Count(), new ProductSearchInfo {
                InProductId = string.Join(",", ids)
            }, ref count);

            //规格
            foreach (var cart in cartList)
            {
                cart.Product = products.FirstOrDefault(k => k.Id == cart.ProductId) ?? new ProductInfo();

                if (!string.IsNullOrEmpty(cart.StandardValueList))
                {
                    //使用规格的价格和库存
                    var standardRecord = ProductTypeStandardRecordBLL.Read(cart.ProductId, cart.StandardValueList);
                    cart.Price            = standardRecord.SalePrice;
                    cart.LeftStorageCount = standardRecord.Storage - OrderDetailBLL.GetOrderCount(cart.ProductId, cart.StandardValueList);
                    //规格集合
                    cart.Standards = ProductTypeStandardBLL.ReadList(Array.ConvertAll <string, int>(standardRecord.StandardIdList.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries), k => Convert.ToInt32(k)));
                }
                else
                {
                    cart.Price            = cart.Product.SalePrice;
                    cart.LeftStorageCount = cart.Product.TotalStorageCount - OrderDetailBLL.GetOrderCount(cart.ProductId, cart.StandardValueList);
                }
            }
        }
Exemplo n.º 4
0
        protected override void PageLoad()
        {
            base.PageLoad();

            int orderId = RequestHelper.GetQueryString <int>("id");

            if (CurrentUser.UserType == (int)UserType.Member)
            {
                order = OrderBLL.Read(orderId, base.UserId);
            }
            else
            {
                order = OrderBLL.ReadByShopId(orderId, base.UserId);
            }

            if (order.Id <= 0)
            {
                ScriptHelper.AlertFront("订单不存在", "/user/index.html");
            }

            orderDetailList = OrderDetailBLL.ReadList(orderId);
            int[] productIds = orderDetailList.Select(k => k.ProductId).ToArray();
            if (productIds.Length > 0)
            {
                int count = 0;
                productList = ProductBLL.SearchList(1, productIds.Length, new ProductSearchInfo {
                    InProductId = string.Join(",", productIds)
                }, ref count);
            }

            Title = "我的订单";
        }
Exemplo n.º 5
0
        public static Dictionary <int, DateTime> ReadPrepaidTestCateList(int UserId)
        {
            Dictionary <int, DateTime> prepaidTestCateList = new Dictionary <int, DateTime>();

            OrderSearchInfo orderSearch = new OrderSearchInfo();

            orderSearch.StartPayDate = DateTime.Now.AddDays(-30);
            orderSearch.UserID       = UserId;
            orderSearch.OrderStatus  = 2;
            List <OrderInfo> orderList = OrderBLL.SearchOrderList(orderSearch);

            foreach (OrderInfo info in orderList)
            {
                List <OrderDetailInfo> orderDetailList = OrderDetailBLL.ReadOrderDetailByOrder(info.ID);
                foreach (OrderDetailInfo item in orderDetailList)
                {
                    if (!prepaidTestCateList.ContainsKey(item.ProductID))
                    {
                        prepaidTestCateList.Add(item.ProductID, info.PayDate);
                    }
                }
            }

            return(prepaidTestCateList);
        }
Exemplo n.º 6
0
        private void btn_ekle_Click(object sender, EventArgs e)
        {
            int     orderID = OrderBLL.AddOrders(CustomerID, Convert.ToInt32(comboBox1.SelectedValue));
            Product product = ProductBLL.GetProduct((int)dataGridView1.SelectedRows[0].Cells["ProductID"].Value);

            OrderDetailBLL.AddOrderDetails(orderID, product);
        }
Exemplo n.º 7
0
        /// <summary>
        /// 添加订单产品
        /// </summary>
        /// <param name="orderID"></param>
        protected void AddOrderProduct(int orderID)
        {
            List <CartInfo> cartList = CartBLL.ReadList(base.UserId);

            //读取产品
            checkCart = HttpUtility.UrlDecode(CookiesHelper.ReadCookieValue("CheckCart"));
            int[] cartIds = Array.ConvertAll <string, int>(checkCart.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), k => Convert.ToInt32(k));

            cartList = CartBLL.ReadList(base.UserId);
            cartList = cartList.Where(k => cartIds.Contains(k.Id)).ToList();

            string strProductID = string.Empty;

            foreach (CartInfo cart in cartList)
            {
                if (strProductID == string.Empty)
                {
                    strProductID = cart.ProductId.ToString();
                }
                else
                {
                    strProductID += "," + cart.ProductId.ToString();
                }
            }
            List <ProductInfo> productList = new List <ProductInfo>();

            if (strProductID != string.Empty)
            {
                ProductSearchInfo productSearch = new ProductSearchInfo();
                productSearch.InProductId = strProductID;
                productList = ProductBLL.SearchList(productSearch);
            }
            //会员价格
            //List<MemberPriceInfo> memberPriceList = MemberPriceBLL.ReadMemberPriceByProductGrade(strProductID, base.GradeID);
            //添加订单产品
            Dictionary <string, bool> cartDic            = new Dictionary <string, bool>();
            Dictionary <int, int>     cartOrderDetailDic = new Dictionary <int, int>();

            foreach (CartInfo cart in cartList)
            {
                ProductInfo     product     = ProductBLL.ReadProductByProductList(productList, cart.ProductId);
                OrderDetailInfo orderDetail = new OrderDetailInfo();
                orderDetail.OrderId       = orderID;
                orderDetail.ProductId     = cart.ProductId;
                orderDetail.ProductName   = cart.ProductName;
                orderDetail.ProductWeight = product.Weight;
                orderDetail.SendPoint     = product.SendPoint;

                orderDetail.ProductPrice = ProductBLL.GetCurrentPriceWithStandard(product.Id, base.GradeID, cart.StandardValueList);

                orderDetail.BuyCount = cart.BuyCount;

                orderDetail.RandNumber = cart.RandNumber;
                int orderDetailID = OrderDetailBLL.Add(orderDetail);
                cartOrderDetailDic.Add(cart.Id, orderDetailID);
            }

            CartBLL.Delete(cartIds, base.UserId);
            //CartBLL.Clear(base.UserId);
        }
Exemplo n.º 8
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Order o = new Order();
            o.OrderNo = CreateOrderNo();// rastgele oluştur
            o.UserId = new Guid(Membership.GetUser().ProviderUserKey.ToString());
            o.Date = DateTime.Now;

            OrderBLL ob = new OrderBLL();

            ob.Add(o);

            ProductBLL pb = new ProductBLL();
            foreach (var p in Helper.Sepet)
            {
                OrderDetail od = new OrderDetail();
                od.OrderId = o.Id;
                od.ProductId = p.Id;
                od.Quantity = p.Quantity;

                OrderDetailBLL obll = new OrderDetailBLL();
                obll.Add(od);

                Product pr = pb.Get(x => x.Id == p.Id).FirstOrDefault();

                pr.Stock -= p.Quantity;
                pb.Update(pr);

                Helper.Sepet = new List<ProductDTO>();

            }
        }
 public frmBillManager()
 {
     InitializeComponent();
     bindingSource            = new BindingSource();
     orderBLL                 = new OrderBLL();
     bindingSourceOrderDetail = new BindingSource();
     orderDetailBLL           = new OrderDetailBLL();
 }
 public frmReport()
 {
     InitializeComponent();
     orderBLL       = new OrderBLL();
     bindingSource  = new BindingSource();
     orderDetailBLL = new OrderDetailBLL();
     accesoryBLL    = new AccesoryBLL();
 }
 public frmBillManager(frmMainUI_Staff f)
 {
     InitializeComponent();
     frm_main                 = f;
     bindingSource            = new BindingSource();
     orderBLL                 = new OrderBLL();
     bindingSourceOrderDetail = new BindingSource();
     orderDetailBLL           = new OrderDetailBLL();
 }
Exemplo n.º 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClearCache();

            //订单产品操作
            string action = RequestHelper.GetQueryString <string>("Action");

            if (!string.IsNullOrEmpty(action))
            {
                int       tempOrderId = RequestHelper.GetQueryString <int>("OrderId");
                OrderInfo tempOrder   = OrderBLL.Read(tempOrderId);
                int       isCod       = PayPlugins.ReadPayPlugins(tempOrder.PayKey).IsCod;
                if ((tempOrder.OrderStatus == (int)OrderStatus.WaitPay || tempOrder.OrderStatus == (int)OrderStatus.WaitCheck && isCod == (int)BoolType.True) && (tempOrder.IsActivity == (int)OrderKind.Common || tempOrder.IsActivity == (int)OrderKind.GroupBuy))
                {
                    switch (action)
                    {
                    case "DeleteOrderProduct":
                        DeleteOrderProduct();
                        break;

                    case "ChangeOrderProductBuyCount":
                        ChangeOrderProductBuyCount();
                        break;

                    default:
                        break;
                    }
                }
                else
                {
                    ResponseHelper.Write("订单已经审核,无法修改");
                    ResponseHelper.End();
                }
            }

            //读取订单产品
            int orderId = RequestHelper.GetQueryString <int>("Id");

            if (orderId != int.MinValue)
            {
                CheckAdminPower("ReadOrder", PowerCheckType.Single);
                order = OrderBLL.Read(orderId);
                int isCod = PayPlugins.ReadPayPlugins(order.PayKey).IsCod;
                if ((order.OrderStatus == (int)OrderStatus.WaitPay || order.OrderStatus == (int)OrderStatus.WaitCheck && isCod == (int)BoolType.True) && (order.IsActivity == (int)OrderKind.Common || order.IsActivity == (int)OrderKind.GroupBuy))
                {
                    canEdit = true;
                }
                orderDetailList = OrderDetailBLL.ReadList(orderId);

                foreach (OrderDetailInfo orderDetail in orderDetailList)
                {
                    totalProductCount += orderDetail.BuyCount;
                    totalWeight       += orderDetail.BuyCount * orderDetail.ProductWeight;
                    totalPoint        += orderDetail.BuyCount * orderDetail.SendPoint;
                }
            }
        }
 public frmReport(frmMainUI_Staff f, int kbc)
 {
     InitializeComponent();
     fmain          = f;
     kieuBaoCao     = kbc;
     orderBLL       = new OrderBLL();
     bindingSource  = new BindingSource();
     orderDetailBLL = new OrderDetailBLL();
     accesoryBLL    = new AccesoryBLL();
 }
Exemplo n.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CenterTitle.Text = "¶©µ¥ÏêÇé";
            userID           = base.UserID;
            int queryString = RequestHelper.GetQueryString <int>("ID");

            this.order            = OrderBLL.ReadOrder(queryString, userID);
            RecordList.DataSource = OrderDetailBLL.ReadOrderDetailByOrder(queryString);
            RecordList.DataBind();
        }
Exemplo n.º 15
0
 public UCTable(Form_Restaurant form1)
 {
     orderBLL       = new OrderBLL();
     orderDetailBLL = new OrderDetailBLL();
     tableBLL       = new TableBLL();
     lsTable_temp   = tableBLL.GetListTable();
     orderBLL       = new OrderBLL();
     mainform       = form1;
     InitializeComponent();
     LoadData();
 }
Exemplo n.º 16
0
        protected override void PageLoad()
        {
            base.PageLoad();
            int id = RequestHelper.GetQueryString <int>("id");

            orderRefund           = OrderRefundBLL.Read(id);
            order                 = OrderBLL.Read(orderRefund.OrderId);
            order.OrderDetailList = OrderDetailBLL.ReadList(orderRefund.OrderId);

            topNav = 0;
        }
        public ActionResult Detail(OrderModel model)
        {
            OrderBLL         orderBLL    = new OrderBLL();
            OrderDetailBLL   bll         = new OrderDetailBLL();
            OrderDetailModel detailModel = new OrderDetailModel();

            detailModel.order = orderBLL.Find(model.orderID);
            detailModel.list  = bll.GetList(model.orderID);

            return(View(detailModel));
        }
Exemplo n.º 18
0
        protected bool isPL = true;                                                  //是否已评论
        /// <summary>
        /// 页面加载
        /// </summary>
        protected override void PageLoad()
        {
            base.PageLoad();
            user          = UserBLL.ReadUserMore(base.UserId);
            userGradeName = UserGradeBLL.Read(base.GradeID).Name;
            int orderID = RequestHelper.GetQueryString <int>("ID");

            order = OrderBLL.Read(orderID, base.UserId);
            if (order.OrderStatus != (int)OrderStatus.ReceiveShipping)
            {
                ScriptHelper.AlertFront("只能评论已收货订单");
            }
            orderDetailList = OrderDetailBLL.ReadList(orderID);
            #region 加载订单下产品
            string strProductID = string.Empty;
            foreach (OrderDetailInfo orderDetail in orderDetailList)
            {
                if (strProductID == string.Empty)
                {
                    strProductID = orderDetail.ProductId.ToString();
                }
                else
                {
                    strProductID += "," + orderDetail.ProductId.ToString();
                }
            }
            if (strProductID != string.Empty)
            {
                ProductSearchInfo productSearch = new ProductSearchInfo();
                productSearch.InProductId = strProductID;
                productList = ProductBLL.SearchList(productSearch);
            }
            #endregion
            #region 判断是否已评论
            List <ProductCommentInfo>[] listPinfoArr = new List <ProductCommentInfo> [productList.Count];
            int pi = 0;
            foreach (ProductInfo item in productList)
            {
                ProductCommentSearchInfo psi = new ProductCommentSearchInfo();
                psi.ProductId    = item.Id;
                psi.UserId       = base.UserId;
                psi.OrderID      = orderID;
                listPinfoArr[pi] = ProductCommentBLL.SearchProductCommentList(psi);
                if (listPinfoArr[pi].Count <= 0)
                {
                    isPL = false;
                }
            }
            #endregion
            if (isPL)
            {
                Response.Redirect("/User/OrderDetail.html?ID=" + orderID);
            }
        }
Exemplo n.º 19
0
        protected override void PageLoad()
        {
            base.PageLoad();

            int orderId = RequestHelper.GetQueryString <int>("orderId");

            order           = OrderBLL.Read(orderId, base.UserId);
            orderDetailList = OrderDetailBLL.ReadList(orderId);
            productIds      = string.Join(",", orderDetailList.Select(k => k.ProductId).ToArray());

            Title = "订单评价";
        }
Exemplo n.º 20
0
        private void OrderList_listOr()
        {
            MemberEntity   memberEntity = (MemberEntity)Session["usr"];
            OrderDetailBLL orderDetail  = new OrderDetailBLL();
            int            count        = 0;
            //List<OrderDetailEntity> listor = orderDetail.list(memberEntity.MemberId, 1, 4, out count);
            List <OrderDetailEntity> listor = orderDetail.list(memberEntity.MemberId, int.Parse(Request["Pageint"]), int.Parse(Request["Pagesize"]), out count);
            string str = count + "(fan_ker)" + MyJson.ToJsJson(listor);

            Response.Write(str);
            Response.End();
        }
Exemplo n.º 21
0
        /// <summary>
        /// 删除订单中的商品
        /// </summary>
        protected void DeleteOrderProduct()
        {
            int strOrderDetailID = RequestHelper.GetQueryString <int>("StrOrderDetailID");
            int strProductID     = RequestHelper.GetQueryString <int>("StrProductID");
            int oldCount         = RequestHelper.GetQueryString <int>("OldCount");
            int orderId          = RequestHelper.GetQueryString <int>("OrderID");

            ProductBLL.ChangeOrderCount(strProductID, oldCount);
            OrderDetailBLL.Delete(strOrderDetailID);
            OrderUpdateHanlder(orderId);
            ResponseHelper.End();
        }
Exemplo n.º 22
0
        protected bool isPL            = true;//是否已评论

        protected override void PageLoad()
        {
            base.PageLoad();
            //检查用户的待付款订单是否超时失效,超时则更新为失效状态
            OrderBLL.CheckOrderPayTime(base.UserId);
            int orderId = RequestHelper.GetQueryString <int>("id");

            userGradeName = UserGradeBLL.Read(base.GradeID).Name;


            order = OrderBLL.Read(orderId, base.UserId);


            if (order.Id <= 0)
            {
                ScriptHelper.AlertFront("订单不存在", "/user/index.html");
            }
            //礼品
            if (order.GiftId > 0)
            {
                gift = FavorableActivityGiftBLL.Read(order.GiftId);
            }
            orderDetailList = OrderDetailBLL.ReadList(orderId);
            int[] productIds = orderDetailList.Select(k => k.ProductId).ToArray();
            if (productIds.Length > 0)
            {
                int count = 0;
                productList = ProductBLL.SearchList(1, productIds.Length, new ProductSearchInfo {
                    InProductId = string.Join(",", productIds)
                }, ref count);
            }

            #region 判断是否已评论
            List <ProductCommentInfo>[] listPinfoArr = new List <ProductCommentInfo> [productList.Count];
            int pi = 0;
            foreach (ProductInfo item in productList)
            {
                ProductCommentSearchInfo psi = new ProductCommentSearchInfo();
                psi.ProductId    = item.Id;
                psi.UserId       = base.UserId;
                psi.OrderID      = orderId;
                listPinfoArr[pi] = ProductCommentBLL.SearchProductCommentList(psi);
                if (listPinfoArr[pi].Count <= 0)
                {
                    isPL = false;
                }
            }
            #endregion
            Title = "我的订单";
        }
Exemplo n.º 23
0
 public UCOrder_Pay(Form_Restaurant form, List <OrderDetail> orderDetails, int EmployeeID, int TableID, int CustomerID)
 {
     CusID          = CustomerID;
     tableBLL       = new TableBLL();
     orDer          = new Order();
     orderBLL       = new OrderBLL();
     orderDetailBLL = new OrderDetailBLL();
     foodDrinkBLL   = new FoodDrinkBLL();
     EmpID          = EmployeeID;
     TabID          = TableID;
     mainform       = form;
     lsOrderDetail  = orderDetails;
     InitializeComponent();
     LoadData();
 }
Exemplo n.º 24
0
 private void frmSale_Load(object sender, EventArgs e)
 {
     orderBLL       = new OrderBLL();
     orderDetailBLL = new OrderDetailBLL();
     customerBLL    = new CustomerBLL();
     accesoryBLL    = new AccesoryBLL();
     producerBLL    = new ProducerBLL();
     staffBLL       = new StaffBLL();
     categoryBLL    = new CategoryBLL();
     dgv_Accessories.Columns.Add("STT", "STT");
     CreateComboBox();
     //bindingSource.DataSource = accesoryBLL.GetAccessoriesByFilter(0, "CAC", "");
     bindingSource.DataSource = accesoryBLL.GetAllAccessories();
     CreateDataGridViewAccessory(bindingSource);
     CreateDataGridViewCart();
 }
Exemplo n.º 25
0
 public UCMenu_Order(Form_Restaurant form1, int EmployeeID, int TableID, int CustomerID)
 {
     lstFood        = new List <FoodDrink>();
     lstDrink       = new List <FoodDrink>();
     CusID          = CustomerID;
     EmpID          = EmployeeID;
     TabID          = TableID;
     orderDetailBLL = new OrderDetailBLL();
     foodDrinkBLL   = new FoodDrinkBLL();
     lsFood_Order   = new List <FoodDrink>();
     lsNumeric      = new List <myNumericUpDown>();
     lsFood         = foodDrinkBLL.GetListFoodDrink();
     lsOrder        = new List <OrderDetail>();
     mainform       = form1;
     InitializeComponent();
     LoadData();
 }
Exemplo n.º 26
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected override void PageLoad()
        {
            base.PageLoad();

            int orderID = RequestHelper.GetQueryString <int>("OrderID");


            order           = OrderBLL.Read(orderID, base.UserId);
            orderDetailList = OrderDetailBLL.ReadList(orderID);

            foreach (OrderDetailInfo orderDetail in orderDetailList)
            {
                if (strProductID2 == string.Empty)
                {
                    strProductID2 = orderDetail.ProductId.ToString();
                }
                else
                {
                    strProductID2 += "," + orderDetail.ProductId.ToString();
                }
            }
            if (strProductID2 != string.Empty)
            {
                ProductSearchInfo productSearch = new ProductSearchInfo();
                productSearch.InProductId = strProductID2;
                productList = ProductBLL.SearchList(productSearch);
            }
            ProductCommentSearchInfo productCommentSearch = new ProductCommentSearchInfo();

            productCommentSearch.OrderID = orderID;
            if (ProductCommentBLL.SearchProductCommentList(productCommentSearch).Count >= productList.Count)
            {
                string url = "";
                if (Request.RawUrl.ToLower().IndexOf("/mobile/") >= 0)
                {
                    url = "/mobile/UserProductComment.html";
                }
                else
                {
                    url = "/User/UserProductComment.html";
                }
                Response.Redirect(url);
            }
            Title = "订单评价 - 会员中心";
        }
Exemplo n.º 27
0
        protected void lbtOrderSubmit_Click(object sender, EventArgs e)
        {
            MemberEntity          member            = (MemberEntity)Session["usr"];
            BookCartBLL           cartBLL           = new BookCartBLL();
            List <BookCartEntity> list              = cartBLL.list(member.MemberId);
            MyOrderEntity         orderEntity       = new MyOrderEntity();
            MyOrderBLL            orderBLL          = new MyOrderBLL();
            OrderDetailEntity     orderDetailEntity = new OrderDetailEntity();

            orderEntity.OrderCode    = DateTime.Now.ToString("yyyyMMddhhmmss") + member.MemberId;
            orderEntity.MemberId     = member.MemberId;
            orderEntity.OrderPeople  = txtMemberName.Text;
            orderEntity.OrderPhone   = txtPhone.Text;
            orderEntity.OrderAddress = txtAddress.Text;
            decimal counpic = 0;

            foreach (BookCartEntity item in list)
            {
                if (item.IsSelect == 1)
                {
                    counpic += (item.BookCount * (item.BookInfo.BookPrice * item.BookInfo.BookDisCount));
                }
            }
            orderEntity.OrderAllMoney = counpic;
            orderEntity.OrderStatus   = 1;
            orderBLL.Add(orderEntity);
            orderEntity = orderBLL.list(orderEntity.OrderCode);
            OrderDetailBLL orderDetailBLL = new OrderDetailBLL();

            foreach (BookCartEntity item in list)
            {
                if (item.IsSelect == 1)
                {
                    orderDetailEntity.OrderId       = orderEntity.OrderId;
                    orderDetailEntity.BookId        = item.BookId;
                    orderDetailEntity.BookSalePrice = (item.BookInfo.BookPrice * item.BookInfo.BookDisCount);
                    orderDetailEntity.BookSaleCount = item.BookCount;
                    orderDetailBLL.Add(orderDetailEntity);
                    cartBLL.Delete(item.CartId);
                }
            }
            Response.Redirect("~/Member/OrderList.aspx");
        }
Exemplo n.º 28
0
        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 = "退款申请";
        }
Exemplo n.º 29
0
        protected override void PageLoad()
        {
            base.PageLoad();
            int id = RequestHelper.GetQueryString <int>("id");

            order = OrderBLL.Read(id);
            order.OrderDetailList = OrderDetailBLL.ReadList(id);

            //正在处理中的退款订单或商品
            orderRefundList = OrderRefundBLL.ReadListValid(id);

            if (order.OrderStatus == 2 || order.OrderStatus == 4)
            {
                topNav = 0;
            }
            else
            {
                topNav = 1;
            }
        }
Exemplo n.º 30
0
 protected void AddOrderProduct(int orderID)
 {
     foreach (CartInfo info in CartBLL.ReadCartList(UserID))
     {
         OrderDetailInfo orderDetail = new OrderDetailInfo();
         orderDetail.OrderID     = orderID;
         orderDetail.ProductID   = info.ProductID;
         orderDetail.ProductName = info.ProductName;
         //orderDetail.ProductWeight = product.Weight;
         //orderDetail.SendPoint = product.SendPoint;
         orderDetail.ProductPrice = info.ProductPrice;
         orderDetail.BuyCount     = info.BuyCount;
         orderDetail.RandNumber   = info.RandNumber;
         OrderDetailBLL.AddOrderDetail(orderDetail);
     }
     CartBLL.ClearCart(UserID);
     Sessions.ProductTotalPrice  = 0M;
     Sessions.ProductBuyCount    = 0;
     Sessions.ProductTotalWeight = 0M;
 }
Exemplo n.º 31
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                CheckAdminPower("StatisticsSale", PowerCheckType.Single);

                foreach (ProductClassInfo productClass in ProductClassBLL.ReadNamedList())
                {
                    ClassID.Items.Add(new ListItem(productClass.Name, "|" + productClass.Id + "|"));
                }
                ClassID.Items.Insert(0, new ListItem("所有分类", string.Empty));

                BrandID.DataSource     = ProductBrandBLL.ReadList();
                BrandID.DataTextField  = "Name";
                BrandID.DataValueField = "Id";
                BrandID.DataBind();
                BrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty));

                ClassID.Text      = RequestHelper.GetQueryString <string>("ClassID");
                BrandID.Text      = RequestHelper.GetQueryString <string>("BrandID");
                Name.Text         = RequestHelper.GetQueryString <string>("Name");
                StartAddDate.Text = RequestHelper.GetQueryString <string>("StartAddDate");
                EndAddDate.Text   = RequestHelper.GetQueryString <string>("EndAddDate");
                UserName.Text     = RequestHelper.GetQueryString <string>("UserName");
                OrderNumber.Text  = RequestHelper.GetQueryString <string>("OrderNumber");

                ProductSearchInfo productSearch = new ProductSearchInfo();
                OrderSearchInfo   orderSearch   = new OrderSearchInfo();
                productSearch.IsSale      = (int)BoolType.True;
                productSearch.Name        = RequestHelper.GetQueryString <string>("Name");
                productSearch.ClassId     = RequestHelper.GetQueryString <string>("ClassID");
                productSearch.BrandId     = RequestHelper.GetQueryString <int>("BrandID");
                productSearch.InProductId = RequestHelper.GetQueryString <string>("ProductID");
                orderSearch.StartAddDate  = RequestHelper.GetQueryString <DateTime>("StartAddDate");
                orderSearch.EndAddDate    = ShopCommon.SearchEndDate(RequestHelper.GetQueryString <DateTime>("EndAddDate"));
                orderSearch.UserName      = RequestHelper.GetQueryString <string>("UserName");
                orderSearch.OrderNumber   = RequestHelper.GetQueryString <string>("OrderNumber");
                BindControl(OrderDetailBLL.StatisticsSaleDetail(CurrentPage, PageSize, orderSearch, productSearch, ref Count), RecordList, MyPager);
            }
        }