コード例 #1
0
        //
        // GET: /VideoCategory/
        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <param name="type">0���·��� 1�����</param>
        /// <returns></returns>
        public ActionResult Index(int? id,int? categoryID,int? pageNo,EnumOrder? type,bool? isGroup)
        {
            if (pageNo != null || type != null)
                ViewData["IsAnchor"] = "True";
            type = type ?? EnumOrder.���ʱ��;
            pageNo=pageNo??0;
            int totalCount = 0;
            categoryID = categoryID ?? id.Value;
            VideoCategory[] categories = bizVideoCategory.List();
            SearchVideoCondition searchObj = new SearchVideoCondition() { CategoryID=categoryID.Value, OrderType=(int)type, IsGroup=isGroup };
            ViewListVideo[] videos = bizVideo.List(pageNo.Value, pageSize, out totalCount, searchObj, (int)EnumPublishState.����);
            ViewData["RecommendVideoes"] = bizVideoList.List( EnumVideoListType.�Ƽ���Ƶ,categoryID.Value,6);
            //ViewData["RefPictureGroup"] = new ReferencePictureControl() { ReferencePictures = bizPictureGroup.ListReferenceGroupsByTags(categories.FirstOrDefault(x => x.CategoryID == categoryID.Value).Tag.Split(new char[]{' '}), 10, true), MoreLink="/picture" };
            ViewData["RefPictureGroup"] = bizPictureGroup.ListReferenceGroupsByTags(categories.FirstOrDefault(x => x.CategoryID == categoryID.Value).Tag.Split(new char[] { ' ' }), 10, true);
            ViewData["RefNews"] = bizNews.ListReferenceNewsByTags(categories.FirstOrDefault(x => x.CategoryID == categoryID.Value).Tag, 20, true);

            ViewData["PaginateHelper"] = PaginateHelper.ConstructPaginate(totalCount, pageNo ?? 0, pageSize, "/VideoCategory/Index/", searchObj);
            ViewData["Categories"] = categories;
            ViewData["Click"] = type == EnumOrder.������� ? "id='current'" : "";
            ViewData["Time"] = type == EnumOrder.���ʱ�� ? "id='current'" : "";
            ViewData["CategoryID"] = categoryID;
            ViewData["Type"] = (int)type;
            ViewData["Videos"] = videos;
            ViewData["isGroup"] = isGroup;
            ViewData["VideoRotatorControl"] = new VideoRotatorControl() { Videos = bizVideoList.List( EnumVideoListType.���ཹ����Ƶ,categoryID.Value, 5) };
            ViewData["HeadControl"] = new HeadControl() { SystemCategory = EnumSystemCategory.��Ƶ, SystemCategoryID = categoryID.Value };
            return View();
        }

        #endregion Methods
    }
コード例 #2
0
 /// <inheritdoc />
 public int CompareTo(Intensity other)
 {
     if (ReferenceEquals(this, other))
     {
         return(0);
     }
     if (ReferenceEquals(null, other))
     {
         return(1);
     }
     return(EnumOrder.CompareTo(other.EnumOrder));
 }
コード例 #3
0
        public static IEnumerable Paging(this IQueryable source, string orderField, EnumOrder order, int pageIndex, int pageSize, out int total)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            if (orderField == null)
            {
                throw new ArgumentNullException("orderField");
            }
            LambdaExpression keySelector = DynamicExpression.ParseLambda(source.ElementType, null, orderField, new object[0]);

            return(source.Paging(keySelector, order, pageIndex, pageSize, out total));
        }
コード例 #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="id"></param>
 /// <param name="type">0���·��� 1�����</param>
 /// <returns></returns>
 public ActionResult Index( int? pageNo, EnumOrder? type, bool? isGroup)
 {
     type = type ?? EnumOrder.���ʱ��;
     pageNo = pageNo ?? 0;
     int totalCount = 0;
     SearchVideoCondition searchObj = new SearchVideoCondition() { OrderType = (int)type, IsGroup = isGroup, DefineType=(int)EnumDefineType.�ҵ��Ƽ� };
     ViewListVideo[] videos = bizVideo.List(pageNo.Value, pageSize, out totalCount, searchObj, (int)EnumPublishState.����);
     ViewData["PaginateHelper"] = PaginateHelper.ConstructPaginate(totalCount, pageNo ?? 0, pageSize, "/VideoRecommandMore/Index/", searchObj);
     ViewData["Categories"] = bizVideoCategory.List();
     ViewData["Click"] = type == EnumOrder.������� ? "id='current'" : "";
     ViewData["Time"] = type == EnumOrder.���ʱ�� ? "id='current'" : "";
     ViewData["Type"] = (int)type;
     ViewData["Videos"] = videos;
     ViewData["isGroup"] = isGroup;
     ViewData["RefPictureGroup"] = new ReferencePictureControl() { ReferencePictures = bizPictureGroup.ListRecommendPictureGroup(8), ModelName = "�Ƽ�ͼƬ", MoreLink = "/PictureRecommandMore" };
     ViewData["RecommendNews"] = bizNews.ListTop20RecommendNews();
     ViewData["HeadControl"] = new HeadControl() { SystemCategory = EnumSystemCategory.��Ƶ };
     return View();
 }
コード例 #5
0
        //
        // GET: /PictureRecommandMore/
        public ActionResult Index(int? pageNo, EnumOrder? type)
        {
            type = type ?? EnumOrder.���ʱ��;
            pageNo = pageNo ?? 0;
            int totalCount = 0;
            PictureGroup[] groups= bizPictureGroup.ListRecommendPictureGroup(pageNo.Value, pageSize, out totalCount, type.Value);
            ViewData["PaginateHelper"] = PaginateHelper.ConstructPaginate(totalCount, pageNo ?? 0, pageSize, "/PictureRecommandMore/Index/", new SearchByOrderType() { OrderType=(int)type.Value });
            ViewData["PictureGroup"] = groups;
            ViewData["Time"] = type == EnumOrder.���ʱ�� ? "id='current'" : "";
            ViewData["Click"] = type == EnumOrder.������� ? "id='current'" : "";
            //�����ص���Ƶ
            ViewData["RefVideoControl"] = new ReferenceVideoControl() { ReferenceVideos = bizVideo.ListMyCommendVideoes(10, EnumOrder.�������), VideoListStyle = EnumVideoListStyle.horizontal, MoreLink = "/VideoRecommandMore" };
            //�������
            ViewData["RecommendNews"] = bizNews.ListTop20RecommendNews();
            //ͼƬ�Ƽ�
            ViewData["HeadControl"] = new HeadControl() { SystemCategory = EnumSystemCategory.ͼƬ };

            return View();
        }

        #endregion Methods
    }
コード例 #6
0
        public PagedResult <T> List <T>(Expression <Func <T, Object> > predicateSort, EnumOrder typeOrder, int page, int limit) where T : BaseEntity
        {
            IQueryable <T> result = _dbContext.Set <T>();

            result = GetOrderResult(result, predicateSort, typeOrder.ToString());

            IQueryable <T> pagedResult = null;
            int            totalPages  = 0;

            GetPagedResult(result, page, limit, out pagedResult, out totalPages);

            return(new PagedResult <T> {
                Result = pagedResult, TotalPages = totalPages
            });
        }
コード例 #7
0
        public static IEnumerable Paging(this IQueryable source, string orderField, EnumOrder order, int pageIndex, int pageSize)
        {
            int num = 0;

            return(source.Paging(orderField, order, pageIndex, pageSize, out num));
        }
コード例 #8
0
        public static List <TSource> Paging <TSource, TKey>(this IQueryable <TSource> source, Expression <Func <TSource, TKey> > keySelector, EnumOrder order, int pageIndex, int pageSize)
        {
            int num = 0;

            return(source.Paging(keySelector, order, pageIndex, pageSize, out num));
        }
コード例 #9
0
 public static IEnumerable Paging(this IQueryable source, Expression keySelector, EnumOrder order, int pageIndex, int pageSize, out int total)
 {
     total = source.Count();
     return(source.Paging(keySelector, order, pageIndex, pageSize));
 }
コード例 #10
0
        public static IEnumerable <Mod> OrderBy(this ObservableCollection <Mod> List, EnumOrder order)
        {
            switch (order)
            {
            case EnumOrder.Name:
                return(List.OrderBy(q => q.DisplayName));

            case EnumOrder.Type:
                return(List.OrderBy(q => q.Source));

            default:
                return(List.OrderBy(q => q.Order));
            }
        }
コード例 #11
0
ファイル: JDFAutoAssembly.cs プロジェクト: cip4/JDFLibNet
 static JDFAutoAssembly()
 {
     atrInfoTable[0]  = new AtrInfoTable(AttributeName.JOGSIDE, 0x33333111, AttributeInfo.EnumAttributeType.enumeration, EnumJogSide.getEnum(0), "Top");
     atrInfoTable[1]  = new AtrInfoTable(AttributeName.ORDER, 0x33333311, AttributeInfo.EnumAttributeType.enumeration, EnumOrder.getEnum(0), "Gathering");
     atrInfoTable[2]  = new AtrInfoTable(AttributeName.BINDINGSIDE, 0x33333311, AttributeInfo.EnumAttributeType.enumeration, EnumBindingSide.getEnum(0), "Left");
     atrInfoTable[3]  = new AtrInfoTable(AttributeName.ASSEMBLYID, 0x44444311, AttributeInfo.EnumAttributeType.string_, null, null);
     atrInfoTable[4]  = new AtrInfoTable(AttributeName.ASSEMBLYIDS, 0x33333111, AttributeInfo.EnumAttributeType.NMTOKENS, null, null);
     atrInfoTable[5]  = new AtrInfoTable(AttributeName.JOBID, 0x33333311, AttributeInfo.EnumAttributeType.shortString, null, null);
     atrInfoTable[6]  = new AtrInfoTable(AttributeName.PHYSICALSECTION, 0x33333111, AttributeInfo.EnumAttributeType.IntegerList, null, null);
     elemInfoTable[0] = new ElemInfoTable(ElementName.ASSEMBLYSECTION, 0x33333311);
     elemInfoTable[1] = new ElemInfoTable(ElementName.PAGELIST, 0x66666111);
     elemInfoTable[2] = new ElemInfoTable(ElementName.PAGEASSIGNEDLIST, 0x33333111);
 }
コード例 #12
0
        public static IEnumerable Paging(this IQueryable source, Expression keySelector, EnumOrder order, int pageIndex, int pageSize)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            if (keySelector == null)
            {
                throw new ArgumentNullException("keySelector");
            }
            MethodInfo methodInfo = DynamicQueryable.miCreateQuery.MakeGenericMethod(new Type[]
            {
                source.ElementType
            });
            MethodInfo method = typeof(DynamicQueryable).GetMethod("Paging", new Type[]
            {
                typeof(IQueryable),
                typeof(Expression),
                typeof(EnumOrder),
                typeof(int),
                typeof(int)
            });
            IQueryable source2 = (IQueryable)methodInfo.Invoke(source.Provider, new object[]
            {
                Expression.Call(null, method, new Expression[]
                {
                    source.Expression,
                    Expression.Quote(keySelector),
                    Expression.Constant(order),
                    Expression.Constant(pageIndex),
                    Expression.Constant(pageSize)
                })
            });

            return(source2.ToEnumerable());
        }
コード例 #13
0
ファイル: JDFAutoAssembly.cs プロジェクト: cip4/JDFLibNet
 //         ---------------------------------------------------------------------
 //        Methods for Attribute Order
 //        ---------------------------------------------------------------------
 ///
 ///          <summary> * (5) set attribute Order </summary>
 ///          * <param name="enumVar">: the enumVar to set the attribute to </param>
 ///
 public virtual void setOrder(EnumOrder enumVar)
 {
     setAttribute(AttributeName.ORDER, enumVar == null ? null : enumVar.getName(), null);
 }
コード例 #14
0
ファイル: APParser.cs プロジェクト: venkatbaggu/SmartMonitor
        //DB 数据结果类似
        public static int RelatingMsg(APParser SendMsg, APParser ReceiveMsg)
        {
            EnumOrder order                = SendMsg.GetOrder();
            string    ap_uid_send          = null;
            string    terminal_uid_send    = null;
            string    ap_uid_receive       = null;
            string    terminal_uid_receive = null;

            if (order == EnumOrder.READER_SERACH_DOWN || order == EnumOrder.READER_CONFIG_DOWN || order == EnumOrder.READER_DELETE_DOWN)
            {
                if (SendMsg.GetOrder() != ReceiveMsg.GetOrder())
                {
                    return(-1);
                }

                SendMsg.GetParam_Terminal_Search(ref ap_uid_send, ref terminal_uid_send);
                ReceiveMsg.GetParam_Terminal_Search(ref ap_uid_receive, ref terminal_uid_receive);
                if (ap_uid_send.Equals(ap_uid_receive) && terminal_uid_send.Equals(terminal_uid_receive))
                {
                    return(1);
                }
                else
                {
                    return(-1);
                }
            }//终端搜索,配置,删除配置
            else if (order == EnumOrder.READER_ORDER_DOWN)
            {
                SendMsg.GetParam_AP_UID(ref ap_uid_send);
                ReceiveMsg.GetParam_AP_UID(ref ap_uid_receive);

                if (SendMsg.GetOrder() == ReceiveMsg.GetOrder())
                {
                    if (ap_uid_send.Equals(ap_uid_receive))
                    {
                        return(0);
                    }
                }//终端命令响应
                else if (ReceiveMsg.GetOrder() == EnumOrder.READER_DATA_UP)
                {
                    if (ap_uid_send.Equals(ap_uid_receive))
                    {
                        if ((SendMsg.GetTerminalOrder() == 0x84 && ReceiveMsg.GetTerminalOrder() == 0x85) ||
                            (SendMsg.GetTerminalOrder() == 0x86 && ReceiveMsg.GetTerminalOrder() == 0x87) ||
                            (SendMsg.GetTerminalOrder() == 0x89 && ReceiveMsg.GetTerminalOrder() == 0x8A) ||
                            (SendMsg.GetTerminalOrder() == 0x8B && ReceiveMsg.GetTerminalOrder() == 0x8C) ||
                            (SendMsg.GetTerminalOrder() == 0x8D && ReceiveMsg.GetTerminalOrder() == 0x8E) ||
                            (SendMsg.GetTerminalOrder() == 0x8F && ReceiveMsg.GetTerminalOrder() == 0x90) ||
                            (SendMsg.GetTerminalOrder() == 0x91 && ReceiveMsg.GetTerminalOrder() == 0x92) ||
                            (SendMsg.GetTerminalOrder() == 0x93 && ReceiveMsg.GetTerminalOrder() == 0x94) ||
                            (SendMsg.GetTerminalOrder() == 0x95 && ReceiveMsg.GetTerminalOrder() == 0x96) ||
                            (SendMsg.GetTerminalOrder() == 0x97 && ReceiveMsg.GetTerminalOrder() == 0x98))
                        {
                            return(1);
                        }
                    }
                } //终端数据返回
            }     //终端命令 || 终端数据
            else if (order == EnumOrder.AP_ORDER_UPDOWN)
            {
                SendMsg.GetParam_AP_UID(ref ap_uid_send);
                ReceiveMsg.GetParam_AP_UID(ref ap_uid_receive);

                if ((SendMsg.GetAPOrder() == 0xA0 && ReceiveMsg.GetAPOrder() == 0xA1) ||
                    (SendMsg.GetAPOrder() == 0xA2 && ReceiveMsg.GetAPOrder() == 0xA3) ||
                    (SendMsg.GetAPOrder() == 0xA4 && ReceiveMsg.GetAPOrder() == 0xA5))
                {
                    if (ap_uid_send.Equals(ap_uid_receive))
                    {
                        if ((SendMsg.GetAPOrder() == 0xA0 && ReceiveMsg.GetAPOrder() == 0xA1) ||
                            (SendMsg.GetAPOrder() == 0xA2 && ReceiveMsg.GetAPOrder() == 0xA3) ||
                            (SendMsg.GetAPOrder() == 0xA4 && ReceiveMsg.GetAPOrder() == 0xA5))
                        {
                            return(1);
                        }
                    }
                }
            }//AP命令
            return(-1);
        }
コード例 #15
0
        public PagedResult <T> Filter <T>(Expression <Func <T, bool> > predicate, string[] navProperties, Expression <Func <T, Object> > predicateSort, EnumOrder typeOrder, int page, int limit) where T : BaseEntity
        {
            if (predicate == null)
            {
                return(null);
            }
            IQueryable <T> result = _dbContext.Set <T>().Where(predicate);

            result = SetIncludes(result, navProperties);
            result = GetOrderResult(result, predicateSort, typeOrder.ToString());

            IQueryable <T> pagedResult = null;
            int            totalPages  = 0;

            GetPagedResult(result, page, limit, out pagedResult, out totalPages);

            return(new PagedResult <T> {
                Result = pagedResult, TotalPages = totalPages
            });
        }
コード例 #16
0
        public event EventHandler Loaded;      //加载完成事件

        public ImageListModel()
        {
            Order      = EnumOrder.Next;
            Visibility = Visibility.Collapsed;
        }
コード例 #17
0
ファイル: JDFAutoAssembly.cs プロジェクト: cip4/JDFLibNet
 ///
 ///          <summary> * (9) get attribute Order </summary>
 ///          * <returns> the value of the attribute </returns>
 ///
 public virtual EnumOrder getOrder()
 {
     return(EnumOrder.getEnum(getAttribute(AttributeName.ORDER, null, "Gathering")));
 }
コード例 #18
0
ファイル: NewsController.cs プロジェクト: dalinhuang/hotnet
        public ActionResult BrowseAll(int? categoryId,int? pageNo,EnumOrder? type)
        {
            ViewData["HeadControl"] = new HeadControl() { SystemCategory = EnumSystemCategory.����, SystemCategoryID = categoryId.Value };
            categoryId = categoryId ?? 0;
            type = type ?? EnumOrder.���ʱ��;
            pageNo = pageNo ?? 0;
            int totalCount = 0;
            ViewData["News"] = BizNews.ListByCategoryId(categoryId.Value,type.Value, 10, pageNo.Value, out totalCount);
            ViewData["PaginateHelper"] = PaginateHelper.ConstructPaginate(totalCount, pageNo ?? 0, PAGESIZE, "/News/BrowseAll/", new SearchNewsByCategory() { OrderType = (int)type.Value, CategoryID=categoryId.Value});
            ViewData["Time"] = type == EnumOrder.���ʱ�� ? "id='current'" : "";
            ViewData["Click"] = type == EnumOrder.������� ? "id='current'" : "";
            ViewData["CategoryID"] = categoryId.Value;

            return View();
        }
コード例 #19
0
ファイル: NewsController.cs プロジェクト: dalinhuang/hotnet
        public ActionResult RecommendMore(int? pageNo, EnumOrder? type)
        {
            ViewData["HeadControl"] = new HeadControl() { SystemCategory = EnumSystemCategory.����};
            type = type ?? EnumOrder.���ʱ��;
            pageNo = pageNo ?? 0;
            int totalCount = 0;
            News[] recommendNews = BizNews.ListRemcommendNews(type.Value, PAGESIZE, pageNo.Value, out totalCount);
            ViewData["PaginateHelper"] = PaginateHelper.ConstructPaginate(totalCount, pageNo ?? 0, PAGESIZE, "/News/RecommendMore/Index/", new SearchByOrderType() { OrderType = (int)type.Value });
            ViewData["RecommendNews"] = recommendNews;
            ViewData["Time"] = type == EnumOrder.���ʱ�� ? "id='current'" : "";
            ViewData["Click"] = type == EnumOrder.������� ? "id='current'" : "";
            ViewData["RecommendPicture"] = new ReferencePictureControl() { ModelName = "�Ƽ�ͼƬ", MoreLink = "/PictureRecommendMore", ReferencePictures = BizPictureGroup.ListRecommendPictureGroup(8) };
            ViewData["RecommendVideo"] = new ReferenceVideoControl() { MoreLink = "/VideoRecommandMore", ModuleTitle = "�Ƽ���Ƶ", ReferenceVideos = BizVideo.ListMyCommendVideoes(10, EnumOrder.���ʱ��) };

            return View();
        }
コード例 #20
0
 private void OrderBy_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     CurrentOrder = (EnumOrder)(CmbSortBy.SelectedItem as ComboData).Id;
     UpdateListBox();
 }
コード例 #21
0
 static JDFAutoAssemblySection()
 {
     atrInfoTable[0]  = new AtrInfoTable(AttributeName.ASSEMBLYID, 0x44444311, AttributeInfo.EnumAttributeType.string_, null, null);
     atrInfoTable[1]  = new AtrInfoTable(AttributeName.ASSEMBLYIDS, 0x33333111, AttributeInfo.EnumAttributeType.NMTOKENS, null, null);
     atrInfoTable[2]  = new AtrInfoTable(AttributeName.JOBID, 0x33333311, AttributeInfo.EnumAttributeType.shortString, null, null);
     atrInfoTable[3]  = new AtrInfoTable(AttributeName.ORDER, 0x33333311, AttributeInfo.EnumAttributeType.enumeration, EnumOrder.getEnum(0), "Gathering");
     elemInfoTable[0] = new ElemInfoTable(ElementName.PAGEASSIGNEDLIST, 0x33333111);
 }