12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- using CollaborativePlatformMain.DFEntity;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace CollaborativePlatformMain.Util
- {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- public class LoginUtil
- {
-
-
-
- public static List<UserInformationEntity> UserInfos = new List<UserInformationEntity>() { new UserInformationEntity("1", "1") };
-
-
-
-
-
-
- public static bool VerifyLoginMethod(string userName, string pwd)
- {
- bool success = false;
- foreach (var userInfo in UserInfos)
- {
- if (userInfo.UserName.Equals(userName) && userInfo.UserPwd.Equals(pwd))
- {
- success = true;
- break;
- }
- }
- return success;
- }
-
-
-
-
- public static bool RegisterMethod(string userName, string pwd)
- {
- try
- {
- UserInfos.Add(new UserInformationEntity(userName, pwd));
- }
- catch (Exception e)
- {
- return false;
- }
- return true;
- }
- }
- }
|