示例#1
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");
        }
    }
示例#2
0
    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");
        }
    }