示例#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;
 }