Пример #1
0
        protected override void LoadPage(string themecode, int siteid, string languagecode, string pcode)
        {
            LoadTheme(themecode, siteid, languagecode, pcode);
            if (CurrentUser.id == 0)
            {
                //Response.Redirect("login.aspx");
                Response.Redirect(URL("P_Login", "" + HttpUtility.UrlEncode(RequestTool.GetRequestUrlNonDomain()) + "," + GetUrlToken(RequestTool.GetRequestUrlNonDomain()) + ""));
            }
            path = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("首页") + "\"><span>" + Tag("首页") + "</span></a><em class=\"home\">&raquo;</em><a href=\"" + URL("P_Basket", "") + "\"><span>" + Tag("购物车") + "</span></a><em>&raquo;</em><a href=\"" + URL("P_Cashier", "") + "\"><span>" + Tag("订单已提交") + "</span></a>";

            order_id = Rint("order_id");
            order    = B_Lebi_Order.GetModel(order_id);
            if (order == null)
            {
                PageError();
            }
            if (order.User_id != CurrentUser.id || order.IsVerified != 0)
            {
                PageError();
            }
            else
            {
                if (order.Type_id_OrderType == 215)
                {
                    List <Lebi_Order> ors   = B_Lebi_Order.GetList("Order_id=" + order.id + "", "");
                    decimal           moeny = 0;
                    foreach (Lebi_Order or in ors)
                    {
                        moeny += or.Money_Pay;
                    }
                    order.Money_Pay = moeny;
                    B_Lebi_Order.Update(order);
                }
            }
        }
Пример #2
0
        /// <summary>
        /// 收货确认后,更新订单产品的收货数量
        /// </summary>
        /// <param name="torder"></param>
        public static void UpdateShouHuoCount(Lebi_Transport_Order torder)
        {
            if (torder.Type_id_TransportOrderStatus != 223)
            {
                return;
            }
            Lebi_Order order = B_Lebi_Order.GetModel(torder.Order_id);

            if (order == null)
            {
                return;
            }
            List <Lebi_Order_Product>   ops     = B_Lebi_Order_Product.GetList("Order_id=" + torder.Order_id + "", "");
            List <Lebi_Transport_Order> torders = B_Lebi_Transport_Order.GetList("Order_id=" + torder.Order_id + " and Type_id_TransportOrderStatus=223", "");

            //bool shouhuoall = true;
            foreach (Lebi_Order_Product op in ops)
            {
                //op.Count_Received = 0;
                foreach (Lebi_Transport_Order to in torders)
                {
                    foreach (TransportProduct p in GetTransportProduct(to))
                    {
                        if (p.Product_id == op.Product_id)
                        {
                            op.Count_Received = op.Count_Received + p.Count;
                            if (op.Count_Shipped < op.Count_Received)
                            {
                                op.Count_Received = op.Count_Shipped;
                            }
                            break;
                        }
                    }
                }
                //if (op.Count_Received < op.Count_Shipped)
                //    shouhuoall = false;
                B_Lebi_Order_Product.Update(op);//更新收货数量
            }
            order.IsReceived     = 1;
            order.IsReceived_All = 1;
            ops = B_Lebi_Order_Product.GetList("Order_id=" + torder.Order_id + "", "");
            foreach (Lebi_Order_Product op in ops)
            {
                if (op.Count_Received < op.Count_Shipped)
                {
                    order.IsReceived_All = 0;
                }
            }
            order.Time_Received = System.DateTime.Now;
            B_Lebi_Order.Update(order);
            if (order.IsReceived_All == 1)//全部收货完成
            {
                Order.Received(order);
            }
        }
Пример #3
0
        protected override void LoadPage(string themecode, int siteid, string languagecode, string pcode)
        {
            LoadTheme(themecode, siteid, languagecode, pcode);
            path = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("首页") + "\"><span>" + Tag("首页") + "</span></a><em class=\"home\">&raquo;</em><a href=\"" + URL("P_Pay", "") + "\"><span>" + Tag("在线付款") + "</span></a>";

            order_id = Rint("order_id");
            order    = B_Lebi_Order.GetModel(order_id);
            if (order == null)
            {
                PageError();
            }
            if (order.User_id != CurrentUser.id || order.IsInvalid == 1 || order.IsPaid == 1)
            {
                PageError();
            }
            else
            {
                if (order.Type_id_OrderType == 215)
                {
                    List <Lebi_Order> ors   = B_Lebi_Order.GetList("Order_id=" + order.id + "", "");
                    decimal           moeny = 0;
                    foreach (Lebi_Order or in ors)
                    {
                        moeny += or.Money_Pay;
                    }
                    order.Money_Pay = moeny;
                    B_Lebi_Order.Update(order);
                }
            }
            string onpaywhere = "IsUsed=1 and parentid=0";

            if (CurrentSite.IsMobile == 1)
            {
                onpaywhere += " and (showtype='' or showtype like '%wap%')";
            }
            else
            {
                onpaywhere += " and (showtype='' or showtype like '%web%')";
            }
            onlinepays     = B_Lebi_OnlinePay.GetList(onpaywhere, "Sort desc");
            order_products = B_Lebi_Order_Product.GetList("Order_id = " + order.id, "id desc");
        }