public Employee CreateEmployee(string name, string passWrd, OperationsTypes allowedOp) { var newEmpl = new Employee(Employees.Count, name, passWrd, allowedOp); Employees.Add(newEmpl); return(newEmpl); }
private void CheckAccess(OperationsTypes op) { if (!CurrentEmployee.AllowedOperatinType.HasFlag(op)) { throw new Exception("Нет прав доступа!"); } }
public void CreateOperation(OperationsTypes opType, decimal moneyAmount) { // Проверить доступ сотрудника // Создать операцию // Применить операцию }
public Employee(int number, string name, string passwrd, OperationsTypes allowedOpTypes) : base(number, name) { Password = passwrd; AllowedOperatinType = allowedOpTypes; }