Exemple #1
0
        private void button6_Click(object sender, EventArgs e)
        {
            negEdficios negedificios = new negEdficios();
            entEdificio entedificio  = new entEdificio();

            entedificio.idEdificio = Convert.ToInt32(dgvEdificios.CurrentRow.Cells["Clave"].Value.ToString());
            negedificios.EliminaDato(entedificio);
            CargarDGV();
            InhabilitaObjetos();
            LimpiaObjetos();
        }
Exemple #2
0
        private void button5_Click(object sender, EventArgs e)
        {
            negEdficios negedificios = new negEdficios();
            entEdificio entedificio  = new entEdificio();

            entedificio.NombreE      = txtNombre.Text;
            entedificio.Calle        = txtCalle.Text;
            entedificio.Colonia      = txtColonia.Text;
            entedificio.NumE         = txtNum.Text;
            entedificio.Cruzamientos = txtCruzamientos.Text;
            entedificio.CP           = txtCP.Text;
            if (Nuevo)
            {
                negedificios.InsertarDato(entedificio);
            }
            else
            {
                entedificio.idEdificio = Convert.ToInt32(dgvEdificios.CurrentRow.Cells["Clave"].Value.ToString());
                negedificios.ActualizaDato(entedificio);
            }
            CargarDGV();
            InhabilitaObjetos();
            LimpiaObjetos();
        }
Exemple #3
0
        public void CargarDGV()
        {
            negEdficios negedificios = new negEdficios();

            dgvEdificios.DataSource = negedificios.CargarDatos();
        }