public void CargarTextBox() { EntityPersona PersonaEntitySeleccionada = (UiForm.Controls["dataGridView1"] as DataGridView).SelectedRows[0].DataBoundItem as EntityPersona; UiForm.Controls["textBoxDni"].Text = PersonaEntitySeleccionada.Dni; UiForm.Controls["textBoxNombre"].Text = PersonaEntitySeleccionada.Nombre; UiForm.Controls["textBoxApellido"].Text = PersonaEntitySeleccionada.Apellido; }
public void Alta() { try { EntityPersona PersonaEntity = new EntityPersona( UiForm.Controls["textBoxDni"].Text, UiForm.Controls["textBoxNombre"].Text, UiForm.Controls["textBoxApellido"].Text); PersonaBll.Alta(PersonaEntity); } catch (Exception) { throw; } }
public void Modificacion() { try { EntityPersona PersonaEntitySeleccionada = (UiForm.Controls["dataGridView1"] as DataGridView).SelectedRows[0].DataBoundItem as EntityPersona; EntityPersona PersonaEntityModificada = new EntityPersona( UiForm.Controls["textBoxDni"].Text, UiForm.Controls["textBoxNombre"].Text, UiForm.Controls["textBoxApellido"].Text); PersonaBll.Modificacion(PersonaEntitySeleccionada, PersonaEntityModificada); } catch (Exception) { throw; } }
public void Baja() { EntityPersona PersonaEntity = (UiForm.Controls["dataGridView1"] as DataGridView).SelectedRows[0].DataBoundItem as EntityPersona; PersonaBll.Baja(PersonaEntity); }