/// <summary>
 /// Deprecated Method for adding a new object to the UserDALs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToUserDALs(UserDAL userDAL)
 {
     base.AddObject("UserDALs", userDAL);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Login
        /// </summary>
        /// <param name="user"></param>
        /// <returns>bool</returns>
        public bool Login(string Username, string Password)
        {
            return true;

            var isValid = false;
            try
            {
                if (Username != null && Password != null)
                {
                    // inistantiate a UserDAL object & authenticate
                    var userDAL = new ProjectManagerDAL.UserDAL();
                    isValid = userDAL.Authenticate(Username, Password);
                }
            }
            catch (Exception)
            {

                throw;
            }

            return isValid;
        }
 /// <summary>
 /// Create a new UserDAL object.
 /// </summary>
 /// <param name="userID">Initial value of the UserID property.</param>
 /// <param name="userName">Initial value of the UserName property.</param>
 /// <param name="password">Initial value of the Password property.</param>
 /// <param name="userRole">Initial value of the UserRole property.</param>
 /// <param name="firstName">Initial value of the FirstName property.</param>
 /// <param name="lastName">Initial value of the LastName property.</param>
 public static UserDAL CreateUserDAL(global::System.Int32 userID, global::System.String userName, global::System.String password, global::System.String userRole, global::System.String firstName, global::System.String lastName)
 {
     UserDAL userDAL = new UserDAL();
     userDAL.UserID = userID;
     userDAL.UserName = userName;
     userDAL.Password = password;
     userDAL.UserRole = userRole;
     userDAL.FirstName = firstName;
     userDAL.LastName = lastName;
     return userDAL;
 }