コード例 #1
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        ax_ticket model = new ax_ticket();

        if (model.Existsfb(orderno.Value.Trim(), 2))
        {
            model.GetModel(orderno.Value.Trim());
            if (model.add_time < DateTime.Now)
            {
                this.ClientScript.RegisterStartupScript(this.GetType(), "1", "<script> $.alert(\"<div class='message'>对不起!您查询的券是真的,但已经过期了,不能在提货了,如有问题请联系客服!</div>\").time(5000);</script>");
            }
            else
            {
                this.ClientScript.RegisterStartupScript(this.GetType(), "1", "<script> $.alert(\"<div class='message'>恭喜!您输入的提货编码是真的!可以去申请提货了,亲!</div>\").time(5000);</script>");
            }
        }
        else if (model.Existsfb(orderno.Value.Trim(), 3))
        {
            this.ClientScript.RegisterStartupScript(this.GetType(), "1", "<script> $.alert(\"<div class='message'>您输入的提货编码提过货了!可以去查询订单查询订单信息了,亲!</div>\").time(5000);</script>");
        }
        else
        {
            this.ClientScript.RegisterStartupScript(this.GetType(), "1", "<script> $.alert(\"<div class='message'>没有查到您输入的提货编码,请确认输入是否正确!</div>\").time(5000);</script>");
        }
    }
コード例 #2
0
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        ax_ticket model = new ax_ticket();

        if (model.Existsfb(ticketno.Value.Trim(), 3))
        {
            this.ClientScript.RegisterStartupScript(this.GetType(), "1", "<script> $.alert(\"<div class='message'>亲!您输入的提货编码提过货了!可以去查询订单查询订单信息了!</div>\").time(5000);</script>");

            return;
        }
        if (!model.Exists(ticketno.Value.Trim(), ticketpw.Value.Trim()))
        {
            this.ClientScript.RegisterStartupScript(this.GetType(), "1", "<script> $.alert(\"<div class='message'>对不起!没有找到您输入信息的相关记录,请检查是否输入有误!</div>\").time(5000);</script>");
        }
        else
        {
            model.GetModel(ticketno.Value.Trim());
            if (model.add_time < DateTime.Now)
            {
                this.ClientScript.RegisterStartupScript(this.GetType(), "1", "<script> $.alert(\"<div class='message'>对不起!您查询的券已经过期了,不能在提货了,如有问题请联系客服!</div>\").time(5000);</script>");
            }
            else
            {
                ShopCart.Add(model.GetID(ticketno.Value.Trim(), ticketpw.Value.Trim()), 1);
                PanelOrder.Visible = true;
            }
        }
    }