Exemplo n.º 1
0
 public void Initialize()
 {
     _mockery = new Mockery();
     _view = _mockery.NewMock<IEmployeeView>();
     _service = _mockery.NewMock<IEmployeeService>();
     _model = new EmployeeModel();
     _presenter = new EmployeePresenter(_view, _model, _service);
 }
Exemplo n.º 2
0
        private void FormEmployee_Load(object sender, EventArgs e)
        {
            _presenter = new EmployeePresenter(this,
                                               new EmployeeModel(),
                                               new EmployeeWebService());

            try
            {
                _suppressEvents = true;
                //-- initialize presenter
                _presenter.Initialize();
                _isDirty = false;
            }

            finally
            {
                _suppressEvents = false;
            }
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _presenter = new EmployeePresenter(this,
                                               new EmployeeModel(),
                                               new EmployeeService());

            if (!IsPostBack)
            {
                LabelErrorMessage.Text = String.Empty;

                try
                {
                    _suppressEvents = true;
                    //-- initialize presenter
                    _presenter.Initialize();
                    //_isDirty = false; //-- web is stateless
                }

                finally
                {
                    _suppressEvents = false;
                }
            }
        }
Exemplo n.º 4
0
 public EmployeesManager()
 {
     Presenter = new EmployeePresenter(this);
 }