Exemplo n.º 1
0
        private void dgvSUBCLASE_CellDoubleClick_1(object sender, DataGridViewCellEventArgs e)
        {
            if (dgvSUBCLASE.CurrentRow == null)
            {
                MessageBox.Show("Debe seleccionar una ciudad");
                return;
            }
            oSUBCLASE = (MODELO.Subclase)dgvSUBCLASE.CurrentRow.DataBoundItem;

            this.DialogResult = DialogResult.OK;
        }
Exemplo n.º 2
0
        private void btnLUPAsubclase_Click(object sender, EventArgs e)
        {
            MATERIALES.Subclase frm = new MATERIALES.Subclase("Buscar");
            DialogResult        dr  = frm.ShowDialog();

            if (dr == DialogResult.OK)
            {
                oSUBCLASE        = frm.SubClaseSelect;
                txtSUBCLASE.Text = oSUBCLASE.NOMBRE;
                //cmbPROVEEDOR.SelectedItem = oPROVEEDOR;
            }
        }
Exemplo n.º 3
0
        public CLASE2(MODELO.Subclase unaClase, string unaaccion)
        {
            InitializeComponent();
            cClase = CONTROLADORA.cSubclase.obtener_instancia();
            oClase = unaClase;
            accion = unaaccion;
            if (accion != "A")
            {
                txtNOMBRE.Text = oClase.NOMBRE;

                if (accion == "C")
                {
                    txtNOMBRE.Enabled = false;
                }
            }
        }
Exemplo n.º 4
0
        private void btnCONSULTAR_Click(object sender, EventArgs e)
        {
            if (dgvSUBCLASE.CurrentRow == null)
            {
                MessageBox.Show("Debe seleccionar una subclase");
                return;
            }
            MODELO.Subclase   oClase = (MODELO.Subclase)dgvSUBCLASE.CurrentRow.DataBoundItem;
            MATERIALES.CLASE2 frm    = new MATERIALES.CLASE2(oClase, "C");
            DialogResult      dr     = frm.ShowDialog();

            if (dr == DialogResult.OK)
            {
                ARMO_GRILLA();
            }
        }
Exemplo n.º 5
0
        private void btnELIMINAR_Click(object sender, EventArgs e)
        {
            if (dgvSUBCLASE.CurrentRow == null)
            {
                MessageBox.Show("Debe seleccionar una subclase");
                return;
            }
            MODELO.Subclase oClase = (MODELO.Subclase)dgvSUBCLASE.CurrentRow.DataBoundItem;
            DialogResult    dr     = MessageBox.Show("¿Confirma que desea eliminar " + oClase.NOMBRE + "?", "CONFIRMA", MessageBoxButtons.YesNo);

            if (dr == DialogResult.Yes)
            {
                cSubclase.eliminarSubClase(oClase);
                ARMO_GRILLA();
            }
        }
Exemplo n.º 6
0
 public void modificarSubClase(MODELO.Subclase oSubClase)
 {
     oMODELO_SEGURIDAD.Entry(oSubClase).State = System.Data.Entity.EntityState.Modified;
     oMODELO_SEGURIDAD.SaveChanges();
 }
Exemplo n.º 7
0
 public void eliminarSubClase(MODELO.Subclase oSubClase)
 {
     oMODELO_SEGURIDAD.SUBCLASES.Remove(oSubClase);
     oMODELO_SEGURIDAD.SaveChanges();
 }
Exemplo n.º 8
0
 public void agregarSubClase(MODELO.Subclase oSubClase)
 {
     oMODELO_SEGURIDAD.SUBCLASES.Add(oSubClase);
     oMODELO_SEGURIDAD.SaveChanges();
 }