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