Exemple #1
0
        public void Actualizar(ESTADOASIENTO P)
        {
            try
            {
                new DatEstado_Asiento().Actualizar(P);
            }
            catch (Exception ex)
            {

                throw ex;
            }

        }
Exemple #2
0
        public int Insertar(ESTADOASIENTO P)
        {
            try
            {
                return new DatEstado_Asiento().Insertar(P);
            }
            catch (Exception ex)
            {

                throw ex;
            }

        }
Exemple #3
0
        public int Insertar(ESTADOASIENTO P)
        {
            try
            {
                ContextoDB ct = new ContextoDB();
                ct.ESTADOASIENTO.Add(P);
                ct.SaveChanges();
                return P.CEstadoAsiento;
            }
            catch (Exception ex)
            {

                throw ex;
            }

        }
Exemple #4
0
        public void Actualizar(ESTADOASIENTO P)
        {
            try
            {
                ContextoDB ct = new ContextoDB();
                ESTADOASIENTO ESTADOASIENTO = ct.ESTADOASIENTO.Where(x => x.CEstadoAsiento == P.CEstadoAsiento).SingleOrDefault();

                if (ESTADOASIENTO != null)
                {
                    ct.Entry(ESTADOASIENTO).CurrentValues.SetValues(P);
                    ct.SaveChanges();
                }
            }
            catch (Exception ex)
            {

                throw ex;
            }

        }