コード例 #1
0
ファイル: OrderList.aspx.cs プロジェクト: zoomlacms/web047
        protected void MyBind()
        {
            int    quick    = Convert.ToInt32(QuickSearch_DP.SelectedValue);
            int    skeyType = Convert.ToInt32(SkeyType_DP.SelectedValue);
            string uids     = "";

            if (PUid > 0)
            {
                Call.HideBread(Master);
                DataTable udt = buser.SelPromoUser(PUid);
                foreach (DataRow dr in udt.Rows)
                {
                    uids += dr["UserID"] + ",";
                }
                uids = uids.Trim(',');
            }
            DataTable dt = orderBll.SearchByQuickAndSkey(OrderType, OrderStatus, PayStatus, quick, skeyType, Skey_T.Text, StoreID, uids);

            TotalSum_Hid.Value = DataConvert.CDouble(dt.Compute("SUM(ordersamount)", "")).ToString("f2");
            switch (OrderType)
            {
            case "1":    //酒店
            case "3":    //旅游
                function.Script(this, "ShowElement('hotel_tb');");
                Hotel_RPT.DataSource = dt;
                Hotel_RPT.DataBind();
                break;

            default:
                function.Script(this, "ShowElement('store_tb');");
                Store_RPT.DataSource = dt;
                Store_RPT.DataBind();
                break;
            }
        }
コード例 #2
0
    public void MyBind()
    {
        M_UserInfo   mu       = buser.GetLogin();
        M_CommonData storeMod = conBll.SelMyStore_Ex();
        int          quick    = Convert.ToInt32(QuickSearch_DP.SelectedValue);
        int          skeyType = Convert.ToInt32(SkeyType_DP.SelectedValue);
        DataTable    dt       = orderBll.SearchByQuickAndSkey(OrderType.ToString(), OrderStatus, PayStatus, quick, skeyType, Skey_T.Text, storeMod.GeneralID);

        TotalSum_Hid.Value   = DataConvert.CDouble(dt.Compute("SUM(ordersamount)", "")).ToString("f2");
        Store_RPT.DataSource = dt;
        Store_RPT.DataBind();
    }
コード例 #3
0
ファイル: getOrderInfo.aspx.cs プロジェクト: zoomlacms/web054
        public void MyBind()
        {
            M_UserInfo mu = SnsHelper.GetLogin();

            CartDT = SelByCartID(B_Cart.GetCartID(), mu.UserID, ProClass, ids);
            if (CartDT.Rows.Count < 1)
            {
                function.WriteErrMsg("You have not yet chosen the goods");
            }
            //------核算费用
            allmoney = UpdateCartAllMoney(CartDT);
            //------费用统计
            itemnum_span.InnerText     = CartDT.Rows.Count.ToString();
            totalmoney_span1.InnerText = allmoney.ToString("f2");
            //------店铺
            Store_RPT.DataSource = orderCom.SelStoreDT(CartDT);
            Store_RPT.DataBind();
        }
コード例 #4
0
ファイル: GetOrderInfo.aspx.cs プロジェクト: zoomlacms/web043
    public void MyBind()
    {
        StringWriter sw = new StringWriter();
        M_UserInfo   mu = buser.GetLogin(false);

        CartDT = cartBll.SelByCartID(B_Cart.GetCartID(), mu.UserID, ProClass, ids);
        CartDT.DefaultView.RowFilter = "StoreID=" + StoreID;
        CartDT = CartDT.DefaultView.ToTable();
        if (CartDT.Rows.Count < 1)
        {
            function.WriteErrMsg("你尚未选择商品,<a href='/Extend/Mobile/UserOrder.aspx'>查看我的订单</a>");
        }
        //------核算费用
        allmoney = UpdateCartAllMoney(CartDT);
        //------费用统计
        itemnum_span.InnerText     = CartDT.Rows.Count.ToString();
        totalmoney_span1.InnerText = allmoney.ToString("f2");
        //------店铺
        Store_RPT.DataSource = orderCom.SelStoreDT(CartDT);
        Store_RPT.DataBind();
        //------发票绑定
        Server.Execute("/Cart/Comp/Invoice.aspx", sw);
        sw = new StringWriter();
        //------积分抵扣
        //{
        //    int usepoint = Point_CanBeUse(allmoney);
        //    if (usepoint > 0)
        //    {
        //        point_body.Visible = true;
        //        Point_L.Text = mu.UserExp.ToString();
        //        //int usepoint = (int)(allmoney * (SiteConfig.ShopConfig.PointRatiot * 0.01));
        //        function.Script(this, "SumByPoint(" + usepoint + ");");
        //        PointRate_Hid.Value = SiteConfig.ShopConfig.PointRate.ToString("F2");
        //    }
        //    else
        //    {
        //        point_tips.Visible = true;
        //    }
        //}
        //------优惠券
        Server.Execute("/Cart/Comp/ArriveList.aspx?allmoney=" + allmoney + "&ids=" + ids, sw);
        Arrive_Lit.Text = sw.ToString();
    }
コード例 #5
0
ファイル: OrderList.aspx.cs プロジェクト: zoomlacms/web040
        protected void MyBind()
        {
            DataTable dt = GetTable();

            TotalSum_Hid.Value = DataConvert.CDouble(dt.Compute("SUM(ordersamount)", "")).ToString("f2");
            switch (OrderType)
            {
            case "1":    //酒店
            case "3":    //旅游
                function.Script(this, "ShowElement('hotel_tb');");
                Hotel_RPT.DataSource = dt;
                Hotel_RPT.DataBind();
                break;

            default:
                function.Script(this, "ShowElement('store_tb');");
                Store_RPT.DataSource = dt;
                Store_RPT.DataBind();
                break;
            }
        }
コード例 #6
0
    public void MyBind()
    {
        CartDT = cartBll.SelByCookID(CartCookID, ProClass, ids);
        if (CartDT.Rows.Count < 1)
        {
            function.WriteErrMsg("你尚未选择商品,<a href='/User/Order/OrderList.aspx'>查看我的订单</a>");
        }
        //旅游,酒店等不需要检测地址栏
        switch (DataConvert.CLng(CartDT.Rows[0]["ProClass"]))
        {
        case (int)M_Product.ClassType.LY:
        {
            userli.Visible = true;
            M_Cart_Travel model = JsonConvert.DeserializeObject <M_Cart_Travel>(CartDT.Rows[0]["Additional"].ToString());
            model.Guest.AddRange(model.Contract);
            UserRPT.DataSource = model.Guest;
            UserRPT.DataBind();
        }
        break;

        case (int)M_Product.ClassType.JD:
        {
            userli.Visible = true;
            M_Cart_Hotel model = JsonConvert.DeserializeObject <M_Cart_Hotel>(CartDT.Rows[0]["Additional"].ToString());
            model.Guest.AddRange(model.Contract);
            UserRPT.DataSource = model.Guest;
            UserRPT.DataBind();
        }
        break;

        default:     //------地址
            DataTable addressDT = receBll.SelByUID(buser.GetLogin().UserID);
            AddressRPT.DataSource = addressDT;
            AddressRPT.DataBind();
            EmptyDiv.Visible = addressDT.Rows.Count < 1;    //地址为空提醒
            break;
        }
        //------核算费用
        double allmoney = UpdateCartAllMoney(CartDT);

        //------费用统计
        itemnum_span.InnerText     = CartDT.Rows.Count.ToString();
        totalmoney_span1.InnerText = allmoney.ToString("f2");
        //------店铺
        Store_RPT.DataSource = orderCom.SelStoreDT(CartDT);
        Store_RPT.DataBind();
        //------发票绑定
        DataTable invoceDT = new DataTable();//orderBll.SelInvoByUser(buser.GetLogin().UserID);

        if (invoceDT.Rows.Count > 0)
        {
            Invoice_RPT.DataSource = invoceDT;
            Invoice_RPT.DataBind();
        }
        else
        {
            Invoice_RPT.Visible = false;
        }
        //------积分抵扣
        if (SiteConfig.ShopConfig.PointRatiot > 0 && SiteConfig.ShopConfig.PointRatiot < 100 && SiteConfig.ShopConfig.PointRate > 0)
        {
            point_body.Visible = true;
            M_UserInfo usermod = buser.GetLogin();
            Point_L.Text = usermod.UserExp.ToString();
            int usepoint = (int)(allmoney * (SiteConfig.ShopConfig.PointRatiot * 0.01) / SiteConfig.ShopConfig.PointRate);
            function.Script(this, "SumByPoint(" + usepoint + ");");
            PointRate_Hid.Value = SiteConfig.ShopConfig.PointRate.ToString();
        }
        else
        {
            point_tips.Visible = true;
        }
    }
コード例 #7
0
        public void MyBind()
        {
            M_UserInfo mu = buser.GetLogin();

            CartDT = cartBll.SelByCartID(B_Cart.GetCartID(), mu.UserID, ProClass, ids);
            if (CartDT.Rows.Count < 1)
            {
                function.WriteErrMsg("你尚未选择商品,<a href='/User/Order/OrderList'>查看我的订单</a>");
            }
            //旅游,酒店等不需要检测地址栏
            switch (DataConvert.CLng(CartDT.Rows[0]["ProClass"]))
            {
            case (int)M_Product.ClassType.LY:
            {
                userli.Visible = true;
                M_Cart_Travel model = JsonConvert.DeserializeObject <M_Cart_Travel>(CartDT.Rows[0]["Additional"].ToString());
                model.Guest.AddRange(model.Contract);
                UserRPT.DataSource = model.Guest;
                UserRPT.DataBind();
            }
            break;

            case (int)M_Product.ClassType.JD:
            {
                userli.Visible = true;
                M_Cart_Hotel model = JsonConvert.DeserializeObject <M_Cart_Hotel>(CartDT.Rows[0]["Additional"].ToString());
                model.Guest.AddRange(model.Contract);
                UserRPT.DataSource = model.Guest;
                UserRPT.DataBind();
            }
            break;

            default:     //------地址
                DataTable addressDT = receBll.SelByUID(buser.GetLogin().UserID);
                AddressRPT.DataSource = addressDT;
                AddressRPT.DataBind();
                EmptyDiv.Visible = addressDT.Rows.Count < 1;    //地址为空提醒
                break;
            }
            //------核算费用
            allmoney = UpdateCartAllMoney(CartDT);
            //------费用统计
            itemnum_span.InnerText     = CartDT.Rows.Count.ToString();
            totalmoney_span1.InnerText = allmoney.ToString("f2");
            //------店铺
            Store_RPT.DataSource = orderCom.SelStoreDT(CartDT);
            Store_RPT.DataBind();
            //------发票绑定
            DataTable invoceDT = new DataTable();//orderBll.SelInvoByUser(buser.GetLogin().UserID);

            if (invoceDT.Rows.Count > 0)
            {
                Invoice_RPT.DataSource = invoceDT;
                Invoice_RPT.DataBind();
            }
            else
            {
                Invoice_RPT.Visible = false;
            }
            //------积分抵扣
            if (SiteConfig.ShopConfig.PointRatiot > 0 && SiteConfig.ShopConfig.PointRatiot < 100 && SiteConfig.ShopConfig.PointRate > 0)
            {
                point_body.Visible = true;
                M_UserInfo usermod = buser.GetLogin();
                Point_L.Text = usermod.UserExp.ToString();
                int usepoint = (int)(allmoney * (SiteConfig.ShopConfig.PointRatiot * 0.01) / SiteConfig.ShopConfig.PointRate);
                function.Script(this, "SumByPoint(" + usepoint + ");");
                PointRate_Hid.Value = SiteConfig.ShopConfig.PointRate.ToString();
            }
            else
            {
                point_tips.Visible = true;
            }
            //------用户有哪些优惠券
            DataTable avdt = avBll.U_Sel(mu.UserID, -100, 1);

            if (avdt.Rows.Count > 0)
            {
                arrive_div.Style.Add("display", "block");
                arrive_data_div.Visible = true;
                avdt.Columns.Add("enable", typeof(int));
                avdt.Columns.Add("err", typeof(string));
                for (int i = 0; i < avdt.Rows.Count; i++)
                {
                    DataRow dr    = avdt.Rows[i];
                    double  money = allmoney;
                    string  err   = "";
                    dr["enable"] = avBll.U_CheckArrive(new M_Arrive().GetModelFromReader(dr), mu.UserID, ref money, ref err) ? 1 : 0;
                    dr["err"]    = err;
                }
                avdt.DefaultView.RowFilter = "enable='1'";
                //function.WriteErrMsg(avdt.DefaultView.ToTable().Rows.Count.ToString());
                Arrive_Active_RPT.DataSource = avdt.DefaultView.ToTable();
                Arrive_Active_RPT.DataBind();
                avdt.DefaultView.RowFilter    = "enable='0'";
                Arrive_Disable_RPT.DataSource = avdt.DefaultView.ToTable();
                Arrive_Disable_RPT.DataBind();
            }
            else
            {
                arrive_empty_div.Visible = true;
            }
        }
コード例 #8
0
ファイル: getOrderInfo.aspx.cs プロジェクト: zoomlacms/web049
        public void MyBind()
        {
            StringWriter sw = new StringWriter();
            M_UserInfo   mu = buser.GetLogin(false);

            CartDT = cartBll.SelByCartID(B_Cart.GetCartID(), mu.UserID, ProClass, ids);
            if (CartDT.Rows.Count < 1)
            {
                function.WriteErrMsg("你尚未选择商品,<a href='/User/Order/OrderList'>查看我的订单</a>");
            }
            #region 旅游,酒店等不需要检测地址栏
            switch (DataConvert.CLng(CartDT.Rows[0]["ProClass"]))
            {
            case (int)M_Product.ClassType.LY:
            {
                userli.Visible = true;
                M_Cart_Travel model = JsonConvert.DeserializeObject <M_Cart_Travel>(CartDT.Rows[0]["Additional"].ToString());
                model.Guest.AddRange(model.Contract);
                UserRPT.DataSource = model.Guest;
                UserRPT.DataBind();
            }
            break;

            case (int)M_Product.ClassType.JD:
            {
                userli.Visible = true;
                M_Cart_Hotel model = JsonConvert.DeserializeObject <M_Cart_Hotel>(CartDT.Rows[0]["Additional"].ToString());
                model.Guest.AddRange(model.Contract);
                UserRPT.DataSource = model.Guest;
                UserRPT.DataBind();
            }
            break;

            default:     //------地址
                break;
            }
            #endregion
            //------核算费用
            allmoney = UpdateCartAllMoney(CartDT);
            //------费用统计
            itemnum_span.InnerText     = CartDT.Rows.Count.ToString();
            totalmoney_span1.InnerText = allmoney.ToString("f2");
            //------店铺
            Store_RPT.DataSource = orderCom.SelStoreDT(CartDT);
            Store_RPT.DataBind();
            //------发票绑定
            Server.Execute("/Cart/Comp/Invoice.aspx", sw);
            Invoice_Lit.Text = sw.ToString();
            sw = new StringWriter();
            //------积分抵扣
            {
                int usepoint = Point_CanBeUse(allmoney);
                if (usepoint > 0)
                {
                    point_body.Visible = true;
                    Point_L.Text       = mu.UserExp.ToString();
                    //int usepoint = (int)(allmoney * (SiteConfig.ShopConfig.PointRatiot * 0.01));
                    function.Script(this, "SumByPoint(" + usepoint + ");");
                    PointRate_Hid.Value = SiteConfig.ShopConfig.PointRate.ToString("F2");
                }
                else
                {
                    point_tips.Visible = true;
                }
            }
            //------优惠券
            Server.Execute("/Cart/Comp/ArriveList.aspx?allmoney=" + allmoney + "&ids=" + ids, sw);
            Arrive_Lit.Text = sw.ToString();
        }