Example #1
0
        public void Actualizar(TIPO_ASIENTO P)
        {
            try
            {
                 new DatTipo_Asiento().Actualizar(P);
            }
            catch (Exception ex)
            {

                throw ex;
            }

        }
Example #2
0
        public int Insertar(TIPO_ASIENTO P)
        {
            try
            {
                return new DatTipo_Asiento().Insertar(P);
            }
            catch (Exception ex)
            {

                throw ex;
            }

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

                throw ex;
            }

        }
Example #4
0
        public void Actualizar(TIPO_ASIENTO P)
        {
            try
            {
                ContextoDB ct = new ContextoDB();
                TIPO_ASIENTO TIPO_ASIENTO = ct.TIPO_ASIENTO.Where(x => x.CTipoAsiento == P.CTipoAsiento).SingleOrDefault();

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

                throw ex;
            }

        }