예제 #1
0
        ///////////
        public Boolean AdminVerification(UserObj obj)
        {
            Boolean verified = false;


            parentInput    p    = new parentInput();
            List <UserObj> list = p.ReadData();

            foreach (UserObj b in list)
            {
                if (obj.ID.Equals(b.ID) && obj.pswd == b.pswd)
                {
                    if (b.UserType.Equals("admin"))
                    {
                        if (b.status.Equals("active"))
                        {
                            verified = true;
                            break;
                        }
                        else
                        {
                            Console.WriteLine("Your account is not \"active\"");
                            break;
                        }
                    }
                    else
                    {
                        Console.WriteLine("You are not exists in records as \"admin\"");
                        break;
                    }
                }
                else
                {
                    verified = false;
                }
            }
            return(verified);
        }
예제 #2
0
 public UserMenuItems()
 {
     p     = new parentInput();
     list  = p.ReadData();
     today = DateTime.Today;
 }