Admin/system/Material/Carousel/Edit.aspx.cs

(完整代码) 960B

using System;
using UAP;

[UAP.Role]
public partial class Material_Carousel_Edit : UAP.Page
{

    public string get(int id)
    {
        return DataBase.getJsonString("select * from ec_carousel where id=" + id, 0);
    }

    public string save(int id, JSON data)
    {
        try
        {
            if (id == 0)
            {
                data.Only("name", "url", "isactive", "sortby", "describe", "title", "buttontxt", "imgname", "img");
                data.Add("createid", UAP.Role.Id);
                DataBase.Insert("ec_carousel", true, data);
            }
            else
            {
                data.Only("name", "url", "isactive", "sortby", "describe", "title", "buttontxt", "imgname", "img");
                DataBase.Update("ec_carousel", "id=" + id, data);
            }
            return "ok";
        }
        catch (Exception ex)
        {
            return ex.Message;
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。