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

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

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