} //gives the total due amount of the user for non returned item //ctor public User(AutorisationLevel level, string name, string password, double total = 0, double turnover = 0) { NonReturnedBook = 0; Turnover = turnover; Total = total; Level = level; Name = name; _password = password; }
//allow you to know how much user are in the collection for a determined Level public int UserPerLevel(AutorisationLevel autoLevel) { int _userNum = 0; foreach (User item in _customerList) { if (item.Level == autoLevel) { _userNum++; } } return(_userNum); }