예제 #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;
            }
        }