Example #1
0
        public ActionResult Edit([FromQuery] uint Id)
        {
            Shop_friendly_linksInfo item = Shop_friendly_links.GetItem(Id);

            if (item == null)
            {
                return(APIReturn.记录不存在_或者没有权限);
            }
            ViewBag.item = item;
            return(View());
        }
Example #2
0
        public APIReturn _Edit([FromQuery] uint Id, [FromForm] uint?Shop_id, [FromForm] byte?Sort, [FromForm] string Title, [FromForm] string Url)
        {
            Shop_friendly_linksInfo item = Shop_friendly_links.GetItem(Id);

            if (item == null)
            {
                return(APIReturn.记录不存在_或者没有权限);
            }
            item.Shop_id     = Shop_id;
            item.Create_time = DateTime.Now;
            item.Sort        = Sort;
            item.Title       = Title;
            item.Url         = Url;
            int affrows = Shop_friendly_links.Update(item);

            if (affrows > 0)
            {
                return(APIReturn.成功.SetMessage($"更新成功,影响行数:{affrows}"));
            }
            return(APIReturn.失败);
        }