public ActionResult ChiTiet(int id) { DuLieuDAO dlDAO = new DuLieuDAO(); DuLieuDTO duLieu = dlDAO.getDuLieu(id); return(View(duLieu)); }
private DuLieuDTO createDuLieuFromRow(DataRow row) { DuLieuDTO dl = new DuLieuDTO(); try { dl.MaDuLieu = Convert.ToInt32(row[_fileds[0]]); dl.DichVu = _dvDAO.getDichVuInDulieu(Convert.ToInt32(row[_fileds[1]])); dl.TenDiaDiem = _tddDAO.getTenDiaDiemInDulieu(Convert.ToInt32(row[_fileds[2]])); dl.SoNha = row[_fileds[3]] == null ? "" : row[_fileds[3]].ToString(); dl.Duong = _dDAO.getDuongInDulieu(Convert.ToInt32(row[_fileds[4]])); dl.Phuong = _pDAO.getPhuongInDulieu(Convert.ToInt32(row[_fileds[5]])); dl.QuanHuyen = _qhDAO.getQuanHuyenInDulieu(Convert.ToInt32(row[_fileds[6]])); dl.TinhThanh = _ttDAO.getTinhThanhInDulieu(Convert.ToInt32(row[_fileds[7]])); dl.KinhDo = Convert.ToDouble(row[_fileds[8]]); dl.ViDo = Convert.ToDouble(row[_fileds[9]]); dl.ChuThich = row[_fileds[10]] == null ? "" : row[_fileds[10]].ToString(); } catch (Exception) { } return(dl); }
private DuLieuDTO createDuLieuFromRow(DataRow row) { DuLieuDTO dl = new DuLieuDTO(); try { dl.MaDuLieu = Convert.ToInt32(row[_fileds[0]]); dl.DichVu = _dvDAO.getDichVuInDulieu(Convert.ToInt32(row[_fileds[1]])); dl.TenDiaDiem = _tddDAO.getTenDiaDiemInDulieu(Convert.ToInt32(row[_fileds[2]])); dl.SoNha = row[_fileds[3]] == null ? "" : row[_fileds[3]].ToString(); dl.Duong = _dDAO.getDuongInDulieu(Convert.ToInt32(row[_fileds[4]])); dl.Phuong = _pDAO.getPhuongInDulieu(Convert.ToInt32(row[_fileds[5]])); dl.QuanHuyen = _qhDAO.getQuanHuyenInDulieu(Convert.ToInt32(row[_fileds[6]])); dl.TinhThanh = _ttDAO.getTinhThanhInDulieu(Convert.ToInt32(row[_fileds[7]])); dl.KinhDo = Convert.ToDouble(row[_fileds[8]]); dl.ViDo = Convert.ToDouble(row[_fileds[9]]); dl.ChuThich = row[_fileds[10]] == null ? "" : row[_fileds[10]].ToString(); } catch (Exception) { } return dl; }