Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string act = Request["action"];

        if (!string.IsNullOrEmpty(act))
        {
            UserData ud = Session["UserData"] as UserData;
            var      js = new System.Web.Script.Serialization.JavaScriptSerializer();
            switch (act)
            {
            case "add_pur":
                if (!UserData.ChkObjNull(UserData.ObjType.购物车))
                {
                    ud = Session["UserData"] as UserData;
                    ud.ShoppingCart = new DS_Cart();
                }
                var odinfo = ud.ShoppingCart.Add(int.Parse(Request.Form["id"]), int.Parse(Request.Form["num"]));
                Response.Write(js.Serialize(odinfo));
                break;

            case "send_msg":
                var email = new Common.EmailUitility();
                email.AddEmailAddress(_vMember.QQ + "@qq.com");
                email.Title   = "客户留言--点石网";
                email.Content = Request.Form["content"];
                email.SendEmail();
                break;
            }
        }
    }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
      
         string act = Request["action"];
         if (!string.IsNullOrEmpty(act))
         {
             UserData ud = Session["UserData"] as UserData;
             var js = new System.Web.Script.Serialization.JavaScriptSerializer();
             switch (act)
             {
                 case "add_pur":
                     if (!UserData.ChkObjNull(UserData.ObjType.购物车))
                     {
                         ud = Session["UserData"] as UserData;
                         ud.ShoppingCart = new DS_Cart();
                     }
                     var odinfo =ud.ShoppingCart.Add(int.Parse(Request.Form["id"]), int.Parse(Request.Form["num"]));
                     Response.Write(js.Serialize(odinfo));
                     break;
                 case "send_msg":
                     var email = new Common.EmailUitility();
                     email.AddEmailAddress(_vMember.QQ+"@qq.com");
                     email.Title = "客户留言--点石网";
                     email.Content=Request.Form["content"];
                     email.SendEmail();
                     break;
             }
         }
      
 }
Example #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //设置左边菜单
        var mst = this.Master as Member_Manage_MasterPage;

        mst.SetMenuTitle("帐号管理", "邮箱验证");
        //保存事件
        Button1.Click += new EventHandler(Button1_Click);
        if (IsPostBack)
        {
            return;
        }
        var bl = new DS_Members_Br();

        if (!string.IsNullOrEmpty(Request.QueryString["action"]))
        {
            string act = Request.QueryString["action"];
            switch (act)
            {
            case "vlemail":    //获取邮箱验证码
                _userData.ValiCode = Common.StringFormat.ValidateCode(6);
                var emun = new Common.EmailUitility();
                emun.Title   = "点石网邮箱验证!";
                emun.Content = "您的邮箱验证码是:" + _userData.ValiCode;
                emun.AddEmailAddress(Request.QueryString["email"]);
                emun.FromAddress = "\"点石网会员中心\" " + emun.FromAddress;
                emun.SendEmail();
                break;

            case "modify":    //修改邮箱

                break;

            case "cancle":    //取消验证
                _userData.Member.EmailValidate = false;
                bl.Update(_userData.Member);
                Common.MessageBox.ResponseScript(this, "window.cancelValidate()");
                break;
            }
        }//没有动作
        else
        {
            if (_userData.Member.EmailValidate)//如果已验证则显示已验证界面
            {
                cemail.Value = _userData.Member.Email;
                Common.MessageBox.ResponseScript(this, "window.vlsucc();");
            }
        }
    }
Example #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //设置左边菜单
     var mst = this.Master as Member_Manage_MasterPage;
     mst.SetMenuTitle("帐号管理", "邮箱验证");
     //保存事件
     Button1.Click+=new EventHandler(Button1_Click);
     if (IsPostBack) return;
     var bl = new DS_Members_Br();
     if (!string.IsNullOrEmpty(Request.QueryString["action"]))
     {
         string act = Request.QueryString["action"];
         switch (act)
         {
             case "vlemail"://获取邮箱验证码
                 _userData.ValiCode = Common.StringFormat.ValidateCode(6);
                 var emun = new Common.EmailUitility();
                 emun.Title = "点石网邮箱验证!";
                 emun.Content = "您的邮箱验证码是:" + _userData.ValiCode;
                 emun.AddEmailAddress(Request.QueryString["email"]);
                 emun.FromAddress = "\"点石网会员中心\" " + emun.FromAddress;
                 emun.SendEmail();
                 break;
             case "modify"://修改邮箱
                 
                 break;
             case "cancle"://取消验证
                 _userData.Member.EmailValidate = false;
                 bl.Update(_userData.Member);
                 Common.MessageBox.ResponseScript(this, "window.cancelValidate()");
                 break;
         }
     }//没有动作
     else {
         if (_userData.Member.EmailValidate)//如果已验证则显示已验证界面
         {
             cemail.Value = _userData.Member.Email;
             Common.MessageBox.ResponseScript(this, "window.vlsucc();");
         }
     }
 }