示例#1
0
        public void Eliminar(int id)
        {
            try
            {
                SISECOOBEntities db  = new SISECOOBEntities();
                SubProgramasEdu  pro = db.SubProgramasEdu.FirstOrDefault(i => i.SubprogramaID == id);
                db.SubProgramasEdu.DeleteObject(pro);

                db.SaveChanges();
            }
            catch (Exception e)
            {
                throw e;
            }
        }
示例#2
0
        public void Editar()
        {
            try
            {
                SISECOOBEntities db  = new SISECOOBEntities();
                SubProgramasEdu  pro = db.SubProgramasEdu.FirstOrDefault(i => i.SubprogramaID == this.SubprogramaID);
                pro.Subprograma = Subprograma;

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