コード例 #1
0
        public Employee CreateEmployee(string name, string passWrd, OperationsTypes allowedOp)
        {
            var newEmpl = new Employee(Employees.Count, name, passWrd, allowedOp);

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