protected override void Context()
            {
                NewEmployeeInfoPresenter presenter = GetNewEmployeeInfoPresenter();

                presenter.Cancel();

                result = presenter.Get();
            }
        private void AddNewEmployee_Click(object sender, System.EventArgs e)
        {
            SelectEmployeeManagerForm      selectEmployeeManagerForm      = new SelectEmployeeManagerForm();
            SelectEmployeeManagerPresenter selectEmployeeManagerPresenter = new SelectEmployeeManagerPresenter(selectEmployeeManagerForm, EmployeeRepository);

            NewEmployeeInfoForm      newEmployeeInfoForm      = new NewEmployeeInfoForm();
            NewEmployeeInfoPresenter newEmployeeInfoPresenter = new NewEmployeeInfoPresenter(newEmployeeInfoForm, selectEmployeeManagerPresenter);

            Presenter.AddNewEmployeeRequested(newEmployeeInfoPresenter);
        }
            protected override void Context()
            {
                NewEmployeeInfoPresenter presenter = GetNewEmployeeInfoPresenter();

                presenter.FirstNameSupplied("FirstName");
                presenter.LastNameSupplied("LastName");
                presenter.EmailSupplied("*****@*****.**");
                presenter.Next();

                result = presenter.Get();
            }
Ejemplo n.º 4
0
        public void Execute(AddNewEmployeeData data)
        {
            NewEmployeeInfoForm      newEmployeeInfoForm      = new NewEmployeeInfoForm();
            NewEmployeeInfoPresenter newEmployeeInfoPresenter = new NewEmployeeInfoPresenter(newEmployeeInfoForm);

            SelectEmployeeManagerForm      selectEmployeeManagerForm      = new SelectEmployeeManagerForm();
            SelectEmployeeManagerPresenter selectEmployeeManagerPresenter = new SelectEmployeeManagerPresenter(selectEmployeeManagerForm, EmployeeRepository);

            IAddNewEmployeeService addNewEmployeeService = new AddNewEmployeeService(newEmployeeInfoPresenter, selectEmployeeManagerPresenter, EventPublisher);

            addNewEmployeeService.Run();
        }
            protected NewEmployeeInfoPresenter GetNewEmployeeInfoPresenter()
            {
                NewEmployeeInfoPresenter presenter = new NewEmployeeInfoPresenter(view);

                return(presenter);
            }