Пример #1
0
        public void Eliminar(int id)
        {
            try
            {
                SISECOOBEntities db  = new SISECOOBEntities();
                SubProgramasPGOs pro = db.SubProgramasPGOs.FirstOrDefault(i => i.SubprogramaPGOID == id);
                db.SubProgramasPGOs.DeleteObject(pro);

                db.SaveChanges();
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Пример #2
0
        public void Editar()
        {
            try
            {
                SISECOOBEntities db  = new SISECOOBEntities();
                SubProgramasPGOs pro = db.SubProgramasPGOs.FirstOrDefault(i => i.SubprogramaPGOID == this.SubprogramaPGOID);
                pro.SubprogramaPGO = SubprogramaPGO;

                db.SaveChanges();
            }
            catch (Exception e)
            {
                throw e;
            }
        }