예제 #1
0
        /*method use to disable the account on 3 time wrong credientials*/
        public void disableAccount(string login)
        {
            Administrator_DAL       administrator_DAL = new Administrator_DAL();
            List <Administrator_BO> list = administrator_DAL.getAdministratorList();

            foreach (Administrator_BO admin in list)
            {
                if (admin.userName == login)
                {
                    admin.Status = "disable";
                    break;
                }
            }
            administrator_DAL.saveAdminAccounList(list);
        }
예제 #2
0
        /*method use to verify username and password to login system*/
        public bool loginAccessAdmin(string u_id, string pin)
        {
            bool result = false;
            Administrator_DAL       administrator = new Administrator_DAL();
            List <Administrator_BO> list          = administrator.getAdministratorList();

            if (list != null)
            {
                foreach (Administrator_BO admin in list)
                {
                    if (admin.userName == u_id && admin.Password == pin && admin.Status == "active")
                    {
                        result = true;
                        break;
                    }
                }
            }
            return(result);
        }