示例#1
0
 public List<Term> GetTermList()
 {
     List<Term> terms = new List<Term>();
     using (JszxDataManager jszxDataManager = new JszxDataManager())
     {
         List<terms_tb> termtbs = jszxDataManager.GetTerms();
         foreach(var tmtb in termtbs){
             Term tm = new Term();
             tm.TermID = tmtb.TermID;
             tm.TermIndex = tmtb.TermIndex;
             tm.TermIsUse = tmtb.TermIsUse;
             tm.TermStartDay = tmtb.TermStartDay;
             tm.TermWeeks = tmtb.TermWeeks;
             tm.TermYear = tmtb.TermYear;
             terms.Add(tm);
         }
     }
     return terms;
 }
示例#2
0
 /// <summary>
 /// 获取指定学期
 /// </summary>
 /// <returns>指定学期</returns>
 public Term GetPurposeTerm(int id)
 {
     using (JszxDataManager jszxDateManage = new JszxDataManager())
     {
         terms_tb tmtb = jszxDateManage.GetCurrentTerm(id);
         Term tm = new Term();
         if (tmtb != null)
         {
             tm.TermID = tmtb.TermID;
             tm.TermIndex = tmtb.TermIndex;
             tm.TermIsUse = tmtb.TermIsUse;
             tm.TermStartDay = tmtb.TermStartDay;
             tm.TermWeeks = tmtb.TermWeeks;
             tm.TermYear = tmtb.TermYear;
         }
         return tm;
     }
 }