Example #1
0
 partial void UpdateDS_Members(DS_Members instance);
Example #2
0
 partial void DeleteDS_Members(DS_Members instance);
Example #3
0
 partial void InsertDS_Members(DS_Members instance);
Example #4
0
 partial void DeleteDS_Members(DS_Members instance);
Example #5
0
 partial void UpdateDS_Members(DS_Members instance);
Example #6
0
 partial void InsertDS_Members(DS_Members instance);
Example #7
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 ud = Session["UserData"] as UserData;
        var bl = new DS_Members_Br();

        Com.DianShi.Model.Member.DS_Members md = null;
        try
        {
            md = bl.GetSingle(ud.Member.ID);
            ViewState["Mobile"] = md.Mobile;
        }
        catch (Exception ex) {
            Common.WriteLog.SetErrLog(Request.Url.ToString(), "Page_Load", ex.Message);
            Common.MessageBox.Show(this, "获取数据出错", Common.MessageBox.InfoType.error, "history.back");
        }


        if (!string.IsNullOrEmpty(Request.QueryString["action"]))
        {
            string act = Request.QueryString["action"];
            switch (act)
            {
            case "vlmobile":    //获取手机验证码
                var vcbl = new DS_ValiCodeSend_Br();
                if (vcbl.SendEnable(ud.Member.ID))
                {
                    ud.ValiCode = Common.StringFormat.ValidateCode(6);
                    var ws = new WebService.SMS.Service1();
                    //ws.SendMessages(Common.Constant.WebConfig("SMSAccount"), Common.Constant.WebConfig("SMSPassword"), Request.QueryString["mobile"], "您的手机验证码是:" + ud.ValiCode + "(点石网)", "");
                }
                else
                {
                    Response.Write("false");
                    Response.End();
                }

                break;

            case "modify":    //修改手机

                break;

            case "cancle":    //取消验证
                md.MobileValidate = false;
                bl.Update(md);
                Common.MessageBox.ResponseScript(this, "window.cancelValidate()");
                break;
            }
        }//没有动作
        else
        {
            if (md.MobileValidate)//如果已验证则显示已验证界面
            {
                cmobile.Value = md.Mobile;
                Common.MessageBox.ResponseScript(this, "window.vlsucc();");
            }
        }
    }