예제 #1
0
        public RolPresenter(IUnityContainer container, IRolView view)
        {
            View           = view;
            this.container = container;
            this.service   = new WMSServiceClient();
            View.Model     = this.container.Resolve <RolModel>();

            //Event Delegate
            View.LoadSearch += new EventHandler <DataEventArgs <string> >(this.OnLoadSearch);
            View.New        += new EventHandler <EventArgs>(this.OnNew);
            View.LoadData   += new EventHandler <DataEventArgs <Rol> >(this.OnLoadData);
            View.Save       += new EventHandler <EventArgs>(this.OnSave);
            View.Delete     += new EventHandler <EventArgs>(this.OnDelete);

            View.AddRolMenuOption += new EventHandler <EventArgs>(OnAddRolMenuOption);

            View.Model.EntityList = service.GetRol(new Rol());
            View.Model.Record     = null;
        }
예제 #2
0
        public RolPresenter(IUnityContainer container, IRolView view)
        {
            View = view;
            this.container = container;
            this.service = new WMSServiceClient();
            View.Model = this.container.Resolve<RolModel>();

            //Event Delegate
            View.LoadSearch += new EventHandler<DataEventArgs<string>>(this.OnLoadSearch);
            View.New += new EventHandler<EventArgs>(this.OnNew);
            View.LoadData += new EventHandler<DataEventArgs<Rol>>(this.OnLoadData);
            View.Save += new EventHandler<EventArgs>(this.OnSave);
            View.Delete += new EventHandler<EventArgs>(this.OnDelete);

            View.AddRolMenuOption += new EventHandler<EventArgs>(OnAddRolMenuOption);

            View.Model.EntityList = service.GetRol(new Rol());
            View.Model.Record = null;

        }