Example #1
0
        public void Actualizar(DETALLE_VENTA P)
        {
            try
            {
                new DatDetalle_Venta().Actualizar(P);
            }
            catch (Exception e)
            {

                throw e;
            }
        }
Example #2
0
        public void Insertar(DETALLE_VENTA P)
        {

            try
            {
                new DatDetalle_Venta().Insertar(P);
            }
            catch (Exception e)
            {

                throw e;
            }
        }
Example #3
0
        public void Insertar(DETALLE_VENTA P)
        {
            try
            {
                ContextoDB ct = new ContextoDB();
                ct.DETALLE_VENTA.Add(P);
                ct.SaveChanges();
            }
            catch (Exception e)
            {
                
                throw e; 
            }

        }
Example #4
0
        public void Actualizar(DETALLE_VENTA P)
        {
            try
            {
                ContextoDB ct = new ContextoDB();
                DETALLE_VENTA DETALLE_VENTA = (from x in ct.DETALLE_VENTA
                                               where x.CASiento == P.CASiento && x.CVenta == P.CVenta
                                               select x).FirstOrDefault();

                if (DETALLE_VENTA != null)
                {
                    ct.Entry(DETALLE_VENTA).CurrentValues.SetValues(P);
                    ct.SaveChanges();
                }
            }
            catch (Exception e)
            {
                
                throw e;
            }

        }