Ejemplo n.º 1
0
    void GetPosExistMemberInfo()
    {
        MemberVO memberVO = new MemberVO();

        memberVO.phone = "18258224036";

        PosExistMemberInfo posExistMemberInfo = new PosExistMemberInfo();

        posExistMemberInfo.getPosExistMemberInfo(memberVO);
    }
Ejemplo n.º 2
0
    protected void btnlogin_Click(object sender, EventArgs e)
    {
        PosExistMemberInfo posExistMemberInfo = new PosExistMemberInfo();
        MemberVO           memberVO           = new MemberVO();

        memberVO.phone = account.Value;
        string smg = posExistMemberInfo.getPosExistMemberInfo(memberVO);


        if (string.IsNullOrEmpty(txtChkCode.Value))
        {
            ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>show_err_msg('请填写验证码!');</script>");
            return;
        }
        else
        {
            HttpSessionState Session = HttpContext.Current.Session;

            if (Session["MobileYzm"] == null)
            {
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>show_err_msg('请重新获取验证码!');</script>");
                return;
            }

            if (Session["MobileYzm"].ToString() != txtChkCode.Value)
            {
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>show_err_msg('验证码不正确,请重试!');</script>");
                return;
            }
        }


        if (string.IsNullOrEmpty(smg.Trim()))
        {
            ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>show_err_msg('该手机还没注册,请注册!');</script>");

            return;
        }
        else
        {
            HttpCookie cookie = new HttpCookie("cookiePhone");
            cookie.Value   = account.Value;
            cookie.Expires = DateTime.MaxValue;


            HttpContext.Current.Response.Cookies.Add(cookie);
            ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>sky('成功!');</script>");
        }
    }
Ejemplo n.º 3
0
    //string mobile = "";
    //static string phone = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        string phone = "";


        //    phone=  Request.QueryString["phone"];

        if (HttpContext.Current.Request.Cookies["cookiePhone"] != null)
        {
            phone = HttpContext.Current.Request.Cookies["cookiePhone"].Value;
        }

        //if (HttpContext.Current.Response.Cookies["cookiePhone"] != null && !string.IsNullOrEmpty(HttpContext.Current.Response.Cookies["cookiePhone"].Value.Trim()))
        //{
        //    phone = HttpContext.Current.Response.Cookies["cookiePhone"].Value;
        //}

        if (string.IsNullOrEmpty(phone.Trim()))
        {
            if (HttpContext.Current.Session["ss"] != null && !string.IsNullOrEmpty(HttpContext.Current.Session["ss"].ToString()))
            {
                phone = HttpContext.Current.Session["ss"].ToString();
            }
        }



        if (string.IsNullOrEmpty(phone.Trim()))
        {
            ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>cc();</script>");
            return;
        }



        if (string.IsNullOrEmpty(phone))
        {
            //if (!string.IsNullOrEmpty(mobile.Trim()))
            //{
            //    phone = mobile;
            //    string url = "index.aspx?phone= " + strphone + "";
            //    System.Web.HttpContext.Current.Response.Redirect(url);
            //}

            //// Response.Write("<script language=javascript>window.location.reload( ); </script>" );  
            //else
            //{
            //    ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>if(!window.name){window.name = 'test';  window.location.href = 'index.aspx';}</script>");
            //}

            ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>if(!window.name){window.name = 'test';  window.location.href = 'login.aspx';}</script>");
        }

        else 
        {
            txtName.InnerText = "";
            PosExistMemberInfo posExistMemberInfo = new PosExistMemberInfo();
            MemberVO           memberVO           = new MemberVO();

            memberVO.phone = phone;

            MemberVOXML memberVOXML = new MemberVOXML();



            string xml = posExistMemberInfo.getPosExistMemberInfo(memberVO);

            memberVOXML = (MemberVOXML)XMLToModel.XMLToModelT(xml, memberVOXML);

            //if (memberVOXML.Gender == "0")
            //{
            //    memberVOXML.Gender = "男";
            //}
            //else if (memberVOXML.Gender == "1")
            //{
            //    memberVOXML.Gender = "女";
            //}

            txtname1.Value = txtName.InnerText = memberVOXML.VIPName;
            txtbrith.Value = memberVOXML.Birthday;
            txtphone.Value = phone;
            //    txtsex.Value = memberVOXML.Gender;
            txtVIP.InnerText = memberVOXML.CardTypeName;

            if (memberVOXML.CardTypeCode == "502")
            {
                imgVIP.Src = "/images/VIP-01.jpg";
            }

            else if (memberVOXML.CardTypeCode == "503")
            {
                imgVIP.Src = "/images/VVIP-01.png";
            }

            lblJF.InnerText = memberVOXML.SumJfTotal;

            if (string.IsNullOrEmpty(lblJF.InnerText.Trim()))
            {
                lblJF.InnerText = "0";
            }

            QueryCertiByHyCard q    = new QueryCertiByHyCard();
            List <CardJson>    list = q.getQueryCertiByHyCard(phone);

            if (!string.IsNullOrEmpty(list[0].CERTINO.ToString().Trim()))
            {
                lblYHQ.InnerText = list.Count.ToString();
            }
            else
            {
                lblYHQ.InnerText = "0";
            }
            rtInvite.DataSource = list;
            this.rtInvite.DataBind();

            PointVO posPoint = new PointVO();

            posPoint.yyyy = DateTime.Now.Year.ToString();
            if (selYY.SelectedIndex != 0)
            {
                posPoint.mm = (selYY.SelectedIndex + 1).ToString("00");
            }
            else
            {
                selYY.SelectedIndex = DateTime.Now.Month - 1;
                if (selYY.SelectedIndex == 0)
                {
                    selYY.SelectedIndex = 12;
                }
                posPoint.mm = DateTime.Now.Month.ToString("00");
            }

            posPoint.bgnRowNum = "1";
            posPoint.endRowNum = "100";

            memberVO.posCardNo = memberVOXML.CardFaceNo;



            string xmlPoints = PosPoint.getPosPoint(memberVO, posPoint);

            IList <PointVOXML> listPont = new List <PointVOXML>();

            //    listPont = XmlToEntityList(xmlPoints);

            listPont = PosPoint.xmlToList <PointVOXML>(xmlPoints);

            rtpContact.DataSource = listPont;
            this.rtpContact.DataBind();
        }
    }