示例#1
0
        public int login(string username, string password)
        {
            int result = 0;

            User user = new User();
            user.UserName = username;
            user.Password = password;
            user.Path = Application.StartupPath + "\\" + username + ".tdc";
            result = user.Login();

            if (result == 1) { CurrentUser = user.GetBy(username); ; }
            else { CurrentUser = null; }

            return result;
        }
示例#2
0
        public int login(string username, string password)
        {
            int result = 0;

            User user = new User();
            user.UserName = username;
            user.Password = password;
            user.Path = Application.StartupPath + "\\" + username + ".tdc";
            result = user.Login();

            return result;
        }