Пример #1
0
        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;
        }
Пример #2
0
        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;
            }
        }
Пример #3
0
        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;
            }
        }
Пример #4
0
        public void Baja()
        {
            EntityPersona PersonaEntity = (UiForm.Controls["dataGridView1"] as DataGridView).SelectedRows[0].DataBoundItem as EntityPersona;

            PersonaBll.Baja(PersonaEntity);
        }