private bool formCollectionEditor_OnEdit(object obj, FormCollectionEditor.CollectionEditorEventArgs e, out object oldValue) { ICloneable clone = obj as ICloneable; oldValue = obj; if (clone != null) { oldValue = clone.Clone(); } IShellControlDev shellControlDev = this.Control as IShellControlDev; FormElementDataListEntityDev formElementDataListEntityDev = shellControlDev.Entity as FormElementDataListEntityDev; using (FormSEPaginationDataGridViewDevColumnAdd formFormElementAdd_DataColumn = new FormSEPaginationDataGridViewDevColumnAdd(formElementDataListEntityDev)) { formFormElementAdd_DataColumn.FormElementDataColumnEntity = (FormElementDataListTextBoxColumnEntityDev)obj; formFormElementAdd_DataColumn.FormEntity = (FormEntityDev)formElementDataListEntityDev.HostFormEntity; formFormElementAdd_DataColumn.EditCollection = e.EditCollection; if (formFormElementAdd_DataColumn.ShowDialog() == DialogResult.OK) { return(true); } else { return(false); } } }
private void AddColumn(object sender, EventArgs args) { IShellControlDev shellControlDev = this.Control as IShellControlDev; FormElementDataListEntityDev formElementDataListEntityDev = (FormElementDataListEntityDev)shellControlDev.Entity; using (FormSEPaginationDataGridViewDevColumnAdd formSEPaginationDataGridViewDevColumnAdd = new FormSEPaginationDataGridViewDevColumnAdd(formElementDataListEntityDev)) { formSEPaginationDataGridViewDevColumnAdd.FormEntity = (FormEntityDev)formElementDataListEntityDev.HostFormEntity; formSEPaginationDataGridViewDevColumnAdd.ShellControlDev = shellControlDev; formSEPaginationDataGridViewDevColumnAdd.ShowDialog(); } }
private bool formCollectionEditor_OnAdd(FormCollectionEditor.CollectionEditorEventArgs e, out object addValue) { IShellControlDev shellControlDev = this.Control as IShellControlDev; FormElementDataListEntityDev formElementDataListEntityDev = shellControlDev.Entity as FormElementDataListEntityDev; using (FormSEPaginationDataGridViewDevColumnAdd formFormElementAdd_DataColumn = new FormSEPaginationDataGridViewDevColumnAdd(formElementDataListEntityDev)) { formFormElementAdd_DataColumn.FormEntity = (FormEntityDev)formElementDataListEntityDev.HostFormEntity; formFormElementAdd_DataColumn.EditCollection = e.EditCollection; if (formFormElementAdd_DataColumn.ShowDialog() == DialogResult.OK) { addValue = formFormElementAdd_DataColumn.FormElementDataColumnEntity; return(true); } else { addValue = null; return(false); } } }