Example #1
0
        public static MvcHtmlString SoLuongSanPham(this HtmlHelper helper, string ProductGuid)
        {
            shSizeService           _size  = new shSizeService();
            IEnumerable <shSetSize> dsSize = _size.DanhSachSize_BySectionGuid_ParentNull(null, ProductGuid, null);
            int SoLuong = 0;

            foreach (var size in dsSize)
            {
                SoLuong += size.Number.GetValueOrDefault(0);
            }
            return(new MvcHtmlString(SoLuong.ToString()));
        }
Example #2
0
        public PartialViewResult ListSize(string ProductGuid, string SectionGuid, int?page, string SizeGuid, int?p)
        {
            int pageCurrent = 1;

            if (page.HasValue)
            {
                pageCurrent = page.Value;
            }

            shSizeService    _size    = new shSizeService();
            shSectionService _section = new shSectionService();

            IEnumerable <shSetSize> ListSize = _size.DanhSachSize_BySectionGuid_ParentNull(SectionGuid, ProductGuid, SizeGuid);

            IPagedList <shSetSize> dsSize = ListSize.OrderBy(x => x.SizeId).ToPagedList(pageCurrent, Config.PAGE_SIZE_20);

            ViewBag.ListSize = dsSize;
            ViewBag.p        = p;
            return(PartialView("ListSize", dsSize));
        }