示例#1
0
 public int AddNewH(HouseCollectModel house)
 {
     house.HouseNumber = 0;
     house.HouseModel  = 1;
     house.HouseImage  = ImgUrl;
     return(bll.AddNewH(house));
 }
        // GET: api/WUsed/5
        //[HttpGet]
        //public HouseCollectModel Get(int id, string Nams = "")
        //{
        //    if (id == -1)
        //    {
        //        return Get().Where(n => n.Id == ids).First();
        //    }
        //    ids = id;
        //    return Get().Where(n => n.Id == id).First();
        //}


        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int AddHouse(HouseCollectModel model)
        {
            model.HouseNumber = 0;
            model.HouseModel  = 2;
            model.HouseImage  = ImgUrl;
            model.HouseModel  = 3;
            //图片水印
            //WaterImageManage image = new WaterImageManage();
            // image.DrawWords($"{ImgUrl}", "安居天下", (float)0.5, ImagePosition.Center, @$"{Imgpath}");

            return(bll.AddHouse(model));
        }
示例#3
0
 //添加房源
 public int AddHouse(HouseCollectModel model)
 {
     return(dal.AddHouse(model));
 }
示例#4
0
        /// <summary>
        /// 添加新房源
        /// </summary>
        /// <param name="house"></param>
        /// <returns></returns>
        public int AddNewH(HouseCollectModel house)
        {
            string sql = $"insert into HouseCollect values('{house.HouseName}','{house.HouseSite}','{house.HouseInfo}',{house.HouseType},{house.HouseGradation},{house.HouseSum},{house.HousePrice},{house.HouseArea},'Hxlimage/{house.HouseImage}','{house.HouseIntro}',{house.HouseModel},{house.HouseTenement},{house.HouseNumber})";

            return(DapperHelper <HouseCollectModel> .Execute(sql, null));
        }
示例#5
0
        /// <summary>
        /// 添加房源
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int AddHouse(HouseCollectModel model)
        {
            string sql = $"insert into HouseCollect values('{model.HouseName}','{model.HouseSite}','{model.HouseInfo}',{model.HouseType},{model.HouseGradation},{model.HouseSum},{model.HousePrice},{model.HouseArea},'Wybimages/{model.HouseImage}','{model.HouseIntro}',{model.HouseModel},'{model.HouseTenement}/m²',{model.HouseNumber})";

            return(DapperHelper <HouseCollectModel> .Execute(sql, null));
        }
示例#6
0
 //添加新房源
 public int AddHouse(HouseCollectModel house)
 {
     return dal.AddHouse(house);
 }
示例#7
0
 /// <summary>
 /// 添加新房源
 /// </summary>
 /// <param name="house"></param>
 /// <returns></returns>
 public int AddNewH(HouseCollectModel house)
 {
     return(dal.AddNewH(house));
 }