Example #1
0
        public static MvcHtmlString SizeNameByParentId_SectionGuid_PriceCurrent(this HtmlHelper helper, string ParentId, string SectionGuid)
        {
            shSizeService _size = new shSizeService();
            shSetSize     size  = _size.DanhSachSize()
                                  .Where(x => x.ParentId == ParentId &&
                                         x.SectionGuid == SectionGuid)
                                  .FirstOrDefault();

            string html = string.Empty;

            if (size != null && !string.IsNullOrEmpty(size.SizeName) && !string.IsNullOrWhiteSpace(size.SizeName))
            {
                html = Format.FormatDecimalToString(size.PriceCurrent.GetValueOrDefault(0)).Replace(',', '.');
            }

            return(new MvcHtmlString(html));
        }
Example #2
0
        public static MvcHtmlString SizeNameByParentId_SectionGuid(this HtmlHelper helper, string ParentId, string SectionGuid)
        {
            shSizeService _size = new shSizeService();
            shSetSize     size  = _size.DanhSachSize()
                                  .Where(x => x.ParentId == ParentId &&
                                         x.SectionGuid == SectionGuid)
                                  .FirstOrDefault();

            string html = string.Empty;

            if (size != null && !string.IsNullOrEmpty(size.SizeName) && !string.IsNullOrWhiteSpace(size.SizeName))
            {
                html = size.SizeName;
            }

            return(new MvcHtmlString(html));
        }