Exemplo n.º 1
0
 public CommitteeCharter GetCommitteeCharterByID(int committeeId)
 {
     try
     {
         CommitteeCharter committeeCharter = db.CommitteeCharter.Find(committeeId);
         return(committeeCharter);
     }
     catch
     {
         throw;
     }
 }
Exemplo n.º 2
0
 public int EditCommittee(CommitteeCharter committeeCharter)
 {
     try
     {
         db.Entry(committeeCharter).State = EntityState.Modified;
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
Exemplo n.º 3
0
 public int AddCommittee(CommitteeCharter committeeCharter)
 {
     try
     {
         db.CommitteeCharter.Add(committeeCharter);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
Exemplo n.º 4
0
 public int DeleteCommittee(int committeeId)
 {
     try
     {
         CommitteeCharter committeeCharter = db.CommitteeCharter.Find(committeeId);
         db.CommitteeCharter.Remove(committeeCharter);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }