示例#1
0
        /// <summary>
        /// 通过ID获取角色信息
        /// </summary>
        public string GetWQRCodeManagerInfoByIdData()
        {
            var service = new WQRCodeManagerBLL(CurrentUserInfo);
            WQRCodeManagerEntity data = null;
            string content            = string.Empty;

            string key = string.Empty;

            if (Request("wQRCodeManager_id") != null && Request("wQRCodeManager_id") != string.Empty)
            {
                key = Request("wQRCodeManager_id").ToString().Trim();
            }

            WQRCodeManagerEntity queryEntity = new WQRCodeManagerEntity();

            queryEntity.QRCodeId = Guid.Parse(key);
            var list = service.GetList(queryEntity, 0, 1);

            if (list != null && list.Count > 0)
            {
                data = list[0];
            }

            var jsonData = new JsonData();

            jsonData.totalCount = "1";
            jsonData.data       = data;

            content = jsonData.ToJSON();
            return(content);
        }
示例#2
0
        /// <summary>
        /// 查询角色列表
        /// </summary>
        public string QueryWQRCodeManagerListData()
        {
            var form = Request("form").DeserializeJSONTo <WQRCodeManagerQueryEntity>();

            var appSysService = new WQRCodeManagerBLL(CurrentUserInfo);
            IList <WQRCodeManagerEntity> list = new List <WQRCodeManagerEntity>();

            string content = string.Empty;
            string key     = string.Empty;

            int pageIndex = Utils.GetIntVal(FormatParamValue(Request("page"))) - 1;
            WQRCodeManagerEntity queryEntity = new WQRCodeManagerEntity();

            queryEntity.QRCode = form.QRCode;
            if (form.QRCodeTypeId != null && form.QRCodeTypeId.Length > 0)
            {
                queryEntity.QRCodeTypeId = Guid.Parse(form.QRCodeTypeId);
            }
            list = appSysService.GetList(queryEntity, pageIndex, PageSize);

            var jsonData = new JsonData();

            jsonData.totalCount = appSysService.GetListCount(queryEntity).ToString();
            jsonData.data       = list;

            content = string.Format("{{\"totalCount\":{1},\"topics\":{0}}}",
                                    list.ToJSON(),
                                    jsonData.totalCount);
            return(content);
        }