Example #1
0
        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");

            //
        }
Example #2
0
        public CRUDSelController GetCRUDSelController(DBase db, Type businessLogicType, Type crudFormType, string gridTitle, string crudFormTitle)
        {
            CRUDSelController result;
            BusinessLogic     businessLogic = BusinessLogicFactory.GetBusinessLogicInstance(db, businessLogicType);

            result = new CRUDSelController(businessLogic, gridTitle, crudFormTitle, crudFormType);
            return(result);
        }
Example #3
0
 public CRUDController(BusinessLogic businessLogic, string gridTitle, string crudFormTitle, Type crudFormType, CRUDSelController parentController) : this(businessLogic, gridTitle, crudFormTitle, crudFormType, parentController, false)
 {
 }
Example #4
0
 public void AddSelController(CRUDSelController selController)
 {
     selControllers.Add(selController);
 }