protected void login_overseas() { LEANJU.BLL.Users bll = new LEANJU.BLL.Users(); LEANJU.Model.Users ex = new LEANJU.Model.Users(); string emailorMbl = Request.QueryString["signin_email"]; string password = Request.QueryString["signin_password"]; string remember_me = Request.QueryString["remember_me"]; string telcode = Request.QueryString["telcode"]; if (bll.GetList(string.Format("emailorMbl='{0}' and password='******' and telcode='{2}'", emailorMbl, password, telcode)).Tables[0].Rows.Count > 0) { //string id = bll.GetList(string.Format("ID='{0}' and Password='******'", ID, Password)).Tables[0].Rows[0]["ID"].ToString(); //Session["ID"] = id; WriteMessage("result", "1"); } else { WriteMessage("result", "0"); } }
protected void FindPassword() { LEANJU.BLL.Users bll = new LEANJU.BLL.Users(); LEANJU.Model.Users ex = new LEANJU.Model.Users(); string emailorMbl = Request.QueryString["signin_email"]; if (bll.GetList(string.Format("emailorMbl='{0}' ", emailorMbl)).Tables[0].Rows.Count > 0) { ex = bll.GetModel(emailorMbl); Password = ex.password;//从后台获取的用户密码值,存在变量Password中 // A a = new A(); //Dictionary<string, string> myDictionary = new Dictionary<string, string>(); //myDictionary.Add("a","a"); //myDictionary.Add("b", "b"); //myDictionary.Add("c", "c"); //a.myDictionary = myDictionary; //JavaScriptSerializer jss = new JavaScriptSerializer(); //String resultObj=jss.Serialize(a); WriteMessage("result", Password); } else { WriteMessage("result", "0"); } }
protected void Regist() { LEANJU.BLL.Users bll = new LEANJU.BLL.Users(); LEANJU.Model.Users model = new LEANJU.Model.Users(); model.emailorMbl = Request.QueryString["CellphoneNumber"]; model.password = Request.QueryString["user_password"]; model.telcode = Request.QueryString["countryAreaCode"]; model.user_first_name = Request.QueryString["user_first_name"]; model.user_last_name = Request.QueryString["user_last_name"]; if (bll.GetList(string.Format("emailorMbl='{0}' ", model.emailorMbl)).Tables[0].Rows.Count > 0) { WriteMessage("result", "0"); } else if (bll.Add(model)) { WriteMessage("result", "1"); } }
protected void Check() { LEANJU.BLL.Users bll = new LEANJU.BLL.Users(); LEANJU.Model.Users ex = new LEANJU.Model.Users(); string emailorMbl = Request.QueryString["CellphoneNumber"]; string telcode = Request.QueryString["countryAreaCode"]; if (bll.GetList(string.Format("emailorMbl='{0}' and telcode='{1}' ", emailorMbl, telcode)).Tables[0].Rows.Count > 0) { WriteMessage("result", "0"); } else { WriteMessage("result", "1"); } }
protected void login() { LEANJU.BLL.Users bll = new LEANJU.BLL.Users(); LEANJU.Model.Users ex = new LEANJU.Model.Users(); string emailorMbl = Request.QueryString["signin_email"]; string password = Request.QueryString["signin_password"]; if (bll.GetList(string.Format("emailorMbl='{0}' and password='******' ", emailorMbl, password)).Tables[0].Rows.Count > 0) { //string id = bll.GetList(string.Format("emailorMbl='{0}' and password='******'", emailorMbl, password)).Tables[0].Rows[0]["emailorMbl"].ToString(); ex = bll.GetModel(emailorMbl); Session["user_first_name"] = ex.user_first_name; Session["user_last_name"] = ex.user_last_name; Session["emailorMbl"] = ex.emailorMbl; WriteMessage("result", "1"); } else { WriteMessage("result", "0"); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(LEANJU.Model.Users model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(LEANJU.Model.Users model) { return(dal.Add(model)); }