Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        UserAuthorizationModel userInfo = UserAuthorization.userLogin(this.Page);

        if (userInfo.openId == null || userInfo.openId == "")
        {
            member = userInfo.mobile;
        }
        else
        {
            member = userInfo.openId;
        }
        Session["openid"] = member;
        //加载常用旅客信息
        LVWEIBA.BLL.MemberHotel          bllhotel = new LVWEIBA.BLL.MemberHotel();
        List <LVWEIBA.Model.MemberHotel> lsthotel = bllhotel.GetModelList(" member='" + member + "'");

        Literal1.Text = "";
        string strhotel = "";

        foreach (MemberHotel item in lsthotel)
        {
            strhotel += string.Format("<li id='{0}'>{1}<span>{2}</span><i class='iconfont' id='{3}'>&#xe63d;</i></li>", item.Id, item.Name, item.Card, item.Id);
        }
        Literal1.Text = strhotel;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        UserAuthorizationModel userInfo = UserAuthorization.userLogin(this.Page);

        if (userInfo.openId == null || userInfo.openId == "")
        {
            member = userInfo.mobile;
        }
        else
        {
            member = userInfo.openId;
        }
        ticketId = (string.IsNullOrEmpty(Request.QueryString["ticketId"]) ? 0 : int.Parse(Request.QueryString["ticketId"]));
        //预定数量
        reserverCount = (string.IsNullOrEmpty(Request.QueryString["reserverCount"]) ? 0 : int.Parse(Request.QueryString["reserverCount"]));
        if (!IsPostBack)
        {
            var bll = new LVWEIBA.DAL.ProviderSpot();
            ViewState["ticketId"] = ticketId;
            if (ticketId == 0 || reserverCount == 0)
            {
                Jscript.AlertAndRedirect("请选择合适的票数", "ticket.aspx");
            }
            else
            {
                LVWEIBA.Model.ProviderSpot providerSpot = bll.GetModel(ticketId);
                ticketTitle        = providerSpot.SpotName;
                ticketId           = providerSpot.ID;
                startDate          = Convert.ToDateTime(providerSpot.BeginTime).ToString("yyyy年MM月dd号");
                endDate            = Convert.ToDateTime(providerSpot.EndTime).ToString("yyyy年MM月dd号");
                orderPriceLbl.Text = "¥" + providerSpot.ZkPrice;
                string priceDetailStr = reserverCount + "张";
                int    maketPrice     = (int)providerSpot.TicketPrice * reserverCount;
                int    zkPrice        = (int)providerSpot.ZkPrice * reserverCount;
                string str            = string.Format(@"<p>市场价:¥{0}({1})</p>
                       <p>优惠价:¥{2}({3})</p>", maketPrice, priceDetailStr, zkPrice, priceDetailStr);
                this.priceDetailLbl.Text = str;
                this.hid_count.Value     = reserverCount.ToString();
                this.hid_price_sc.Value  = maketPrice.ToString();
                this.hid_price_yh.Value  = zkPrice.ToString();
                this.hid_ticket_id.Value = ticketId.ToString();
                this.hid_price_jj.Value  = providerSpot.SellPrice.ToString();
                HiddenFieldBZ.Value      = str.Replace("<p>", "").Replace("</p>", "");

                LVWEIBA.BLL.MemberHotel          bllhotel = new LVWEIBA.BLL.MemberHotel();
                List <LVWEIBA.Model.MemberHotel> lsthotel = bllhotel.GetModelList(" member='" + userInfo.mobile + "' or member='" + userInfo.openId + "'");
                string strhotel = "";
                foreach (MemberHotel item in lsthotel)
                {
                    strhotel += string.Format(" <input id='Checkbox1' name='hotel' class='hotel' type='checkbox' value='{0}' />{1}", item.Id, item.Name);
                }
                contactPersonsLiteral.Text = strhotel;
            }
        }
    }
Esempio n. 3
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        LVWEIBA.BLL.MemberHotel bllhotel    = new LVWEIBA.BLL.MemberHotel();
        MemberHotel             memberHotel = bllhotel.GetModel(getHotelId());

        memberHotel.Name   = hotelname.Text;
        memberHotel.Card   = card.Text;
        memberHotel.Mobile = Mobile.Text;
        memberHotel.Type   = hotelType.SelectedValue;
        if (bllhotel.Update(memberHotel))
        {
            refreshInfo();
            Response.Write(String.Format("<script>alert('信息修改成功');window.location='hotel.aspx';</script>"));
        }
    }
    protected void addContactPerson_Click(object sender, EventArgs e)
    {
        LVWEIBA.BLL.MemberHotel bllhotel = new LVWEIBA.BLL.MemberHotel();
        System.Collections.Specialized.NameValueCollection nc = new System.Collections.Specialized.NameValueCollection(Request.Form);
        MemberHotel m = new MemberHotel();

        m.Member = member;
        m.Mobile = nc.GetValues("mobile")[0].ToString();
        m.Name   = nc.GetValues("userName")[0].ToString();
        m.Card   = nc.GetValues("identityCard")[0].ToString();
        m.Sj     = DateTime.Now;
        m.Type   = "0";
        int id = bllhotel.GetMaxId();

        if (bllhotel.Add(m) > 0)
        {
            string strhotel = string.Format(" <input id='Checkbox1' name='hotel' checked class='hotel' type='checkbox' value='{0}' />{1}", id, m.Name);
            contactPersonsLiteral.Text += strhotel;
        }
    }
Esempio n. 5
0
    protected void refreshInfo()
    {
        LVWEIBA.BLL.MemberHotel bllhotel    = new LVWEIBA.BLL.MemberHotel();
        MemberHotel             memberHotel = bllhotel.GetModel(getHotelId());

        hotelname.Text = memberHotel.Name;
        card.Text      = memberHotel.Card;
        Mobile.Text    = memberHotel.Mobile;
        hotelType.Items.Clear();
        if (memberHotel.Type.Equals("0"))
        {
            hotelType.Items.Add(new ListItem("成人", "0"));
            hotelType.Items.Add(new ListItem("儿童", "1"));
        }
        if (memberHotel.Type.Equals("1"))
        {
            hotelType.Items.Add(new ListItem("儿童", "1"));
            hotelType.Items.Add(new ListItem("成人", "0"));
        }
    }
Esempio n. 6
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        LVWEIBA.BLL.MemberHotel bllhotel = new LVWEIBA.BLL.MemberHotel();
        System.Collections.Specialized.NameValueCollection nc = new System.Collections.Specialized.NameValueCollection(Request.Form);
        MemberHotel m = new MemberHotel();

        m.Member = member;
        m.Mobile = nc.GetValues("Mobile")[0].ToString();
        m.Name   = nc.GetValues("hotelname")[0].ToString();
        m.Card   = nc.GetValues("card")[0].ToString();
        m.Type   = nc.GetValues("type")[0].ToString();
        m.Sj     = DateTime.Now;
        int id = bllhotel.GetMaxId();

        if (bllhotel.Add(m) > 0)
        {
            string strhotel = string.Format("<li id='{0}'>{1}<span>{2}</span><i class='iconfont' id='{3}'>&#xe63d;</i></li>", m.Id, m.Name, m.Card, m.Id);
            Literal1.Text += strhotel;
        }
    }