private void buttonComparar_Click(object sender, RoutedEventArgs e)
        {
            List <producto_sw.Software> listaRanking = new List <Software>();

            if (dataGridSoftwaresRegistrados.Items.Count == 0)
            {
                MessageBox.Show("Tabla vacia");
                // await this.ShowMessageAsync(DiccionarioDatos.ADVERTENCIA, DiccionarioDatos.TABLA_VACIA);
            }

            if (dataGridSoftwaresRegistrados.Items.Count > 0)
            {
                DataTable dtColumnas = new DataTable();

                dtColumnas.Columns.Add("Nombre", typeof(string));
                dtColumnas.Columns.Add("Version", typeof(string));
                dtColumnas.Columns.Add("Costo Total", typeof(string));
                dtColumnas.Columns.Add("Costo Normalizado", typeof(string));
                dtColumnas.Columns.Add("Valor linguistico Costo", typeof(string));
                dtColumnas.Columns.Add("Valor Calidad Producto", typeof(string));
                dtColumnas.Columns.Add("Valor linguistico Calidad Producto", typeof(string));
                dtColumnas.Columns.Add("Puntaje Final", typeof(string));

                dataGridCostoCalidad.ItemsSource = dtColumnas.DefaultView;


                foreach (System.Data.DataRowView dr in dataGridSoftwaresRegistrados.ItemsSource)
                {
                    if (dr[0].Equals(true) == true)
                    {
                        if (!String.IsNullOrEmpty(textPresupuesto.Text))
                        {
                            double presupuesto = Double.Parse(textPresupuesto.Text);
                            double costo_total = Double.Parse(dr[4].ToString());
                            if (presupuesto < costo_total)
                            {
                                MessageBox.Show("El presupuesto debe ser mayor al costo total");
                            }
                            else
                            {
                                double valorNormalizado = costo_total / presupuesto;
                                //MessageBox.Show(Double.Parse(dr[5].ToString()) + "");

                                CostoCalidad costo_calidad = new CostoCalidad(Double.Parse(dr[5].ToString()), valorNormalizado);
                                double       puntajeFinal  = costo_calidad.obtenerCostoCalidad();

                                Software unSoftware = new Software();
                                unSoftware.Nombre_producto     = dr[2].ToString();
                                unSoftware.Version             = dr[3].ToString();
                                unSoftware.C_total             = dr[4].ToString();
                                unSoftware.Costo_normalizado   = valorNormalizado;
                                unSoftware.Nivel_calidad_costo = Etiquetas.obtenerEtiquetaLenguisticaCosto(valorNormalizado);

                                unSoftware.Valor_nivel_calidad = dr[5].ToString(); // del producto
                                unSoftware.Nivel_calidad       = dr[6].ToString(); // del producto
                                unSoftware.Puntaje_final       = Math.Round((puntajeFinal * 100), 3);

                                listaRanking.Add(unSoftware);
                                // MessageBox.Show(puntajeFinal + "");
                                // insertar en bd y luego consultar
                            }
                        }
                        else
                        {
                            MessageBox.Show("Debe Colocar un presupuesto antes");
                        }
                    }
                }

                // x.puntaje_final.CompareTo(y.puntaje_final);

                listaRanking.Sort((x, y) => y.Puntaje_final.CompareTo(x.Puntaje_final));//string.Compare(x.Puntaje_final, y.Puntaje_final));

                for (int i = 0; i < listaRanking.Count; i++)
                {
                    Software unSoftware = listaRanking.ElementAt(i);

                    dtColumnas.Rows.Add(new object[] { unSoftware.Nombre_producto, unSoftware.Version, unSoftware.C_total, unSoftware.Costo_normalizado, unSoftware.Nivel_calidad_costo, unSoftware.Valor_nivel_calidad, unSoftware.Nivel_calidad, unSoftware.Puntaje_final });
                }
                tabControl.SelectedIndex = 1;
            }
        }