Esempio n. 1
0
 public QuocTichInfo QuocTich_GetItem(int QuocTichID)
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SQLDB.Addparameter("@QuocTichID", QuocTichID);
      SqlDataReader rd = SQLDB.executereader("sp_QuocTich_GetItem", CommandType.StoredProcedure);
     QuocTichInfo item=null;
     while (rd.Read())
     {
         item = new QuocTichInfo();
         item.QuocTichID = int.Parse(rd["QuocTichID"].ToString());
         item.TenQuocTich = rd["TenQuocTich"].ToString();
     }
     return item;
 }
Esempio n. 2
0
 public List<QuocTichInfo> QuocTich_GetItems()
 {
     SQLDataHelper SQLDB = new SQLDataHelper();
     SqlDataReader rd = SQLDB.executereader("sp_QuocTich_GetItems", CommandType.StoredProcedure);
     List<QuocTichInfo> list = new List<QuocTichInfo>();
     QuocTichInfo item = null;
     while (rd.Read())
     {
         item = new QuocTichInfo();
         item.QuocTichID = int.Parse(rd["QuocTichID"].ToString());
         item.TenQuocTich = rd["TenQuocTich"].ToString();
         list.Add(item);
     }
     return list;
 }