Пример #1
0
 public void Insert(LoaiQuanHeDto dto)
 {
     string query = "INSERT INTO LOAIQUANHE VALUES('" +
         dto.MaLoaiQuanHe + "','" +
         dto.TenLoaiQuanHe + "')";
     _provider.executeQuery(query);
 }
Пример #2
0
 public ArrayList GetDanhSachLoaiQuanHe()
 {
     ArrayList arr = new ArrayList();
     LoaiQuanHeDto dto;
     OleDbDataReader reader = (OleDbDataReader)dao.GetDanhSachLoaiQuanHe();
     while (reader.Read())
     {
         dto = new LoaiQuanHeDto();
         dto.MaLoaiQuanHe = reader["MaLoaiQuanHe"].ToString();
         dto.TenLoaiQuanHe = reader["TenLoaiQuanHe"].ToString();
         arr.Add(dto);
     }
     reader.Close();
     return arr;
 }
Пример #3
0
 public LoaiQuanHeDto GetLoaiQuanHe(string str)
 {
     LoaiQuanHeDto dto;
     OleDbDataReader reader = (OleDbDataReader)dao.GetDanhSachLoaiQuanHe();
     while (reader.Read())
     {
         dto = new LoaiQuanHeDto();
         dto.MaLoaiQuanHe = reader["MaLoaiQuanHe"].ToString();
         dto.TenLoaiQuanHe = reader["TenLoaiQuanHe"].ToString();
         if (dto.MaLoaiQuanHe == str)
             reader.Close();
         return dto;
     }
     reader.Close();
     return null;
 }