private bool VerificarDuplicados() { if (IsReadyToSaveFirst()) { string grupoWhere = "Insumo_grupo_descripcion = '" + DataUtil.GetString(cbGrupo.SelectedItem) + "'"; DataSet dsSearch = DataUtil.FillDataSet(DataBaseQuerys.PresentacionInsumo(string.Empty, DataUtil.FindSingleRow("Insumo_grupo", "Insumo_grupo_id", grupoWhere), txtDescripcion.Text.Trim().Replace("'", "''")), "Presentacion_Insumo"); if (dsSearch.Tables[0].Rows.Count > 0) { MessageBox.Show("La presentacion '" + txtDescripcion.Text.Trim() + "' ya existe.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } return(true); } else { return(false); } }