コード例 #1
0
ファイル: index.aspx.cs プロジェクト: buwenqingo8/MirrorMe_CS
    //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();
        }
    }
コード例 #2
0
    void getQueryCertiByHyCard()
    {
        QueryCertiByHyCard q = new QueryCertiByHyCard();

        q.getQueryCertiByHyCard();
    }
コード例 #3
0
ファイル: index.aspx.cs プロジェクト: buwenqingo8/MirrorMe_CS
    List <CardJson> getQueryCertiByHyCard()
    {
        QueryCertiByHyCard q = new QueryCertiByHyCard();

        return(q.getQueryCertiByHyCard());
    }