/// <summary>
    /// 增加数据
    /// </summary>
    /// <returns></returns>
    public string frmAdd()
    {
        TRptMarkVo objMark = autoBindRequest(Request, new TRptMarkVo());

        objMark.ID = GetSerialNumber("Mark_Id");
        bool isSuccess = new TRptMarkLogic().Create(objMark);

        if (isSuccess)
        {
            WriteLog("添加标签", "", LogInfo.UserInfo.USER_NAME + "添加标签" + objMark.ID);
        }
        return(isSuccess == true ? "1" : "0");
    }
    /// <summary>
    /// 修改数据
    /// </summary>
    /// <returns></returns>
    public string frmUpdate()
    {
        TRptMarkVo objMark = autoBindRequest(Request, new TRptMarkVo());

        objMark.ID = Request["id"].ToString();
        bool isSuccess = new TRptMarkLogic().Edit(objMark);

        if (isSuccess)
        {
            WriteLog("编辑标签", "", LogInfo.UserInfo.USER_NAME + "编辑标签" + objMark.ID);
        }
        return(isSuccess == true ? "1" : "0");
    }
Esempio n. 3
0
    /// <summary>
    /// 获取标签信息
    /// </summary>
    protected void getMarkInfo()
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int        intPageSize = Convert.ToInt32(Request.Params["pagesize"]);
        TRptMarkVo objMark     = new TRptMarkVo();

        objMark.SORT_FIELD = !string.IsNullOrEmpty(strSortname) ? strSortname : TRptMarkVo.ID_FIELD;
        objMark.SORT_TYPE  = SortDirection.Descending.ToString();

        int       intCount = new TRptMarkLogic().GetSelectResultCount(objMark);
        DataTable dt       = new TRptMarkLogic().SelectByTable(objMark, intPageIndex, intPageSize);

        Response.Write(CreateToJson(dt, intCount));
        Response.End();
    }
    /// <summary>
    /// 加载数据
    /// </summary>
    /// <returns></returns>
    public string frmLoadData()
    {
        TRptMarkVo objMark = new TRptMarkLogic().Details(Request["id"].ToString());

        return(ToJson(objMark));
    }