public CRUDController(BusinessLogic businessLogic, string gridTitle, string crudFormTitle, Type crudFormType, CRUDSelController parentController, bool repeatCreate) : base(businessLogic, crudFormTitle) { childControllers = new ArrayList(); selControllers = new ArrayList(); this.parentController = parentController; isSelectGrid = true; gridForm = new GridForm(); InitializeGridForm(gridForm); gridForm.CreateObject += new NonObjectEvent(CreateObject); gridForm.RetrieveObject += new ObjectEvent(RetrieveObject); gridForm.UpdateObject += new ObjectEvent(UpdateObject); gridForm.DeleteObject += new ObjectEvent(DeleteObject); gridForm.SelectObject += new ObjectEvent(SelectObject); gridForm.Reload += new NonObjectEvent(ReloadGrid); gridForm.Exit += new ExitEvent(gridForm_Exit); gridForm.Title = gridTitle; gridForm.MdiParent = CRUDFormParent; this.crudFormType = crudFormType; this.repeatCreate = repeatCreate; gridForm.SetDataSource(businessLogic.GetDataSource(), true); gridForm.SetLayout(businessLogic.PersistentType); //gridForm.SetFilter("Inscripto"); // }
protected override void ReloadGrid() { SetBusy(); //si se cierra la grilla al salir del form CRUD se rompe if (gridForm != null) { gridForm.SetDataSource(businessLogic.GetDataSource()); } ClearBusy(); }