Example #1
0
 public void AGREGAR_AUDITORIA(string movimiento, MODELO.Venta oVENTA)
 {
     MODELO.AuditoriaVenta oAuditoria = new MODELO.AuditoriaVenta();
     oAuditoria.FechayHora     = dtpFECHA.Value;
     oAuditoria.Movimiento     = movimiento;
     oAuditoria.Username       = "******";
     oAuditoria.codigo         = oVENTA.codigo;
     oAuditoria.nroFactura     = oVENTA.nroFactura;
     oAuditoria.Cliente        = oVENTA.Cliente;
     oAuditoria.Fecha          = oVENTA.Fecha;
     oAuditoria.Importe        = oVENTA.Importe;
     oAuditoria.IvaTotal       = oVENTA.IvaTotal;
     oAuditoria.DescuentoTotal = oVENTA.DescuentoTotal;
     cAuditoria.AGREGAR_AUDITORIA(oAuditoria);
 }
Example #2
0
        private void btnELIMINAR_Click(object sender, EventArgs e)
        {
            if (dgvVENTAS.CurrentRow == null)
            {
                MessageBox.Show("Debe seleccionar una venta");
                return;
            }
            MODELO.Venta oVENTA = (MODELO.Venta)dgvVENTAS.CurrentRow.DataBoundItem;
            cVENTA.eliminarOrdenVenta(oVENTA);

            MODELO.AuditoriaVenta oAuditoria = new MODELO.AuditoriaVenta();
            oAuditoria.FechayHora     = System.DateTime.Now;
            oAuditoria.Movimiento     = "Baja";
            oAuditoria.Username       = "******";
            oAuditoria.codigo         = oVENTA.codigo;
            oAuditoria.nroFactura     = oVENTA.nroFactura;
            oAuditoria.Cliente        = oVENTA.Cliente;
            oAuditoria.Fecha          = oVENTA.Fecha;
            oAuditoria.Importe        = oVENTA.Importe;
            oAuditoria.IvaTotal       = oVENTA.IvaTotal;
            oAuditoria.DescuentoTotal = oVENTA.DescuentoTotal;
            cAUDITORIA.AGREGAR_AUDITORIA(oAuditoria);
        }
Example #3
0
 public void AGREGAR_AUDITORIA(MODELO.AuditoriaVenta oAUDITORIA)
 {
     oMODELO_SEGURIDAD.AUDITORIAVENTAS.Add(oAUDITORIA);
     oMODELO_SEGURIDAD.SaveChanges();
 }