private void buttonElipsis_Click(object sender, System.EventArgs e) { mzSearchForm sf = new mzSearchForm(_searchObject); DialogResult dr = sf.ShowDialog(); if (dr == DialogResult.OK) { DataValue = sf.SelectedValue; FillDescription(); } }
private void _CallSearchFormMember(int tipodebusqueda) { switch (tipodebusqueda) { case 0: //si es busqueda normal { mzSearchForm sf = new mzSearchForm(_searchObject, _editObject, _fastSearch, _orderBy, _widthSearchForm, _layoutData); sf.SearchObjectListener = _searchObjectListener; sf.AllowMultipleSelect = _allowMultipleSelect; sf.LayoutData = _layoutData; DialogResult dr = sf.ShowDialog(); if (dr == DialogResult.OK) { if (sf.SelectedItems.Count > 1) { _selectedItems = sf.SelectedItems; if (ValueChanged != null) { ValueChanged(this, new System.EventArgs()); } if (DataValueChanged != null) { DataValueChanged(this, new EventArgs()); } } else { if (sf.SelectedItems.Count == 1) { _selectedItems = sf.SelectedItems; DataValue = sf.SelectedValue; _description = (string)sf.SelecedDescription; _selectedRow = sf.SelectedRow; FillDescription(); } } /* * * if (sf.SelectedItems.Count > 1) * { * _selectedItems = sf.SelectedItems; * } * else * { * FillDescription(); * } * * System.Diagnostics.Debug.WriteLine( mz.erp.businessrules.Sistema.DateTime.Now.ToLongTimeString() ); */ } } break; case 1: { mzHierarchicalSearchForm hsf = new mzHierarchicalSearchForm(_searchObject, _editObject, false, _orderBy); hsf.SearchObjectListener = _searchObjectListener; DialogResult dr = hsf.ShowDialog(); if (dr == DialogResult.OK) { DataValue = hsf.SelectedValue; _description = (string)hsf.SelecedDescription; _selectedRow = hsf.SelectedRow; FillDescription(); } } break; } }