Exemplo n.º 1
0
        //
        // GET: /ModuleProduct/Category/

        public ActionResult CategorysList()
        {
            try
            {
                string _url = Request.RawUrl;
                string _ok  = CommonFunc.Nvs_Redirect_QuyenTruyCapUser(_url);
                if (_ok != "")
                {
                    return(Redirect(_ok));
                }
                int    fromRow    = 0;
                string htmlPaging = "";

                Category_BL            _Category_BL = new Category_BL();
                List <Categories_Info> _lst_data    = _Category_BL.Category_GetAll();

                List <Categories_Info> lstDataBreakPage = NaviCommon.CommonFuc.GetPaging <Categories_Info>(_lst_data, 1, ref fromRow, ref htmlPaging, "Loại sản phẩm");
                ViewBag.Paging    = htmlPaging;
                ViewBag.FromRow   = fromRow;
                ViewBag.Obj       = lstDataBreakPage;
                ViewBag.SumRecord = _lst_data.Count;

                return(View());
            }
            catch (Exception ex)
            {
                NaviCommon.Common.log.Error(ex.ToString());

                ViewBag.FromRow = 0;
                return(View(new List <Categories_Info>()));
            }
        }
Exemplo n.º 2
0
        public ActionResult ShowInsertProduct()
        {
            try
            {
                Category_BL            _Category_BL = new Category_BL();
                List <Categories_Info> _lst         = _Category_BL.Category_GetAll();
                ViewBag.LstCategory = _lst;

                return(PartialView("~/Areas/ModuleProduct/Views/Product/_Partial_Insert_Product.cshtml"));
            }
            catch (Exception ex)
            {
                NaviCommon.Common.log.Error(ex.ToString());
                return(null);
            }
        }