Beispiel #1
0
 public static void DeleteSubject(string subjectCode, string subjectSetCode)
 {
     try
     {
         EntityData entity = SubjectDAO.GetSubjectByCode(subjectCode, subjectSetCode);
         SubjectDAO.DeleteSubject(entity);
         entity.Dispose();
         QueryAgent agent = new QueryAgent();
         try
         {
             agent.ExecuteSql(string.Format("delete Subject where SubjectSetCode = '{0}' and SubjectCode like '{1}%'", subjectSetCode, subjectCode));
         }
         finally
         {
             agent.Dispose();
         }
     }
     catch (Exception exception)
     {
         throw exception;
     }
 }