Beispiel #1
0
        /// <summary>
        /// 验证电话和旧密码
        /// </summary>
        void valitepwd()
        {
            string phone  = string.Empty;
            string oldpwd = string.Empty;

            if (Request["phone"] != null && Request["phone"] != "")
            {
                phone = Request["phone"];
            }
            if (Request["oldpwd"] != null && Request["oldpwd"] != "")
            {
                oldpwd = Request["oldpwd"];
            }
            MSCustomersDAL customerDal = new MSCustomersDAL();

            if (phone != null && phone != "" && oldpwd != null && oldpwd != "")
            {
                if (customerDal.ExistPhoneAndPwd(phone, Common.Common.MD5(oldpwd)))
                {
                    Response.Write("{\"success\":true}");
                }
                else
                {
                    Response.Write("{\"error\":true,\"msg\":\"原密码不正确\"}");
                }
            }
            else
            {
                Response.Write("{\"error\":true,\"msg\":\"请正确输入信息后再操作\"}");
            }
            Response.End();
        }