Ejemplo n.º 1
0
        /// <summary>
        /// 点选终端分页查询控件
        /// </summary>
        /// <param name="pContext"></param>
        /// <returns></returns>
        private PageResultEntity GetPageData(HttpContext pContext)
        {
            VipBLLByNew b                = new VipBLLByNew(CurrentUserInfo, GetTableName(pContext));
            string      pSearch          = pContext.Request["pSearch"];
            List <DefindControlEntity> l = new List <DefindControlEntity>();

            if (!string.IsNullOrEmpty(pSearch))
            {
                l = pSearch.DeserializeJSONTo <List <DefindControlEntity> >();
            }

            int?pPageIndex = null;
            int?pPageSize  = null;

            if (!string.IsNullOrEmpty(pContext.Request["pPageIndex"]))
            {
                pPageIndex = Convert.ToInt32(pContext.Request["pPageIndex"]);
            }
            if (!string.IsNullOrEmpty(pContext.Request["pPageSize"]))
            {
                pPageSize = Convert.ToInt32(pContext.Request["pPageSize"]);
            }
            //string pKeyValue = pContext.Request["pKeyValue"];
            //string pUserArray = pContext.Request["pUserArray"];
            string correlationValue = pContext.Request["CorrelationValue"];

            if (string.IsNullOrEmpty(correlationValue.Split('&')[0]) || string.IsNullOrEmpty(correlationValue.Split('&')[1]))
            {
                correlationValue = "";
            }
            return(b.GetPageData(l, pPageSize, pPageIndex, correlationValue));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="pContext"></param>
        /// <returns></returns>
        private List <DefindControlEntity> GetEditData(HttpContext pContext)
        {
            VipBLLByNew b         = new VipBLLByNew(CurrentUserInfo, GetTableName(pContext));
            string      pKeyValue = pContext.Request["pKeyValue"];

            return(b.GetEditData(pKeyValue));
            // return null;
        }
Ejemplo n.º 3
0
        public DataTable GetStoreData(HttpContext pContext)
        {
            VipBLLByNew b                = new VipBLLByNew(CurrentUserInfo, GetTableName(pContext));
            string      pSearch          = pContext.Request["pSearch"];
            List <DefindControlEntity> l = new List <DefindControlEntity>();

            if (!string.IsNullOrEmpty(pSearch))
            {
                l = pSearch.DeserializeJSONTo <List <DefindControlEntity> >();
            }
            return(b.GetStoreData(l));
        }
Ejemplo n.º 4
0
        private string GetRepeatRowCount(HttpContext pContext)
        {
            VipBLLByNew b                = new VipBLLByNew(CurrentUserInfo, GetTableName(pContext));
            string      pKeyValue        = pContext.Request["pKeyValue"];
            string      pSearch          = pContext.Request["pSearch"];
            List <DefindControlEntity> l = new List <DefindControlEntity>();

            if (!string.IsNullOrEmpty(pSearch))
            {
                l = pSearch.DeserializeJSONTo <List <DefindControlEntity> >();
            }
            return(b.GetRepeatRowCount(l, pKeyValue));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 删除终端
        /// </summary>
        /// <param name="pContext"></param>
        /// <returns></returns>
        private string Delete(HttpContext pContext)
        {
            VipBLLByNew b         = new VipBLLByNew(CurrentUserInfo, GetTableName(pContext));
            string      pKeyValue = pContext.Request["pKeyValue"];
            bool        res       = b.Delete(pKeyValue);

            if (res == true)
            {
                return("{success:true}");
            }
            else
            {
                return("{success:false}");
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 添加终端
        /// </summary>
        /// <param name="pContext"></param>
        /// <returns></returns>
        private string Create(HttpContext pContext)
        {
            VipBLLByNew b                = new VipBLLByNew(CurrentUserInfo, GetTableName(pContext));
            string      pEditValue       = pContext.Request["pEditValue"];
            List <DefindControlEntity> l = new List <DefindControlEntity>();

            if (!string.IsNullOrEmpty(pEditValue))
            {
                l = pEditValue.DeserializeJSONTo <List <DefindControlEntity> >();
            }
            bool res = b.Create(l);

            if (res == true)
            {
                return("{success:true,msg:''}");
            }
            else
            {
                return("{success:false}");
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 获取表头定义
        /// </summary>
        /// <param name="pContext"></param>
        /// <returns></returns>
        private List <GridColumnEntity> GetGridColumns(HttpContext pContext)
        {
            VipBLLByNew b = new VipBLLByNew(CurrentUserInfo, GetTableName(pContext));

            return(b.GetGridColumns());
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 获取终端列表数据定义模型
        /// </summary>
        /// <param name="pContext"></param>
        /// <returns></returns>
        private List <GridColumnModelEntity> GetGridDataModels(HttpContext pContext)
        {
            VipBLLByNew b = new VipBLLByNew(CurrentUserInfo, "VIP");

            return(b.GetGridDataModels());
        }