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

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

            ProcessWindow pw = new ProcessWindow("Loading ...");

            View.Model.EntityList = service.GetMenuOption(new MenuOption());
            View.Model.Record = null;

            View.Model.MenuOptionTypeList = service.GetMenuOptionType(new MenuOptionType());
            View.Model.OptionType = service.GetOptionType(new OptionType());

            pw.Close();
        }
예제 #2
0
        public MenuOptionPresenter(IUnityContainer container, IMenuOptionView view)
        {
            View           = view;
            this.container = container;
            this.service   = new WMSServiceClient();
            View.Model     = this.container.Resolve <MenuOptionModel>();

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

            ProcessWindow pw = new ProcessWindow("Loading ...");

            View.Model.EntityList = service.GetMenuOption(new MenuOption());
            View.Model.Record     = null;

            View.Model.MenuOptionTypeList = service.GetMenuOptionType(new MenuOptionType());
            View.Model.OptionType         = service.GetOptionType(new OptionType());

            pw.Close();
        }