/// <summary> /// 通过Id查询单条信息,详情显示 /// </summary> /// <param name="id"></param> /// <returns></returns> public List <HouseCollectModel> GetSecondHouseById(int id) { DapperHelper <HouseCollectModel> .Execute("update houseCollect set HouseNumber = HouseNumber+1 where Id=" + id, null); return(DapperHelper <HouseCollectModel> .Query("select * from HouseCollect hc join HouseType ht on hc.HouseType = ht.TId where hc.Id = " + id, null)); }
/// <summary> /// 二手房信息 /// </summary> /// <returns></returns> public List <HouseCollectModel> GetSecondHouse() { return(DapperHelper <HouseCollectModel> .Query("select * from HouseCollect where HouseModel = 2", null)); }
/// <summary> /// 二手房信息 /// </summary> /// <returns></returns> public List <HouseCollectModel> GetSecondHouse() { return(DapperHelper <HouseCollectModel> .Query("select * from HouseCollect hc join HouseType ht on hc.HouseType = ht.TId where HouseModel = 2", null)); }
//获取商家信息 public List <CommodityModel> CommodityShow() { string str = "select *from Commodity"; return(DapperHelper <CommodityModel> .Query(str, null)); }
////自己创建个类写 这样分开好做 别写我这里面了!!!!!!!!!!!! /// <summary> /// 显示租房列表 /// </summary> /// <returns></returns> public IEnumerable <HouseCollectModel> GetUsedHouse() { string sql = "select * from HouseCollect"; return(DapperHelper <HouseCollectModel> .Query(sql, null)); }
/// <summary> /// 获取经纪人信息 /// </summary> /// <returns></returns> public IEnumerable <PrincipalModel> GetPrincipalById(int id) { string sql = $"select * from Principal p join Commodity c on c.Id =p.CommodityId where p.Id={id}"; return(DapperHelper <PrincipalModel> .Query(sql, null)); }
/// <summary> /// 获取商家信息 /// </summary> /// <returns></returns> public IEnumerable <CommodityModel> GetCommodities() { return(DapperHelper <CommodityModel> .Query("select * from Commodity", null)); }
public IEnumerable <HouseCollectModel> GetHouseCollect() { string sql = $"select * from HouseCollect where HouseType=7 and HouseModel=1"; return(DapperHelper <HouseCollectModel> .Query(sql, null)); }
public IEnumerable <PrincipalModel> GetPrincipal() { string sql = "SELECT Principal.Id,PrincipalName,PrincipalPhone,CommodityName,Enter,CommodityId,PrImage,Email,QQ,WeChat,CommodityPhone,CommoditySite,CommodityState,CommodityArgot FROM Principal INNER JOIN Commodity ON Principal.CommodityId = Commodity.Id"; return(DapperHelper <PrincipalModel> .Query(sql, null)); }
/// <summary> /// 获取房屋状态 /// </summary> /// <returns></returns> public IEnumerable <RoomTypeModel> roomTypes() { string sql = "select * from HouseModel"; return(DapperHelper <RoomTypeModel> .Query(sql, null)); }
/// <summary> /// 根据id显示房子具体信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public IEnumerable <HouseCollectModel> houses(int id) { string sql = $"select * from HouseCollect join HouseType on HouseCollect.HouseType=HouseType.Tid where HouseCollect.Id={id}"; return(DapperHelper <HouseCollectModel> .Query(sql, null)); }
/// <summary> /// 查询新房 /// </summary> /// <param name="HouseModel"></param> /// <param name="HouseType"></param> /// <returns></returns> public IEnumerable <HouseCollectModel> collectModels(string name) { string sql = $"select * from HouseCollect where HouseName like '%{name}%'"; return(DapperHelper <HouseCollectModel> .Query(sql, null)); }
/// <summary> /// 显示新房源 /// </summary> /// <returns></returns> public IEnumerable <HouseCollectModel> houseCollects() { string sql = " select * from HouseCollect where HouseModel =1"; return(DapperHelper <HouseCollectModel> .Query(sql, null)); }
/// <summary> /// 获取经纪人信息 /// </summary> /// <returns></returns> public List <PrincipalModel> GetPrincipals() { string sql = "select * from GetPrincipals"; return(DapperHelper <PrincipalModel> .Query(sql, null)); }
/// <summary> /// 显示房屋类型 /// </summary> /// <returns></returns> public IEnumerable <HouseTypeModel> GetHT() { string sql = "select * from HouseType"; return(DapperHelper <HouseTypeModel> .Query(sql, null)); }
//获取客户信息 public IEnumerable <ClientInfoModel> GetClientInfo() { string str = "select *from ClientInfo"; return(DapperHelper <ClientInfoModel> .Query(str, null)); }