private void bnt_Nuevo_Click(object sender, EventArgs e) { frm_ModificarAerolineas Pantalla = new frm_ModificarAerolineas(); objDal_Aerolinea = new cls_Aerolineas_DAL(); objDal_Aerolinea.cBandera = 'I'; Pantalla.objDAL_Aerolinea = objDal_Aerolinea; Hide(); Pantalla.ShowDialog(); Show(); txtFiltro.Text = string.Empty; CargarDatos(); }
private void dgv_Aerolineas_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { objDal_Aerolinea = new cls_Aerolineas_DAL(); objDal_Aerolinea.cBandera = 'U'; objDal_Aerolinea.iIdAerolinea = Convert.ToInt32(dgv_Aerolineas.SelectedRows[0].Cells[0].Value.ToString().Trim()); objDal_Aerolinea.sNombreAerolinea = dgv_Aerolineas.SelectedRows[0].Cells[1].Value.ToString().Trim(); objDal_Aerolinea.cIdEstado = Convert.ToChar(dgv_Aerolineas.SelectedRows[0].Cells[2].Value.ToString().Trim()); frm_ModificarAerolineas Pantalla = new frm_ModificarAerolineas(); Hide(); Pantalla.objDAL_Aerolinea = objDal_Aerolinea; Pantalla.ShowDialog(); Show(); txtFiltro.Text = string.Empty; CargarDatos(); }
private void btn_Modificar_Click(object sender, EventArgs e) { if (dgv_Aerolineas.RowCount == 0) { MessageBox.Show("No existen datos para modificar", "Informacion", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { objDal_Aerolinea = new cls_Aerolineas_DAL(); objDal_Aerolinea.cBandera = 'U'; objDal_Aerolinea.iIdAerolinea = Convert.ToInt32(dgv_Aerolineas.SelectedRows[0].Cells[0].Value.ToString().Trim()); objDal_Aerolinea.sNombreAerolinea = dgv_Aerolineas.SelectedRows[0].Cells[1].Value.ToString().Trim(); objDal_Aerolinea.cIdEstado = Convert.ToChar(dgv_Aerolineas.SelectedRows[0].Cells[2].Value.ToString().Trim()); frm_ModificarAerolineas Pantalla = new frm_ModificarAerolineas(); Pantalla.objDAL_Aerolinea = objDal_Aerolinea; Hide(); Pantalla.ShowDialog(); Show(); txtFiltro.Text = string.Empty; CargarDatos(); } }