public AdminForm(UserService userService, ServiciuService serviciuServer, ProgramareService programareService)
 {
     _userService       = userService;
     _serviciuServer    = serviciuServer;
     _programareService = programareService;
     InitializeComponent();
 }
        static void Main()
        {
            Type obj = Type.GetType(ConfigurationManager.AppSettings["UserRepository"]);

            System.Reflection.ConstructorInfo constructor = obj.GetConstructor(new Type[] { });
            IUserDAO userRepository = (IUserDAO)constructor.Invoke(null);

            UserService userService = new UserService(userRepository);

            obj         = Type.GetType(ConfigurationManager.AppSettings["ServiciuRepository"]);
            constructor = obj.GetConstructor(new Type[] { });
            IServiciuDAO serviciuRepository = (IServiciuDAO)constructor.Invoke(null);

            ServiciuService serviciuServer = new ServiciuService(serviciuRepository);

            obj         = Type.GetType(ConfigurationManager.AppSettings["ProgramareServiciuRepository"]);
            constructor = obj.GetConstructor(new Type[] { });
            IProgramareServiciuDAO programareServiciuRepository = (IProgramareServiciuDAO)constructor.Invoke(null);


            obj         = Type.GetType(ConfigurationManager.AppSettings["ProgramareRepository"]);
            constructor = obj.GetConstructor(new Type[] { });
            IProgramareDAO programareRepository = (IProgramareDAO)constructor.Invoke(null);

            ProgramareService programareService = new ProgramareService(programareRepository, serviciuRepository, programareServiciuRepository);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new LoginForm(userService, serviciuServer, programareService));
        }
 public AngajatForm(ServiciuService serviciuService, ProgramareService programareService)
 {
     InitializeComponent();
     _serviciuServer    = serviciuService;
     _programareService = programareService;
 }