Пример #1
0
        /// <summary>
        /// Login (based on Email and Password)
        /// </summary>
        /// <returns></returns>
        static async Task <(UserType, IUser)> ShowLoginScreen()
        {
            //Read inputs
            string email, password;

            WriteLine("=====LOGIN=========");
            Write("Email: ");
            email = ReadLine();
            Write("Password: "******"Invalid Email or Password. Please try again...");
            return(UserType.Anonymous, null);
        }
        /// <summary>
        /// Updates SystemUser's Password.
        /// </summary>
        /// <returns></returns>
        public static async Task ChangeSystemUserPassword()
        {
            try
            {
                using (ISystemUserBL systemUserBL = new SystemUserBL())
                {
                    //Read Current Password
                    Write("Current Password: "******"New Password: "******"Confirm Password: "******"Distributor Password Updated");
                            }
                        }
                        else
                        {
                            WriteLine($"New Password and Confirm Password doesn't match");
                        }
                    }
                    else
                    {
                        WriteLine($"Current Password doesn't match.");
                    }
                }
            }
            catch (Exception ex)
            {
                ExceptionLogger.LogException(ex);
                WriteLine(ex.Message);
            }
        }