Beispiel #1
0
 public void On_Login()
 {
     if ((id.Length <= 0) || (password.Length <= 0))
     {
         //apps.Show_Message("null_inputted");
     }
     else
     {
         users.Login(id, password);
     }
 }
Beispiel #2
0
        public HttpResponseMessage login([FromBody] USER u)
        {
            Result <USER> ru = new Result <USER>();

            USER        ou     = new USER();
            int         result = 0;
            List <USER> lu     = new List <USER>();

            try
            {
                result = DB_User.Login(u, out ou);
                lu.Add(ou);

                if (result == 1)
                {
                    ru.code    = "2000";
                    ru.success = "true";
                    ru.message = "登录成功!";
                }
                else
                {
                    ru.code    = "2001";
                    ru.success = "false";
                    ru.message = "登录失败";
                }
            }
            catch (Exception e) {
                ru.code    = "2002";
                ru.success = "false";
                ru.message = e.Message;
            }


            ru.systemTime = Conn.GetTimeStamp();
            ru.data       = lu;

            return(Conn.toJson(ru));
        }
 public TB_User login(TB_User user, OleDbConnection db)
 {
     return(_User.Login(user, db));
 }