Example #1
0
 public UserViewModel(User user)
 {
     if (user == null)
        {
        throw new ArgumentNullException("conference");
        }
        this.Model = user;
 }
Example #2
0
 public static bool AuthentificateUser(User user)
 {
     var cu = DataManager.Instance.GetUser(user.Name, user.Password);
     if (cu != null)
     {
         currentUser = cu;
         authentificated = true;
         return true;
     }
     else
     {
         currentUser = null;
         authentificated = true;
         return true;
     }
 }
Example #3
0
 public LoginViewModel()
 {
     CurrentUser = new User { Name = "Name", Password = "******" };
 }
Example #4
0
 /// <summary>
 /// Create a new User object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="fullName">Initial value of the FullName property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="password">Initial value of the Password property.</param>
 /// <param name="role">Initial value of the Role property.</param>
 /// <param name="email">Initial value of the Email property.</param>
 public static User CreateUser(global::System.Guid id, global::System.String fullName, global::System.String name, global::System.String password, global::System.String role, global::System.String email)
 {
     User user = new User();
     user.Id = id;
     user.FullName = fullName;
     user.Name = name;
     user.Password = password;
     user.Role = role;
     user.Email = email;
     return user;
 }
Example #5
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Users EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToUsers(User user)
 {
     base.AddObject("Users", user);
 }