Ejemplo n.º 1
0
    private void Bind()
    {
        this.gvOrderDetail.DataSource = OrdersBrowseBLL.GetDetails(GetOrderId(), GetStoreId());
        this.gvOrderDetail.DataBind();

        DataTable dt = CheckOutOrdersBLL.GetOrderViewT(GetOrderId());

        gvStoreOrder.DataSource = dt;
        gvStoreOrder.DataBind();
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        if (!IsPostBack)
        {
            string docID = Request.QueryString["docID"].ToString();

            Literal1.Text = OrdersBrowseBLL.GetNote(docID);
        }
    }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        if (!IsPostBack)
        {
            string storeOrderID = Request.QueryString["storeOrderID"].ToString();

            GridView1.DataSource = new OrdersBrowseBLL().StoreOrderDataTable_III(storeOrderID);
            GridView1.DataBind();

            DataTable dt = OrdersBrowseBLL.StoreOrderDT(storeOrderID);

            GridView_Order.DataSource = dt;
            GridView_Order.DataBind();


            this.TranControls(this.GridView_Order,
                              new string[][] {
                new string [] { "000098", "订货店铺" },
                new string [] { "000079", "订单号" },
                new string [] { "000045", "期数" },
                new string [] { "000100", "付款否" },
                new string [] { "000102", "发货否" },
                new string [] { "000104", "收货否" },
                new string [] { "000106", "订单类型" },
                new string [] { "000107", "姓名" },
                new string [] { "000108", "收货人国家" },
                new string [] { "000109", "省份" },
                new string [] { "000110", "城市" },
                new string [] { "000112", "收货地址" },
                new string [] { "000073", "邮编" },
                new string [] { "000041", "总金额" },
                new string [] { "000113", "总积分" },
                new string [] { "000115", "联系电话" },
                new string [] { "000118", "重量" },
                new string [] { "000120", "运费" },
                new string [] { "000121", "物流公司" },
                new string [] { "000067", "订货日期" },
                new string [] { "000070", "发货日期" }
            });


            this.TranControls(this.GridView1,
                              new string[][] {
                new string [] { "000558", "产品编号" },
                new string [] { "000501", "产品名称" },
                new string [] { "000505", "数量" },
                new string [] { "000518", "单位" },
                new string [] { "000045", "期数" },
                new string [] { "000503", "单价" },
                new string [] { "000414", "积分" }
            });
        }
    }
Ejemplo n.º 4
0
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {
        string storeOrderID = ((Label)GridView_Order.SelectedRow.FindControl("Lab_StoreOrderID")).Text;

        if (isButton == "sel")
        {
            Response.Redirect("ViewStoreOrder.aspx?storeOrderID=" + storeOrderID);
        }
        else
        if (isButton == "del")
        {
            if (OrdersBrowseBLL.DelStoreOrderItem(storeOrderID))
            {
                getbtCon();

                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("000008", "删除成功") + "')</script>");
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("000417", "删除失败") + "')</script>");
            }
        }
    }
Ejemplo n.º 5
0
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {
        string storeOrderID = ((Label)GridView_Order.SelectedRow.FindControl("Lab_StoreOrderID")).Text;

        if (isButton == "sel")
        {
            Response.Redirect("OrderGoodsDetail.aspx?storeOrderID=" + storeOrderID);
        }
        else
        if (isButton == "del")
        {
            if (OrdersBrowseBLL.DelStoreOrderItem(storeOrderID))
            {
                string condition = "";
                if (ViewState["condition"] == null)
                {
                    condition = "1=1";
                }
                else
                {
                    condition = ViewState["condition"].ToString();
                }

                //刷新
                Pager1.PageBind(0, 10, "StoreOrder  so  left outer join city on so.cpccode=city.cpccode ", @"StoreID,OrderGoodsID,ExpectNum,IsCheckOut,
                             OrderType,InceptPerson,city.country,city.province,city.city,
                            InceptAddress,PostalCode,TotalMoney,TotalPV,Telephone,Weight,Carriage
                            ,OrderDateTime,Description", condition, "OrderGoodsID", "GridView_Order", "OrderDateTime", 0);

                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("000008", "删除成功") + "')</script>");
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("000417", "删除失败") + "')</script>");
            }
        }
    }
Ejemplo n.º 6
0
    protected void gvStoreOrder_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string[] args       = e.CommandArgument.ToString().Split(':');
        string   orderId    = args[0];
        string   storeId    = args[1];
        string   isCheckOut = args[2];
        double   totalMoney = Convert.ToDouble(args[3]);
        string   payWay     = args[4];

        if (e.CommandName == "OK")
        {
            //判断选中正确否(判断金额)
            int count    = 0;
            int paycount = 0;
            IList <StoreOrderModel> orders = new List <StoreOrderModel>();
            string[] storeMoney            = CheckOutOrdersBLL.GetStoreTotalOrderGoodsMoney(storeId);
            double   ordermoney            = double.Parse(storeMoney[0]); //订货款
            double   turnmonty             = double.Parse(storeMoney[1]); //周转款

            StoreOrderModel order = new StoreOrderModel();
            order.StoreorderId = orderId;
            if (payWay == "0")
            {
                order.OrderType = 0;
                if (totalMoney > ordermoney)
                {
                    msg = "<script>alert('" + GetTran("000957", "订货款不足!") + "');</script>";
                    return;
                }
            }
            else if (payWay == "1")
            {
                order.OrderType = 1;
                if (totalMoney > turnmonty)
                {
                    msg = "<script>alert('" + GetTran("000965", "周转款不足!") + "');</script>";
                    return;
                }
            }
            order.TotalMoney = Convert.ToDecimal(totalMoney);
            orders.Add(order);

            //if (!CheckOutOrdersBLL.CheckLogicProductInventory(orders))
            //{
            //    msg = "<script>alert('" + GetTran("000974", "公司库存不足,请通知公司及时进货!") + "')</script>";
            //    return;
            //}
            if (AddOrderDataDAL.OrderPayment(storeId, orderId, CommonDataBLL.OperateIP, 2, 1, 10, "管理员", "", 2, -1, 1, 1, "", 0, "") == 0)
            {
                msg = "<script>alert('" + GetTran("000978", "支付成功!") + "')</script>";
                Bind();
            }
            else
            {
                msg = "<script>alert('" + GetTran("000979", "支付失败请重新支付!") + "')</script>";
            }
            //if (payWay == "3")//支付宝支付
            //{
            //    msg = "<script>window.open('../Store/payment/default.aspx?zongMoney=" + totalMoney + "&TotalMoney=" + totalMoney + "&TotalComm=0 &OrderID =" + orderId + "&OnlineOrder=1');</script>";

            //    return;
            //}
            //else
            //{

            //}
        }
        else if (e.CommandName == "D")
        {
            //验证订单
            if (OrdersBrowseBLL.GetOrderIsExist(orderId))
            {
                msg = "<script>alert('" + GetTran("005993", "对不起,订单已被删除!") + "');</script>";
                Bind();
                return;
            }
            else if (OrdersBrowseBLL.GetOrderCheckState(orderId))
            {
                msg = "<script>alert('" + GetTran("005994", "对不起,该订单已支付,不能删除!") + "');</script>";
                Bind();
                return;
            }

            if (OrdersBrowseBLL.DelStoreOrderItem(orderId))
            {
                msg = "<script>alert('" + GetTran("000749", "删除成功!") + "');</script>";
            }
            else
            {
                msg = "<script>alert('" + GetTran("000417", "删除失败!") + "');</script>";
            }
            Bind();
        }
    }