public ProductItemViewModel GetIndexListProductItemsNonStock(
            IOwinContext owinContext, ExtendedIdentityDbContext db,
            ContractListCondition condition, ProductItemStatus?productItemStatus)
        {
            //Debug: 先不管那么多,只返回最简单的
            if (owinContext == null)
            {
                throw new ArgumentNullException("owinContext");
            }
            if (db == null)
            {
                throw new ArgumentNullException("db");
            }

            if (condition == null || condition.IsEnable == false)
            {
                var defCondition = ContractListCondition.GetDefault();
                defCondition.OrderField = ContractOrderField.CONTRACT_KEY_ASC;
                defCondition.UserName   = owinContext.Authentication.User.Identity.Name;
                return(this.GetIndexListProductItemsNonStock(db, owinContext,
                                                             defCondition, productItemStatus));
            }

            return(this.GetIndexListProductItemsNonStock(db, owinContext,
                                                         condition, productItemStatus));

            //return new ProductItemViewModel() { IsEnable = false };
        }
        public ContractViewModel GetIndexListContracts(IOwinContext context,
                                                       ExtendedIdentityDbContext db, ContractListCondition filter)
        {
            //Debug: 先不管那么多,只返回最简单的
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (db == null)
            {
                throw new ArgumentNullException("db");
            }

            if (filter == null || filter.IsEnable == false)
            {
                var defCondition = ContractListCondition.GetDefault();
                defCondition.UserName = context.Authentication.User.Identity.Name;
                filter = defCondition;
            }
            return(this.GetIndexListContracts(db, context, filter));

            //return new ContractViewModel() { IsEnable = false };
        }