Пример #1
0
 public static Major GetMajorBLLInstance()
 {
     //如实例不存在,则New一个新实例,否则返回已有实例
     if (MajorBLLInstance == null)
     {
         lock (syncRootMajor)
         {
             if (MajorBLLInstance == null)
                 MajorBLLInstance = new Major();
         }
     }
     return MajorBLLInstance;
 }
Пример #2
0
 public static string GetMajorName(int id)
 {
     var bll = new Major();
     return bll.GetModel(id).Name;
 }