private void btn_marcar_Click(Object sender, EventArgs e) //Handles btn_marcar.Click, MosResult.DoubleClick { if (MosResult2.SelectedItem != null) { var seleccionado = (PD.SV_PROVEEDOR)MosResult2.SelectedItem.RowObject; _cod_result = seleccionado.COD; _full_data = seleccionado; this.DialogResult = DialogResult.OK; } }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj.GetType() == typeof(string)) { return(this.COD == (string)obj); } if (this.GetType() != obj.GetType()) { return(false); } SV_PROVEEDOR p = (SV_PROVEEDOR)obj; return(this.COD == p.COD); }