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;
        }
    }
Beispiel #2
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;
        }
    }