示例#1
0
        public void OnGet()
        {
            QueryMain user1 = new QueryMain();

            user1.Id = 1;

            Query order1 = new Query();

            order1.Id    = 12;
            order1.AndOr = "AND";

            QueryItem orderItem1 = new QueryItem();

            orderItem1.Id          = 12121;
            orderItem1.Price       = 10;
            orderItem1.ProductName = "Elma";
            order1.Items.Add(orderItem1);


            QueryItem orderItem2 = new QueryItem();

            orderItem2.Id          = 12122;
            orderItem2.Price       = 15;
            orderItem2.ProductName = "Armut";
            order1.Items.Add(orderItem2);

            user1.Queries.Add(order1);


            this.QueryMain = user1;
        }
示例#2
0
        public PartialViewResult OnGetEmptyFilterPartial(int Id)
        {
            QueryMain query = new QueryMain();
            Query     q     = new Query();

            query.Queries.Add(q);

            QueryItem queryItem = new QueryItem();

            q.Items.Add(queryItem);


            return(new PartialViewResult
            {
                ViewName = "_EmptyQueryItem",
                ViewData = new ViewDataDictionary <QueryMain>(ViewData, query)
            });
        }