Пример #1
0
        public void deleteFrontend(int id)
        {
            frontend registro = ctx.frontend.Single(r => r.id == id);

            ctx.frontend.Remove(registro);
            ctx.SaveChanges();
        }
Пример #2
0
        public void EdiFront(frontendPro front)
        {
            frontend registro = ctx.frontend.Single(r => r.id == front.id);

            registro.id          = front.id;
            registro.descripcion = front.descripcion;
            registro.porcentaje  = front.porcentaje;
            ctx.SaveChanges();
        }
Пример #3
0
        public void agregarFrontEnd(frontendPro front)
        {
            frontend registro = new frontend();

            registro.descripcion = front.descripcion;
            registro.id          = front.id;
            registro.porcentaje  = front.porcentaje;
            ctx.frontend.Add(registro);
            ctx.SaveChanges();
        }
Пример #4
0
        public frontend GetFront(int id)
        {
            frontend registro = ctx.frontend.Single(r => r.id == id);

            return(registro);
        }