internal ActionResult InitFilterAndRedirectTo(BaseTableForm state, IList <BizFormOptions> options) { if (state != null) { state.FilterForm = state.GetFilterForm(this); if (state.FilterForm != null) { state.FilterControlOptions = GetFormOptions(state.FilterForm.Id, options); } } return(RedirectTo(state)); }
private void btnTableForm_Click(object sender, EventArgs e) { if (lstTable.SelectedIndex < 0) { return; } controller.PromptToSaveFile(); BaseTableForm frm = null; string tableName = lstTable.SelectedItem.ToString(); if (tableName == "Book") { frm = new FBookTable(tableName, controller.DataSet, controller.SaveFile); } else if (tableName == "Genre") { frm = new FGenreTable(tableName, controller.DataSet, controller.SaveFile); } else if (tableName == "Edition") { frm = new FEditionTable(tableName, controller.DataSet, controller.SaveFile); } else if (tableName == "Function") { frm = new FFunctionTable(tableName, controller.DataSet, controller.SaveFile); } else if (tableName == "Person") { frm = new FPersonTable(tableName, controller.DataSet, controller.SaveFile); } else if (tableName == "Reader") { frm = new FReaderTable(tableName, controller.DataSet, controller.SaveFile); } else if (tableName == "Librarian") { frm = new FLibrarianTable(tableName, controller.DataSet, controller.SaveFile); } else if (tableName == "FuncPerson") { frm = new FFuncPersonTable(tableName, controller.DataSet, controller.SaveFile); } else if (tableName == "BookList") { frm = new FBookListTable(tableName, controller.DataSet, controller.SaveFile); } else if (tableName == "Order") { frm = new FOrderTable(tableName, controller.DataSet, controller.SaveFile); } else if (tableName == "EditionBooks") { frm = new FEditionBooksTable(tableName, controller.DataSet, controller.SaveFile); } if (frm != null) { frm.ShowDialog(); } dataGridView1.Refresh(); }