public void HandlerRequest(loanRequest req)
 {
     if (req.Amount > 10000)
     {
         Console.WriteLine("Loan was approved by manager");
     }
 }
 public void HandlerRequest(loanRequest req)
 {
     if(req.Amount <10000)
         Console.WriteLine("Loan was apporved");
     else
     {
        Succsessor.HandlerRequest(req);
     }
 }
 public void HandlerRequest(loanRequest req)
 {
     if (req.Amount < 10000)
     {
         Console.WriteLine("Loan was apporved");
     }
     else
     {
         Succsessor.HandlerRequest(req);
     }
 }
        public void Test()
        {
            var laonA = new loanRequest { Amount =10, Customer = "Ivan"};
            var laonb = new loanRequest { Amount = 1000, Customer = "bab" };
            var laoni = new loanRequest { Amount = 100000, Customer = "sad" };

            var manager = new Manager { Name = "aaa" ,  Succsessor = null};
            var casier = new casier {Name = "asda", Succsessor = manager};

            casier.HandlerRequest(laonA);
            casier.HandlerRequest(laonb);
            casier.HandlerRequest(laoni);
        }
        public void Test()
        {
            var laonA = new loanRequest {
                Amount = 10, Customer = "Ivan"
            };
            var laonb = new loanRequest {
                Amount = 1000, Customer = "bab"
            };
            var laoni = new loanRequest {
                Amount = 100000, Customer = "sad"
            };


            var manager = new Manager {
                Name = "aaa", Succsessor = null
            };
            var casier = new casier {
                Name = "asda", Succsessor = manager
            };

            casier.HandlerRequest(laonA);
            casier.HandlerRequest(laonb);
            casier.HandlerRequest(laoni);
        }
 public void HandlerRequest(loanRequest req)
 {
     if(req.Amount>10000)
        Console.WriteLine("Loan was approved by manager");
 }