public IList <HouseInfoBase> GetWBHouseInfoByZL(string zl) { zl = zl.Replace(" ", "").Replace("号楼", "#"); string sql = string.Format(@"select WB_HOUSEINFO.ROOMNO as FJH,WB_HOUSEINFO.BUAREA as JZMJ,wb_buildinginfo.buildingname as JZWMC,WB_HOUSEINFO.HOUSEID as TSTYBM,wb_saleiteminfo.itemname as XMMC, wb_saleiteminfo.itemname||wb_buildinginfo.buildingname||'#'||WB_HOUSEINFO.Unitno||'-'||WB_HOUSEINFO.Houseno as ZL from WB_HOUSEINFO left join wb_buildinginfo on WB_HOUSEINFO.BUILDINGID=wb_buildinginfo.buildinginfo_id left join wb_saleiteminfo on wb_saleiteminfo.saleitemid=wb_buildinginfo.saleitemid Where wb_saleiteminfo.itemname||wb_buildinginfo.buildingname||'#'||WB_HOUSEINFO.Unitno||'-'||WB_HOUSEINFO.Houseno Like '%{0}%' ", zl); DataTable dt = DBHelper.GetDataTable(sql); IList <HouseInfoBase> houseinfos = new List <HouseInfoBase>(); if (dt != null) { for (int i = 0; i < dt.Rows.Count; i++) { HouseInfoBase info = new HouseInfoBase(); info.FJH = dt.Rows[i]["FJH"].ToString(); info.JZMJ = dt.Rows[i]["JZMJ"].ToString(); info.JZWMC = dt.Rows[i]["JZWMC"].ToString(); info.TSTYBM = dt.Rows[i]["TSTYBM"].ToString(); info.XMMC = dt.Rows[i]["XMMC"].ToString(); info.ZL = dt.Rows[i]["ZL"].ToString(); houseinfos.Add(info); } } return(houseinfos); }
public IList <HouseInfoBase> GetHouseInfoByIds(string where) { string sql = string.Format("Select FC_H_QSDC.TSTYBM,LSZTYBM,ZL,FJH,JZMJ,XMMC,JZWMC,Oracle_WB_HouseId from FC_H_QSDC left join FC_Z_QSDC on FC_H_QSDC.LSZTYBM=FC_Z_QSDC.TSTYBM Where FC_H_QSDC.TSTYBM in ({0})", where); DataTable dt = DBHelper.GetDataTable(sql); IList <HouseInfoBase> houseinfos = new List <HouseInfoBase>(); if (dt != null) { for (int i = 0; i < dt.Rows.Count; i++) { HouseInfoBase info = new HouseInfoBase(); info.FJH = dt.Rows[i]["FJH"].ToString(); info.JZMJ = dt.Rows[i]["JZMJ"].ToString(); info.JZWMC = dt.Rows[i]["JZWMC"].ToString(); info.TSTYBM = dt.Rows[i]["TSTYBM"].ToString(); info.XMMC = dt.Rows[i]["XMMC"].ToString(); info.ZL = dt.Rows[i]["ZL"].ToString(); info.LSZTYBM = dt.Rows[i]["LSZTYBM"].ToString(); info.Oracle_WB_HouseId = dt.Rows[i]["Oracle_WB_HouseId"].ToString(); houseinfos.Add(info); } } return(houseinfos); }