private void CmdAgregar_Click(object sender, EventArgs e) { FrmEdCafeteria frm = new FrmEdCafeteria(); frm.LlenarCombox(); frm.ShowDialog(); }
private void DgvCafeteria_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { DataGridViewRow row = DgvCafeteria.SelectedRows[0]; Cafeteria cafeteria = new Cafeteria { ID = int.Parse(row.Cells[0].Value.ToString()), Descripcion = row.Cells[1].Value.ToString(), ID_Campus = int.Parse(row.Cells[2].Value.ToString()), Encargado = int.Parse(row.Cells[4].Value.ToString()), Estado = (bool)row.Cells[6].Value }; var estado = row.Cells[6].Value; FrmEdCafeteria fed = new FrmEdCafeteria { cafeteria = cafeteria }; fed.LlenarCombox(); fed.ShowDialog(); }