public CustomProcessContextPresenter(IUnityContainer container, ICustomProcessContextView view) { View = view; this.container = container; this.service = new WMSServiceClient(); View.Model = this.container.Resolve<CustomProcessContextModel>(); //Event Delegate View.LoadSearch += new EventHandler<DataEventArgs<string>>(this.OnLoadSearch); View.New += new EventHandler<EventArgs>(this.OnNew); View.LoadData += new EventHandler<DataEventArgs<CustomProcessContext >>(this.OnLoadData); View.Save += new EventHandler<EventArgs>(this.OnSave); View.Delete += new EventHandler<EventArgs>(this.OnDelete); View.Model.EntityList = service.GetCustomProcessContext (new CustomProcessContext ()); View.Model.Record = null; }