Ejemplo n.º 1
0
        public void Actualizar(TIPOEMPLEADO P)
        {
            try
            {
                new DatTIPOEMPLEADO().Actualizar(P);
            }
            catch (Exception ex)
            {

                throw ex;
            }

        }
Ejemplo n.º 2
0
        public int Insertar(TIPOEMPLEADO P)
        {
            try
            {
                return new DatTIPOEMPLEADO().Insertar(P);
            }
            catch (Exception ex)
            {

                throw ex;
            }

        }
Ejemplo n.º 3
0
        public int Insertar(TIPOEMPLEADO P)
        {
            try
            {
                ContextoDB ct = new ContextoDB();
                ct.TIPOEMPLEADO.Add(P);
                ct.SaveChanges();
                return P.CTipoEmpleado;
            }
            catch (Exception ex)
            {

                throw ex;
            }

        }
Ejemplo n.º 4
0
        public void Actualizar(TIPOEMPLEADO P)
        {
            try
            {
                ContextoDB ct = new ContextoDB();
                TIPOEMPLEADO TIPOEMPLEADO = ct.TIPOEMPLEADO.Where(x => x.CTipoEmpleado == P.CTipoEmpleado).SingleOrDefault();

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

                throw ex;
            }

        }