Exemple #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            BaseDeDatos bd = new BaseDeDatos();
            DataTable   dt = bd.GetPaqueteInfo1(Convert.ToInt32(cmbPaquetes.SelectedValue));

            foreach (DataRow dr in dt.Rows)
            {
                dgvData.Rows.Add(dr.ItemArray);
            }
        }
Exemple #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         BaseDeDatos bd = new BaseDeDatos();
         dt = bd.GetPaqueteInfo1(Convert.ToInt32(cmbPaquete.SelectedValue));
         foreach (DataRow dr in dt.Rows)
         {
             dgvData.Rows.Add(dr.ItemArray);
         }
         dgvData.AutoResizeColumns();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }