public string BindTelSaveInfo(string pis_yzm, string pis_tel, string pis_name, string pis_code) { string pos_json = ""; string ls_yzm = ConfigurationManager.AppSettings["Yanzm"].ToString(); if (pis_tel != "" && pis_name != "" && pis_code != "" && pis_yzm == ls_yzm) { try { TPortalClass.JpVerifyCode JpVerifyCode = new TPortalClass.JpVerifyCode(); DataTable dt = JpVerifyCode.GetCodesByTel(pis_tel); if (dt.Rows.Count > 0) { if (pis_code == dt.Rows[0]["hy_code"].ToString()) { TPortalClass.JpUserVip JpUserVip = new TPortalClass.JpUserVip(); JpUserVip.UpdateTel(pis_tel, pis_name); //绑定成功 pos_json = "{\"code\":\"0\"}"; } else { //验证码错误 pos_json = "{\"code\":\"1\"}"; } } } catch { //系统错误 pos_json = "{\"code\":\"2\"}"; } finally { } } else { //非法调用 pos_json = "{\"code\":\"3\"}"; } return pos_json; }
public string SignUpValidate(string pis_yzm, string pis_tel, string pis_name, string pis_activityid, string pis_code) { string pos_json = ""; string ls_yzm = ConfigurationManager.AppSettings["Yanzm"].ToString(); if (pis_tel != "" && pis_name != "" && pis_activityid != "" && pis_code != "" && pis_yzm == ls_yzm) { try { TPortalClass.JpVerifyCode JpVerifyCode = new TPortalClass.JpVerifyCode(); DataTable dt = JpVerifyCode.GetCodesByTel(pis_tel); if (dt.Rows.Count > 0) { if (pis_code == dt.Rows[0]["hy_code"].ToString()) { JpActivityusers JpActivityusers = new JpActivityusers(); DataTable dt_user = JpActivityusers.GetDocbyhyidAndactivityid(Convert.ToInt32(pis_activityid), pis_tel); if (dt_user.Rows.Count > 0) { //该用户已注册 pos_json = "{\"code\":\"2\"}"; } else { JpActivityusers.hy_addtime = System.DateTime.Now.ToString(); JpActivityusers.hy_id = Convert.ToInt32(pis_activityid); JpActivityusers.hy_name = pis_name; JpActivityusers.hy_tel = pis_tel; JpActivityusers.InsertSignUp(); //报名成功 pos_json = "{\"code\":\"0\"}"; } } else { //验证码错误 pos_json = "{\"code\":\"1\"}"; } } } catch { //系统错误 pos_json = "{\"code\":\"3\"}"; } finally { } } else { //非法调用 pos_json = "{\"code\":\"4\"}"; } return pos_json; }
public string RegistValidate(string pis_yzm, string pis_tel, string pis_code) { string pos_json = ""; string ls_yzm = ConfigurationManager.AppSettings["Yanzm"].ToString(); if (pis_tel != "" && pis_code != "" && pis_yzm == ls_yzm) { try { TPortalClass.JpVerifyCode JpVerifyCode = new TPortalClass.JpVerifyCode(); DataTable dt = JpVerifyCode.GetCodesByTel(pis_tel); if (dt.Rows.Count > 0) { if (pis_code == dt.Rows[0]["hy_code"].ToString()) { JpUserVip JpUserVip = new JpUserVip(); DataTable dt_user = JpUserVip.GetDocbyhyid(pis_tel); if (dt_user.Rows.Count > 0) { //该用户已注册 pos_json = "{\"code\":\"1\"}"; } else { //未注册验证码验证成功 pos_json = "{\"code\":\"0\"}"; } } else { //验证码错误 pos_json = "{\"code\":\"2\"}"; } } } catch { //系统错误 pos_json = "{\"code\":\"3\"}"; } finally { } } else { //非法调用 pos_json = "{\"code\":\"4\"}"; } return pos_json; }