예제 #1
0
 /// <summary>
 /// 根据ID查询一条记录
 /// </summary>
 public M_IServer SeachById(int ID)
 {
     using (SqlDataReader reader = Sql.SelReturnReader(strTableName, PK, ID))
     {
         if (reader.Read())
         {
             return(initMod.GetModelFromReader(reader));
         }
         else
         {
             return(null);
         }
     }
 }
예제 #2
0
 public M_IServer SelReturnModel(int id)
 {
     using (DbDataReader reader = DBCenter.SelReturnReader(strTableName, PK, id))
     {
         if (reader.Read())
         {
             return(initMod.GetModelFromReader(reader));
         }
         else
         {
             return(null);
         }
     }
 }