Example #1
0
 public void Actualizar(ASIENTO_EVENTO P)
 {
     try
     {
         new DatAsiento_Evento().Actualizar(P);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Example #2
0
 public void Insertar(ASIENTO_EVENTO P)
 {
     try
     {
         new DatAsiento_Evento().Insertar(P);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Example #3
0
 public void Insertar(ASIENTO_EVENTO P)
 {
     try
     {
         ContextoDB ct = new ContextoDB();
         ct.ASIENTO_EVENTO.Add(P);
         ct.SaveChanges();
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Example #4
0
        public ASIENTO_EVENTO GetById(int CAsiento, int CEvento)
        {
            try
            {
                ContextoDB     ct             = new ContextoDB();
                ASIENTO_EVENTO ASIENTO_EVENTO = (from x in ct.ASIENTO_EVENTO
                                                 where x.CASiento == CAsiento && x.CEvento == CEvento
                                                 select x).FirstOrDefault();

                return(ASIENTO_EVENTO);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Example #5
0
 public void Eliminar(int CAsiento, int CEvento)
 {
     try
     {
         ContextoDB     ct             = new ContextoDB();
         ASIENTO_EVENTO ASIENTO_EVENTO = (from x in ct.ASIENTO_EVENTO
                                          where x.CASiento == CAsiento && x.CEvento == CEvento
                                          select x).FirstOrDefault();
         if (ASIENTO_EVENTO != null)
         {
             ct.ASIENTO_EVENTO.Remove(ASIENTO_EVENTO);
             ct.SaveChanges();
         }
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Example #6
0
        public void Actualizar(ASIENTO_EVENTO P)
        {
            try
            {
                ContextoDB     ct             = new ContextoDB();
                ASIENTO_EVENTO ASIENTO_EVENTO = (from x in ct.ASIENTO_EVENTO
                                                 where x.CASiento == P.CASiento && x.CEvento == P.CEvento
                                                 select x).FirstOrDefault();

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