Exemplo n.º 1
0
 public void Insert(QueQuanDto dto)
 {
     string query = "INSERT INTO QUEQUAN VALUES('" +
                   dto.MaQueQuan + "','" +
                   dto.TenQueQuan + "')";
     _provider.executeQuery(query);
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }