tags:

views:

210

answers:

0

hi every one i have 2 table btdbn and benhandt and i created 2 classes Btdbn and Benhandt

CREATE TABLE medibv.btdbn
(
  mabn varchar(8) NOT NULL,
  hoten text,
  ngaysinh timestamp,
  namsinh varchar(4),
  phai numeric(1) DEFAULT 0,
  mann varchar(2),
  madantoc varchar(2),
  sonha varchar(15),
  thon text,
  cholam text,
  matt varchar(3),
  maqu varchar(5),
  maphuongxa varchar(7),
  userid numeric(5) DEFAULT 0,
  ngayud timestamp DEFAULT now(),
  hotenkdau text,
  nam text,
  image bytea,
  barcode bytea,
  CONSTRAINT pk_btdbn PRIMARY KEY (mabn) USING INDEX TABLESPACE medi_index,
  CONSTRAINT fk_btdbn_btddt FOREIGN KEY (madantoc)
      REFERENCES medibv.btddt (madantoc) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE SET NULL,
  CONSTRAINT fk_btdbn_btdnn_bv FOREIGN KEY (mann)
      REFERENCES medibv.btdnn_bv (mann) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE SET NULL,
  CONSTRAINT fk_btdbn_btdpxa FOREIGN KEY (maphuongxa)
      REFERENCES medibv.btdpxa (maphuongxa) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE SET NULL,
  CONSTRAINT fk_btdbn_btdquan FOREIGN KEY (maqu)
      REFERENCES medibv.btdquan (maqu) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE SET NULL,
  CONSTRAINT fk_btdbn_btdtt FOREIGN KEY (matt)
      REFERENCES medibv.btdtt (matt) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE SET NULL
) 
WITH OIDS;
ALTER TABLE medibv.btdbn OWNER TO medisoft;

and

-- Table: medibv.benhandt

-- DROP TABLE medibv.benhandt;

CREATE TABLE medibv.benhandt
(
  mabn varchar(8),
  mavaovien numeric(18) DEFAULT 0,
  maql numeric(18) NOT NULL DEFAULT 0,
  makp varchar(2),
  ngay timestamp,
  dentu numeric(1) DEFAULT 0,
  nhantu numeric(1) DEFAULT 0,
  lanthu numeric(3) DEFAULT 0,
  madoituong numeric(2) DEFAULT 0,
  chandoan text,
  maicd varchar(9),
  mabs varchar(4),
  sovaovien varchar(10),
  loaiba numeric(3) DEFAULT 0,
  userid numeric(5) DEFAULT 0,
  ngayud timestamp DEFAULT now(),
  cschandoan text,
  CONSTRAINT pk_benahndt PRIMARY KEY (maql),
  CONSTRAINT fk_benhandt_btdkp_bv FOREIGN KEY (makp)
      REFERENCES medibv.btdkp_bv (makp) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE SET NULL,
  CONSTRAINT fk_benhandt_doituong FOREIGN KEY (madoituong)
      REFERENCES medibv.doituong (madoituong) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE SET NULL
) 
WITH OIDS;
ALTER TABLE medibv.benhandt OWNER TO medisoft;

i've create an hql show bellow:

IList l = session.CreateQuery("select bn.Mabn , bn.Hoten, bn.Ngaysinh, ba.Mavaovien from 
Btdbn bn, Benhandt ba where bn.Mabn=ba.Mabn")

i want to change the List to DataTable but i don't want to create a class to contain the result How can i do? help me!