コード例 #1
0
        public IActionResult Rental_Insert(Property_manage p)
        {
            int h = _bll.Rental_Insert(p);

            return(Ok(new { data = h, sate = h > 0 ? true : false, msg = h > 0 ? "添加成功" : "添加失败" }));
        }
コード例 #2
0
        /// <summary>
        /// 出租房添加
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        public int Rental_Insert(Property_manage p)
        {
            string sql = $"insert into Property_manage values ('3','{p.tb_districtId}','{p.CommunityId}','{p.OpeningTimes}','{p.Title}','{p.Developers}','{p.Propertyfirm}','{p.Propertyyear}','{p.Label}','{p.Region}','{p.Floorage}','{p.Mittelkurs}','{p.Discounts}','{p.Loupanyh}',{p.States},'{p.Unit}','{p.Sums}','{p.Decoration}',getdate(),'{p.Stick}','{p.FMonthlyRent}',{(p.StateChu ? 1 : 0)})";

            return(_helper.ExecuteNonQuery(sql));
        }
コード例 #3
0
        public IActionResult Update(Property_manage p)
        {
            int h = _bll.Update(p);

            return(Ok(new { data = h, sate = h > 0 ? true : false, msg = h > 0 ? "编辑成功" : "编辑失败" }));
        }
コード例 #4
0
        /// <summary>
        /// 修改房
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        public int Update(Property_manage p)
        {
            string sql = $"update Property_manage set tb_districtId={p.tb_districtId},CommunityId={p.CommunityId},OpeningTimes='{p.OpeningTimes}',Title='{p.Title}',Developers='{p.Developers}',Propertyfirm='{p.Propertyfirm}',Propertyyear='{p.Propertyyear}',Label = '{p.Label}',Region = '{p.Region}',Floorage = '{p.Floorage}',Mittelkurs = '{p.Mittelkurs}',Discounts = '{p.Discounts}',Loupanyh = '{p.Loupanyh}',States = {(p.States?1:0)},Unit = '{p.Unit}',Sums = {p.Sums},Decoration = '{p.Decoration}',Updatetime = '{p.Updatetime}',Stick = '{p.Stick}',FMonthlyRent = '{p.FMonthlyRent}',StateChu = {(p.StateChu?1:0)} where Nid = {p.Nid}";

            return(_helper.ExecuteNonQuery(sql));
        }