/// <summary>
        /// 获取身份认证的分页集合
        /// </summary>
        public PagingDataSet <Identification> GetIdentifications(IdentificationQuery query, int pageIndex, int pageSize)
        {
            Sql sql = Sql.Builder.Select("*").From("spb_Identifications");

            if (query.UserId > 0)
            {
                sql.Where("UserId = @0", query.UserId);
            }
            if (query.IdentificationTypeId > 0)
            {
                sql.Where("IdentificationTypeId = @0", query.IdentificationTypeId);
            }
            if (query.startTime.HasValue)
            {
                sql.Where("DateCreated >= @0", query.startTime.Value);
            }
            if (query.endTime.HasValue)
            {
                sql.Where("DateCreated < @0", query.endTime.Value.AddDays(1));
            }
            if (query.identificationStatus.HasValue)
            {
                sql.Where("Status=@0", query.identificationStatus.Value);
            }
            sql.OrderBy("DateCreated desc");
            return(GetPagingEntities(pageSize, pageIndex, sql));
        }
Exemple #2
0
        public ActionResult ManageIdentifications(IdentificationQuery query, string userId, int pageSize = 20, int pageIndex = 1)
        {
            //标识类型下拉列表
            IEnumerable <IdentificationType> identificationTypes = identificationService.GetIdentificationTypes(null);
            SelectList identificationTypeSelectList = new SelectList(identificationTypes.Select(n => new { text = n.Name, value = n.IdentificationTypeId }), "value", "text");

            ViewData["typeSelectList"] = identificationTypeSelectList;

            //获得所有的认证标识
            Dictionary <long, string> identificationTypesDic = identificationTypes.ToDictionary(n => n.IdentificationTypeId, n => n.Name);

            ViewData["identificationTypesDic"] = identificationTypesDic;

            //处理userid为query.UserId赋值
            if (!string.IsNullOrEmpty(userId))
            {
                if (!string.IsNullOrEmpty(userId.Trim(',')))
                {
                    query.UserId = long.Parse(userId.Trim(','));
                }
            }

            //用户选择器默认值
            ViewData["userId"] = query.UserId;

            PagingDataSet <Identification> identifications = identificationService.GetIdentifications(query, pageIndex, pageSize);

            return(View(identifications));
        }
 /// <summary>
 ///分页检索身份认证
 /// </summary>
 ///<param name="query">查询条件</param>
 /// <param name="pageIndex">当前页码</param>
 /// <param name="pageSize">每页记录数</param>
 /// <returns></returns>
 public PagingDataSet <Identification> GetIdentifications(IdentificationQuery query, int pageIndex, int pageSize)
 {
     return(iIdentificationRepository.GetIdentifications(query, pageIndex, pageSize));
 }
        public ActionResult ManageIdentifications(IdentificationQuery query, string userId, int pageSize = 20, int pageIndex = 1)
        {
            //标识类型下拉列表
            IEnumerable<IdentificationType> identificationTypes = identificationService.GetIdentificationTypes(null);
            SelectList identificationTypeSelectList = new SelectList(identificationTypes.Select(n => new { text = n.Name, value = n.IdentificationTypeId }), "value", "text");
            ViewData["typeSelectList"] = identificationTypeSelectList;

            //获得所有的认证标识
            Dictionary<long, string> identificationTypesDic = identificationTypes.ToDictionary(n => n.IdentificationTypeId, n => n.Name);
            ViewData["identificationTypesDic"] = identificationTypesDic;

            //处理userid为query.UserId赋值
            if (!string.IsNullOrEmpty(userId))
            {
                if (!string.IsNullOrEmpty(userId.Trim(',')))
                {
                    query.UserId = long.Parse(userId.Trim(','));
                }
            }

            //用户选择器默认值
            ViewData["userId"] = query.UserId;

            PagingDataSet<Identification> identifications = identificationService.GetIdentifications(query, pageIndex, pageSize);
            return View(identifications);
        }
 /// <summary>
 ///分页检索身份认证
 /// </summary>
 ///<param name="query">查询条件</param>
 /// <param name="pageIndex">当前页码</param>
 /// <param name="pageSize">每页记录数</param>
 /// <returns></returns>
 public PagingDataSet<Identification> GetIdentifications(IdentificationQuery query, int pageIndex, int pageSize)
 {
     return iIdentificationRepository.GetIdentifications(query, pageIndex, pageSize);
 }