Exemplo n.º 1
0
        //
        // GET: /SysSub/Create

        public ActionResult Create()
        {
            SysProductLogic productLogic = new SysProductLogic();
            var             productList  = productLogic.GetProductList().ToList <SysProductEntity>();

            this.ViewBag.ProductId = new SelectList(productList, "ProductId", "ProductName");

            return(View());
        }
Exemplo n.º 2
0
        //
        // GET: /SysSub/Edit/5

        public ActionResult Edit(int id)
        {
            var             model        = logic.GetSubSystemInfo(id);
            SysProductLogic productLogic = new SysProductLogic();
            var             productList  = productLogic.GetProductList().ToList <SysProductEntity>();

            this.ViewBag.ProductId = new SelectList(productList, "ProductId", "ProductName", model.ProductId);
            return(View(model));
        }
Exemplo n.º 3
0
        //
        // GET: /SysProduct/
        public ActionResult Index(string productName = "", int pageIndex = 1)
        {
            PageItem pageItem = new PageItem {
                PageIndex = pageIndex, PageSize = 15
            };
            List <SysProductEntity> roleList = logic.GetProductList(productName, pageItem).ToList <SysProductEntity>();
            var model = new PagedList <SysProductEntity>(roleList, pageItem.PageIndex, pageItem.PageSize, pageItem.TotalCount);

            return(View(model));
        }