Exemplo n.º 1
0
        /// <summary>
        ///     取得列表数据
        /// </summary>
        protected override void GetListData(LambdaItem <TData> lambda)
        {
            var audit = GetIntArg("audit", -1);

            if (audit != 0x100 && audit >= 0)
            {
                if (audit <= (int)AuditStateType.End)
                {
                    lambda.AddRoot(p => p.AuditState == (AuditStateType)audit);
                }
                else
                {
                    switch (audit)
                    {
                    case 0x10:    //废弃
                    case 0xFF:    //删除
                        SetArg("dataState", audit);
                        break;

                    case 0x13:    //停用
                        SetArg("dataState", (int)DataStateType.Disable);
                        break;

                    case 0x11:    //未审核
                        lambda.AddRoot(p => p.AuditState <= AuditStateType.Again);
                        break;

                    case 0x12:    //未结束
                        lambda.AddRoot(p => p.AuditState < AuditStateType.End);
                        break;
                    }
                }
            }
            base.GetListData(lambda);
        }
Exemplo n.º 2
0
        /// <summary>
        ///     取得列表数据
        /// </summary>
        protected override ApiPageData <TData> GetListData(LambdaItem <TData> lambda)
        {
            if (!RequestArgumentConvert.TryGet("_audit_", out int audit) || audit == 0x100 || audit < 0)
            {
                return(base.GetListData(lambda));
            }

            if (audit <= (int)AuditStateType.End)
            {
                lambda.AddRoot(p => p.AuditState == (AuditStateType)audit);
                return(base.GetListData(lambda));
            }

            switch (audit)
            {
            case 0x10:     //废弃
            case 0xFF:     //删除
                RequestArgumentConvert.SetArgument("_state_", audit);
                break;

            case 0x13:     //停用
                RequestArgumentConvert.SetArgument("_state_", (int)DataStateType.Disable);
                break;

            case 0x11:     //未审核
                lambda.AddRoot(p => p.AuditState <= AuditStateType.Again);
                break;

            case 0x12:     //未结束
                lambda.AddRoot(p => p.AuditState < AuditStateType.End);
                break;
            }
            return(base.GetListData(lambda));
        }
Exemplo n.º 3
0
        /// <summary>
        ///     取得列表数据
        /// </summary>
        protected override void GetListData(LambdaItem <TData> lambda)
        {
            var state = GetIntArg("dataState", 0x100);

            if (state >= 0)
            {
                if (state < 0x100)
                {
                    lambda.AddRoot(p => p.DataState == (DataStateType)state);
                }
                else
                {
                    lambda.AddRoot(p => p.DataState < DataStateType.Delete);
                }
            }
            DoGetListData(lambda);
        }
 /// <summary>
 ///     取得列表数据
 /// </summary>
 protected override ApiPageData <TData> GetListData(LambdaItem <TData> lambda)
 {
     if (!RequestArgumentConvert.TryGet("_state_", out int state) || state < 0 || state >= 0x100)
     {
         return(base.GetListData(lambda));
     }
     //BUG:using (ManageModeScope.CreateScope())
     {
         lambda.AddRoot(p => p.DataState == (DataStateType)state);
         return(base.GetListData(lambda));
     }
 }
Exemplo n.º 5
0
        /// <summary>
        ///     取得列表数据
        /// </summary>
        protected override ApiPageData <TData> GetListData(LambdaItem <TData> lambda)
        {
            var audit = GetIntArg("audit", -1);

            if (audit == 0x100 || audit < 0)
            {
                return(base.GetListData(lambda));
            }
            if (audit <= (int)AuditStateType.End)
            {
                lambda.AddRoot(p => p.AuditState == (AuditStateType)audit);
                return(base.GetListData(lambda));
            }

            switch (audit)
            {
            case 0x10:     //废弃
            case 0xFF:     //删除
                SetArg("dataState", audit);
                break;

            case 0x13:     //停用
                SetArg("dataState", (int)DataStateType.Disable);
                break;

            case 0x11:     //未审核
                lambda.AddRoot(p => p.AuditState <= AuditStateType.Again);
                break;

            case 0x12:     //未结束
                lambda.AddRoot(p => p.AuditState < AuditStateType.End);
                break;
            }

            return(base.GetListData(lambda));
        }