public DataTable GetGoods(HttpContext context)
        {
            int top = (context.Request.Form["GoodListSize"] != null) ? Convert.ToInt32(context.Request.Form["GoodListSize"]) : 6;
            ProductShowOrderPriority productShowOrderPriority  = (ProductShowOrderPriority)((context.Request.Form["FirstPriority"] != null) ? Convert.ToInt32(context.Request.Form["FirstPriority"]) : 0);
            ProductShowOrderPriority productShowOrderPriority2 = (ProductShowOrderPriority)((context.Request.Form["SecondPriority"] != null) ? Convert.ToInt32(context.Request.Form["SecondPriority"]) : 0);
            ProductShowOrderPriority productShowOrderPriority3 = (ProductShowOrderPriority)((context.Request.Form["ThirdPriority"] != null) ? Convert.ToInt32(context.Request.Form["ThirdPriority"]) : 0);
            int           categroyId = context.Request.Form["CategoryId"].ToInt(0);
            List <string> list       = new List <string>();
            string        text       = ProductTempSQLADD.ReturnShowOrder(productShowOrderPriority);

            list.Add(text.Split(' ')[1]);
            if (!string.IsNullOrEmpty(text))
            {
                text += ",";
            }
            if (!string.IsNullOrEmpty(ProductTempSQLADD.ReturnShowOrder(productShowOrderPriority2)) && productShowOrderPriority2 != productShowOrderPriority && !list.Contains(ProductTempSQLADD.ReturnShowOrder(productShowOrderPriority2).Split(' ')[1]))
            {
                text = text + ProductTempSQLADD.ReturnShowOrder(productShowOrderPriority2) + ",";
            }
            if (!string.IsNullOrEmpty(ProductTempSQLADD.ReturnShowOrder(productShowOrderPriority3)) && productShowOrderPriority3 != productShowOrderPriority && productShowOrderPriority3 != productShowOrderPriority2 && !list.Contains(ProductTempSQLADD.ReturnShowOrder(productShowOrderPriority3).Split(' ')[1]))
            {
                text += ProductTempSQLADD.ReturnShowOrder(productShowOrderPriority3);
            }
            text = text.TrimEnd(',');
            return(ProductHelper.GetTopProductOrder(top, text, categroyId));
        }
Ejemplo n.º 2
0
        public DataTable GetGoods(int categoryId)
        {
            int top = (!string.IsNullOrEmpty(this.GoodListSize)) ? Convert.ToInt32(this.GoodListSize) : 6;
            ProductShowOrderPriority productShowOrderPriority  = (ProductShowOrderPriority)((!string.IsNullOrEmpty(this.FirstPriority)) ? Convert.ToInt32(this.FirstPriority) : 0);
            ProductShowOrderPriority productShowOrderPriority2 = (ProductShowOrderPriority)((!string.IsNullOrEmpty(this.SecondPriority)) ? Convert.ToInt32(this.SecondPriority) : 0);
            ProductShowOrderPriority productShowOrderPriority3 = (ProductShowOrderPriority)((!string.IsNullOrEmpty(this.ThirdPriority)) ? Convert.ToInt32(this.ThirdPriority) : 0);
            List <string>            list = new List <string>();
            string text = ProductTempSQLADD.ReturnShowOrder(productShowOrderPriority);

            list.Add(text.Split(' ')[1]);
            if (!string.IsNullOrEmpty(text))
            {
                text += ",";
            }
            if (!string.IsNullOrEmpty(ProductTempSQLADD.ReturnShowOrder(productShowOrderPriority2)) && productShowOrderPriority2 != productShowOrderPriority && !list.Contains(ProductTempSQLADD.ReturnShowOrder(productShowOrderPriority2).Split(' ')[1]))
            {
                text = text + ProductTempSQLADD.ReturnShowOrder(productShowOrderPriority2) + ",";
            }
            if (!string.IsNullOrEmpty(ProductTempSQLADD.ReturnShowOrder(productShowOrderPriority3)) && productShowOrderPriority3 != productShowOrderPriority && productShowOrderPriority3 != productShowOrderPriority2 && !list.Contains(ProductTempSQLADD.ReturnShowOrder(productShowOrderPriority3).Split(' ')[1]))
            {
                text += ProductTempSQLADD.ReturnShowOrder(productShowOrderPriority3);
            }
            text = text.TrimEnd(',');
            return(ProductHelper.GetTopProductOrder(top, text, categoryId));
        }
Ejemplo n.º 3
0
        public DataTable GetGoods(HttpContext context)
        {
            int top = (context.Request.Form["GoodListSize"] != null) ? Convert.ToInt32(context.Request.Form["GoodListSize"]) : 6;
            ProductShowOrderPriority nULLORDER = ProductShowOrderPriority.NULLORDER;
            ProductShowOrderPriority show      = !string.IsNullOrEmpty(context.Request.Form["SecondPriority"]) ? ((ProductShowOrderPriority)Convert.ToInt32(context.Request.Form["SecondPriority"])) : ProductShowOrderPriority.NULLORDER;
            string str = ProductTempSQLADD.ReturnShowOrder(nULLORDER);

            if (!string.IsNullOrEmpty(str))
            {
                str = str + ",";
            }
            if (!string.IsNullOrEmpty(ProductTempSQLADD.ReturnShowOrder(show)))
            {
                str = str + ProductTempSQLADD.ReturnShowOrder(show);
            }
            return(ProductHelper.GetTopProductOrder(top, str));
        }
Ejemplo n.º 4
0
        public System.Data.DataTable GetGoods(System.Web.HttpContext context)
        {
            int top = (context.Request.Form["GoodListSize"] != null) ? System.Convert.ToInt32(context.Request.Form["GoodListSize"]) : 6;
            ProductShowOrderPriority show  = ProductShowOrderPriority.NULLORDER;
            ProductShowOrderPriority show2 = (ProductShowOrderPriority)((!string.IsNullOrEmpty(context.Request.Form["SecondPriority"])) ? System.Convert.ToInt32(context.Request.Form["SecondPriority"]) : 0);
            string text = ProductTempSQLADD.ReturnShowOrder(show);

            if (!string.IsNullOrEmpty(text))
            {
                text += ",";
            }
            if (!string.IsNullOrEmpty(ProductTempSQLADD.ReturnShowOrder(show2)))
            {
                text += ProductTempSQLADD.ReturnShowOrder(show2);
            }
            return(ProductHelper.GetTopProductOrder(top, text));
        }