示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            int orderId = PageTools.GetSavedId("OrderId", Request.QueryString["id"]);
            if ( orderId==0)
                Response.Redirect("OrderList.aspx");

            AdminOrderBiz biz = new AdminOrderBiz();
            int status = biz.GetOrderStatus(orderId);
            if (status != 2 && status!=3 )
                Response.Redirect("ProcessError.aspx?errMsg=Order's status incorrect. Please check.&nav=OrderDetail.aspx");

            OrderInfoCtl1.OrderId = orderId;

        }
    }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            int orderId = PageTools.GetSavedId("OrderId", Request.QueryString["id"]);
            if (orderId==0)
                Response.Redirect("OrderList.aspx");

            AdminOrderBiz biz = new AdminOrderBiz();
            int status = biz.GetOrderStatus(orderId);
            if (status != 2)
            {
                PageLogic.ShowError("Order's status incorrect. Please check.", "OrderDetail.aspx");
                return;
            }

            OrderInfoCtl1.OrderId = orderId;
            OrderInfoCtl1.DataBind();

            PaymentCtl1.DataBind();
        }
    }
示例#3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            int orderId = PageTools.GetSavedId("OrderId", Request.QueryString["id"]);
            if (orderId == 0) Response.Redirect("OrderList.aspx");

            AdminOrderBiz biz = new AdminOrderBiz();
            int status = biz.GetOrderStatus(orderId);
            //���Ȩ��
            if (status >= 7)
            {
                PageLogic.ShowError("Order is closed. ��������ɡ�", "OrderDetail.aspx");
                return;
            }
            else if (status >2 )
            {
                if (!PageLogic.CheckActionAuth("EditFullPaidOrder"))
                {
                    PageLogic.ShowError("You have not authorization. ��û��Ȩ�ޡ�", "OrderDetail.aspx");
                    return;
                }
            }
        }
    }
示例#4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (Request.QueryString["do"] == "new")
            {
                fvOrderDetail.ChangeMode(FormViewMode.Insert);
            }
            else
            {
                int orderId = PageTools.GetSavedId("OrderId", Request.QueryString["id"]);
                if (orderId == 0) Response.Redirect("OrderList.aspx");

                AdminOrderBiz biz = new AdminOrderBiz();
                int status = biz.GetOrderStatus(orderId);
                //���Ȩ��
                if (status >= 7)
                {
                    PageLogic.ShowError("Order is closed. ��������ɡ�", "OrderDetail.aspx");
                    return;
                }
                else if (status > 2)
                {
                    if (!PageLogic.CheckActionAuth("EditFullPaidOrder"))
                    {
                        PageLogic.ShowError("You have not authorization. ��û��Ȩ�ޡ�", "OrderDetail.aspx");
                        return;
                    }
                }
                fvOrderDetail.ChangeMode(FormViewMode.Edit);
                TicketDetailDataset.SelectParameters["orderID"].DefaultValue = orderId.ToString();
            }
        }
    }
示例#5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            int orderId = PageTools.GetSavedId("OrderId", Request.QueryString["id"]);
            if ( orderId==0 )
                Response.Redirect("OrderList.aspx");

            lnkPrint.NavigateUrl = "PrintTicket.aspx" + Request.Url.Query;

            AdminOrderBiz biz = new AdminOrderBiz();
            int scheduleId = biz.GetOrderScheduleId(orderId);

            OrderInfoCtl1.OrderId = orderId;
            OrderInfoCtl1.DataBind();

            OrdersCCListDataset.SelectParameters["orderId"].DefaultValue = orderId.ToString();
            lstOrdersCCList.DataBind();

            OplogList1.OpType = 4;
            OplogList1.RelateID = orderId;

            VoucherDataset.SelectParameters["orderID"].DefaultValue = orderId.ToString();

            lnkBusSeats.NavigateUrl = "~/BusSeats.aspx?id="+ scheduleId.ToString();

            // OrderEdit权限检查
            int status = biz.GetOrderStatus(orderId);
            int orderType = biz.GetOrderType(orderId);
            if (orderType > 0)
            {
                // is ticket
                lnkOrderEdit.NavigateUrl = "TicketEdit.aspx";
                lnkPrint.NavigateUrl = "PrintQTicket.aspx" + Request.Url.Query;
            }
            if (PageLogic.CheckPageAuth("OrderEdit.aspx"))
            {
                if (status >= 3 && status<7)
                {
                    if (!PageLogic.CheckActionAuth("EditFullPaidOrder"))
                    {
                        lnkOrderEdit.Attributes.Add("onclick", "alert('You have not authorization to edit orders in this status.\\n\\n您没有授权修改此状态下的订单。');return false;");
                    }
                }
                if (status >= 7)
                {
                    lnkOrderEdit.Attributes.Add("onclick", "alert('Order been closed.\\n订单已完成。');return false;");
                }
            }
            else
            {
                lnkOrderEdit.Enabled = false;
            }

            if (status ==0 || status >= 3)
            {
                lnkPayment.Enabled = false;
            }
            if (status < 2)
            {
                lnkRefund.Enabled = lnkPrint.Enabled = false;
            }
        }
    }
示例#6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            int orderId = PageTools.GetSavedId("OrderId", Request.QueryString["id"]);
            if (orderId == 0)
                Response.Redirect("OrderActive.aspx");

            AdminOrderBiz biz = new AdminOrderBiz();
            int status = biz.GetOrderStatus(orderId);
            if (status != 2)
            {
                PageLogic.ShowError("Order's status incorrect. Please check.", "OrderDetail.aspx");
                return;
            }

            int scheduleId = biz.GetOrderScheduleId(orderId);

            OrderInfoCtl1.OrderId = orderId;
            OrderInfoCtl1.DataBind();

            CompareValidator rv = fvCreditCard.FindControl("CompareValidator1") as CompareValidator;
            if (rv != null)
            {
                rv.ValueToCompare = biz.GetBalance(orderId).ToString();
            }
        }
    }