Пример #1
0
        private void dgv_Pais_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.ColumnIndex == 2)
                {
                    Pais obj = new Pais();
                    obj.Id_Pais = Convert.ToInt32(dgv_Pais.Rows[e.RowIndex].Cells[0].Value.ToString());
                    obj.Nombre  = dgv_Pais.Rows[e.RowIndex].Cells[1].Value.ToString();

                    frm_PaisEdit ofrm = new frm_PaisEdit(obj, this);
                    ofrm.Show();
                }
            }
            catch (Exception)
            {
            }
        }
Пример #2
0
        private void btn_NuevoPais_Click(object sender, EventArgs e)
        {
            frm_PaisEdit ofrm = new frm_PaisEdit(this);

            ofrm.ShowDialog();
        }