예제 #1
0
 public void Insert(QueQuanDto dto)
 {
     string query = "INSERT INTO QUEQUAN VALUES('" +
                   dto.MaQueQuan + "','" +
                   dto.TenQueQuan + "')";
     _provider.executeQuery(query);
 }
예제 #2
0
 public ArrayList GetDanhSachQueQuan()
 {
     ArrayList arr = new ArrayList();
     QueQuanDto dto;
     OleDbDataReader reader = (OleDbDataReader)dao.GetDanhSachQueQuan();
     while (reader.Read())
     {
         dto = new QueQuanDto();
         dto.MaQueQuan = reader["MaQueQuan"].ToString();
         dto.TenQueQuan = reader["TenQueQuan"].ToString();
         arr.Add(dto);
     }
     reader.Close();
     return arr;
 }
예제 #3
0
 public QueQuanDto GetQueQuan(string mqq)
 {
     QueQuanDto qq;
     OleDbDataReader reader = (OleDbDataReader)dao.GetDanhSachQueQuan();
     while (reader.Read())
     {
         qq = new QueQuanDto();
         qq.MaQueQuan = reader["MaQueQuan"].ToString();
         qq.TenQueQuan = reader["TenQueQuan"].ToString();
         if (qq.MaQueQuan == mqq)
             reader.Close();
         return qq;
     }
     reader.Close();
     return null;
 }