Marisic.Net is an open source project powered by Assembla

Assembla offers free public and private SVN/Git repositories and project hosting with bug/issue tracking and collaboration tools.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#region Using Statements

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI;
using StructuredWeb.Domain.Business;
using StructuredWeb.Modules.EmployeeManagement.View;
using StructureMap;

#endregion

namespace StructuredWeb
{
    public partial class _Default : Page, IEmployeeView
    {
        private EmployeePresenter _presenter;

        public EmployeePresenter Presenter
        {
            get
            {
                if (_presenter == null)
                {
                    ObjectFactory.BuildUp(this);
                }

                return _presenter;
            }
            set
            {
                _presenter = value;
                _presenter.View = this;
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Presenter.OnViewInitialized();
            }

            Presenter.OnViewLoaded();
            Page.DataBind();
        }

        #region Implementation of IEmployeeView

        IList<Employee> IEmployeeView.Employees
        {
            get { return ViewState["IEmployeeView.Employees"] as IList<Employee>; }
            set { ViewState["IEmployeeView.Employees"] = value; }
        }

        IList<Employee> IEmployeeView.EmployeesListDatasource
        {
            set { lstEmployees.DataSource = value; }
        }

        #endregion
    }
}
Ajax-loader Loading, please wait...