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