public ActionBase() { editable = true; multiselect = false; //returnOnMatch = true; VA returnType = SelectionFormReturnType.AsIs; }
protected abstract mymodel.Entity[] ShowSelectionList(string searchField, object searchValue, bool returnOnMatch, bool editable, bool multiselect, SelectionFormReturnType returntype);
public SelectionFormBase() { returntype = SelectionFormReturnType.AsIs; multiselect = false; }
Entity[] ISelectionForm.ShowSelectionList(string searchField, object searchValue, bool returnOnMatch, bool editable, bool multiselect, SelectionFormReturnType returntype) { this.multiSelect = multiselect; this.returnType = returntype; closeAction = DialogResult.OK; if (editable) State = ListFormState.EditAndSelect; else State = ListFormState.SelectOnly; if (multiselect == false && returnOnMatch == true) { //SearchField ve SearchValue değerine göre bir nesne bulunursa Select modunda döndürülür. Entity theEntity = SearchEntity(searchField, searchValue.ToString()); if (theEntity == null) { secilenNesne = null; secilenData = null; } else { secilenNesne = new Entity[1]; secilenNesne[0] = theEntity; try { secilenData = Persistence.ReadListTable(EntityType, new string[] { "*" }, null, null, 100); } catch { try { secilenData = Persistence.ReadListTable(EntityType, new string[] { "*" }, null, null, 100); } catch { secilenData = null; } } this.Dispose(true); return secilenNesne; } } frmListForm_Load(this, new System.EventArgs()); //InitSelectList(); if (multiselect) { //InitSelectSearch("", ""); } else { if (returnOnMatch) { } //ListForm_Load(this, new System.EventArgs()); //InitSelectList(); //InitSelectSearch(searchField, searchValue == null ? "" : searchValue.ToString()); } if (AlwaysShowListForm || (gridView1.RowCount > 0)) { closeAction = this.ShowDialog(); this.Dispose(); } return secilenNesne; }
public ActionBase(bool editable, bool multiselect) { this.editable = editable; this.multiselect = multiselect; returnType = SelectionFormReturnType.AsIs; }