/// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="keyvalue"></param>
        /// <returns></returns>
        public ActionResult getCPEntity(string keyvalue)
        {
            var cpBll   = new CustomParameterBLL();
            var fileBll = new FileInfoBLL();
            var data    = cpBll.getEntity(keyvalue);

            data.Files = fileBll.GetFilesByRecIdNew(keyvalue).ToList();
            return(Content(data.ToJson()));
        }
        /// <summary>
        /// 用户列表
        /// </summary>
        /// <param name="pagination">分页参数</param>
        /// <param name="queryJson">查询参数</param>
        /// <returns>返回分页列表Json</returns>
        public ActionResult GetCPPageListJson(Pagination pagination, string queryJson)
        {
            var watch = CommonHelper.TimerStart();
            //var queryParam = queryJson.ToJObject();
            var cpBll    = new CustomParameterBLL();
            var user     = OperatorProvider.Provider.Current();
            var data     = cpBll.GetPageList(pagination, queryJson, user.UserId);
            var JsonData = new
            {
                rows     = data,
                total    = pagination.total,
                page     = pagination.page,
                records  = pagination.records,
                costtime = CommonHelper.TimerEnd(watch)
            };

            return(Content(JsonData.ToJson()));
        }
 public ActionResult delEntity(string keyvalue)
 {
     try
     {
         var ctBll  = new CustomTemplateBLL();
         var cpBll  = new CustomParameterBLL();
         var entity = cpBll.getListbyCTId(keyvalue);
         if (entity.Count() > 0)
         {
             return(Error("已存在台账数据,无法删除。"));
         }
         ctBll.deleteEntity(keyvalue);
         return(Success("操作成功。"));
     }
     catch (Exception ex)
     {
         return(Error(ex.Message));
     }
 }