示例#1
0
 protected override void CustomPageFooter(IFooter footer)
 {
     if (PageFooterWriting != null)
     {
         PageFooterWriting(this, new PageWritingEventArgs(footer, GetExport(ExportId)));
     }
 }
示例#2
0
        public FooterViewModel(IFooter footer)
        {
            if (footer == null)
            {
                throw new ArgumentNullException(nameof(footer));
            }

            CopyrightText = footer.CopyrightText;
        }
示例#3
0
        public IFooter GetBlockData(IFooter model)
        {
            var AbountUsSettingItem = Sitecore.Context.Database.GetItem(Templates.FooterData.Card.Id);

            model.Card = AbountUsSettingItem.Children.Select(a => a);
            var INeedSettingItem = Sitecore.Context.Database.GetItem(Templates.FooterData.Pages.Id);

            model.Pages = INeedSettingItem.Children.Select(a => a);
            return(model);
        }
示例#4
0
        internal static IEnumerable <string> GetHeaderItems(IFooter that)
        {
            var header = GetHeader(that);

            if (!string.IsNullOrWhiteSpace(header))
            {
                return(header.Split('\n').ToList());
            }
            return(new List <string>());
        }
示例#5
0
        public IReceiptBuilder BuildFooter(IFooter footer)
        {
            CheckReceiptIsNotNull();
            CheckCanBuildFooter();
            footer.Total = _groceries.Sum(x => x.Total);

            _footer.Append(_openDivHtml).Append(" Total:  ").Append(footer.Total).Append(_closeDivHtml)
            .Append(_openDivHtml).Append(" Receipt Number: ").Append(footer.ReceiptNumber).Append(_closeDivHtml)
            .Append(_openDivHtml).Append(footer.FooterMessage).Append(_closeDivHtml);

            return(this);
        }
示例#6
0
        public void TestRetrieveCorrectFooter()
        {
            // Read initial file in
            HSSFWorkbook wb = HSSFTestDataSamples.OpenSampleWorkbook("EmbeddedChartHeaderTest.xls");

            NPOI.SS.UserModel.ISheet s = wb.GetSheetAt(0);
            IFooter foot = s.Footer;

            Assert.AreEqual("Bottom Left", foot.Left);
            Assert.AreEqual("Bottom Center", foot.Center);
            Assert.AreEqual("Bottom Right", foot.Right);
        }
        public ActionResult FooterPrimary()
        {
            IFooter dataSourceItem = _glassMapperService.GetDataSourceItem <IFooter>();

            if (dataSourceItem == null)
            {
                return(PartialView("~/Views/Common/NoDataSourceItem.cshtml"));
            }

            _logService.DebugInfo($"Added Footer Primary to page with following data source: {dataSourceItem.FullPath}");

            return(PartialView("~/Views/Feature/Navigation/FooterPrimary.cshtml", dataSourceItem));
        }
示例#8
0
        public void TestReadDBCSHeaderFooter()
        {
            HSSFWorkbook wb = HSSFTestDataSamples.OpenSampleWorkbook("DBCSHeader.xls");

            NPOI.SS.UserModel.ISheet s = wb.GetSheetAt(0);
            IHeader h = s.Header;

            Assert.AreEqual(h.Left, "\u090f\u0915", "Header Left ");
            Assert.AreEqual(h.Center, "\u0939\u094b\u0917\u093e", "Header Center ");
            Assert.AreEqual(h.Right, "\u091c\u093e", "Header Right ");

            IFooter f = s.Footer;

            Assert.AreEqual(f.Left, "\u091c\u093e", "Footer Left ");
            Assert.AreEqual(f.Center, "\u091c\u093e", "Footer Center ");
            Assert.AreEqual(f.Right, "\u091c\u093e", "Footer Right ");
        }
示例#9
0
        public void TestFooterHas16bitCharacter()
        {
            HSSFWorkbook b = new HSSFWorkbook();

            NPOI.SS.UserModel.ISheet s = b.CreateSheet("Test");
            IFooter f = s.Footer;

            f.Left   = ("\u0391");
            f.Center = ("\u0392");
            f.Right  = ("\u0393");

            HSSFWorkbook b2 = HSSFTestDataSamples.WriteOutAndReadBack(b);
            IFooter      f2 = b2.GetSheet("Test").Footer;

            Assert.AreEqual(f2.Left, "\u0391");
            Assert.AreEqual(f2.Center, "\u0392");
            Assert.AreEqual(f2.Right, "\u0393");
        }
示例#10
0
 public static global::Umbraco.Core.Models.PublishedContent.IPublishedContent GetFooterWave(IFooter that) => that.Value <global::Umbraco.Core.Models.PublishedContent.IPublishedContent>("footerWave");
示例#11
0
        public void TestUnicodeInAll()
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
            IWorkbook       wb1     = _testDataProvider.CreateWorkbook();
            ICreationHelper factory = wb1.GetCreationHelper(/*getter*/);
            //Create a unicode dataformat (Contains euro symbol)
            IDataFormat df        = wb1.CreateDataFormat();
            String      formatStr = "_([$\u20ac-2]\\\\\\ * #,##0.00_);_([$\u20ac-2]\\\\\\ * \\\\\\(#,##0.00\\\\\\);_([$\u20ac-2]\\\\\\ *\\\"\\-\\\\\"??_);_(@_)";
            short       fmt       = df.GetFormat(formatStr);

            //Create a unicode sheet name (euro symbol)
            ISheet s = wb1.CreateSheet("\u20ac");

            //Set a unicode header (you guessed it the euro symbol)
            IHeader h = s.Header;

            h.Center = (/*setter*/ "\u20ac");
            h.Left   = (/*setter*/ "\u20ac");
            h.Right  = (/*setter*/ "\u20ac");

            //Set a unicode footer
            IFooter f = s.Footer;

            f.Center = (/*setter*/ "\u20ac");
            f.Left   = (/*setter*/ "\u20ac");
            f.Right  = (/*setter*/ "\u20ac");

            IRow  r = s.CreateRow(0);
            ICell c = r.CreateCell(1);

            c.SetCellValue(12.34);
            c.CellStyle.DataFormat = (/*setter*/ fmt);

            ICell c2 = r.CreateCell(2); // TODO - c2 unused but changing next line ('c'->'c2') causes Test to fail

            c.SetCellValue(factory.CreateRichTextString("\u20ac"));

            ICell  c3            = r.CreateCell(3);
            String formulaString = "TEXT(12.34,\"\u20ac###,##\")";

            c3.CellFormula = (/*setter*/ formulaString);

            IWorkbook wb2 = _testDataProvider.WriteOutAndReadBack(wb1);

            wb1.Close();

            //Test the sheetname
            s = wb2.GetSheet("\u20ac");
            Assert.IsNotNull(s);

            //Test the header
            h = s.Header;
            Assert.AreEqual(h.Center, "\u20ac");
            Assert.AreEqual(h.Left, "\u20ac");
            Assert.AreEqual(h.Right, "\u20ac");

            //Test the footer
            f = s.Footer;
            Assert.AreEqual(f.Center, "\u20ac");
            Assert.AreEqual(f.Left, "\u20ac");
            Assert.AreEqual(f.Right, "\u20ac");

            //Test the dataformat
            r  = s.GetRow(0);
            c  = r.GetCell(1);
            df = wb2.CreateDataFormat();
            Assert.AreEqual(formatStr, df.GetFormat(c.CellStyle.DataFormat));

            //Test the cell string value
            c2 = r.GetCell(2);
            Assert.AreEqual(c.RichStringCellValue.String, "\u20ac");

            //Test the cell formula
            c3 = r.GetCell(3);
            Assert.AreEqual(c3.CellFormula, formulaString);

            wb2.Close();
        }
示例#12
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sheet"></param>
 protected virtual void CustomPageFooter(IFooter footer)
 {
 }
示例#13
0
 /// <summary>Static getter for P.IVA</summary>
 public static string GetPIva(IFooter that)
 {
     return(that.GetPropertyValue <string>("pIVA"));
 }
示例#14
0
 /// <summary>Static getter for Phone number</summary>
 public static string GetPhoneNumber(IFooter that)
 {
     return(that.GetPropertyValue <string>("phoneNumber"));
 }
示例#15
0
 /// <summary>Static getter for Location</summary>
 public static string GetLocation(IFooter that)
 {
     return(that.GetPropertyValue <string>("location"));
 }
示例#16
0
 /// <summary>Static getter for E-mail address</summary>
 public static string GetEMailAddress(IFooter that)
 {
     return(that.GetPropertyValue <string>("eMailAddress"));
 }
示例#17
0
 /// <summary>Static getter for Company name</summary>
 public static string GetCompanyName(IFooter that)
 {
     return(that.GetPropertyValue <string>("companyName"));
 }
示例#18
0
 public static string GetCopyrightText(IFooter that) => that.Value <string>("copyrightText");
示例#19
0
 public FooterController()
 {
     Foot = new FooterClass();
     Data = new Hat_Bazar_databaseEntities();
 }
示例#20
0
 public static global::System.Web.IHtmlString GetFooterText(IFooter that) => that.Value <global::System.Web.IHtmlString>("footerText");
示例#21
0
        internal static FooterDataObject DataItem(IFooter that)
        {
            var defaultDataItem = new FooterDataObject(that.HasVortoValue(DataItemProperty) ? that.GetVortoValue <IPublishedContent>(DataItemProperty) : that.GetVortoValue <IPublishedContent>(DataItemProperty, fallbackCultureName: "en-US"));

            return(defaultDataItem);
        }
示例#22
0
 private static FooterDataObject CachedData(IFooter that)
 {
     return(that.FooterDataObject = that.FooterDataObject == null?FooterDataObject.DataItem(that) : that.FooterDataObject);
 }
示例#23
0
 /// <summary>Static getter for Footer Data</summary>
 public static Our.Umbraco.Vorto.Models.VortoValue GetFooterData(IFooter that)
 {
     return(that.GetPropertyValue <Our.Umbraco.Vorto.Models.VortoValue>("footerData"));
 }
示例#24
0
 internal static string GetHeader(IFooter that)
 {
     return(CachedData(that).FooterData);
 }
示例#25
0
 public void setFooter(IFooter footer)
 {
     this.footer = footer;
 }
 public NavigationMenuRepository(Func <IMvcContext> mvcContext, ISitemapViewModel sitemapViewModel, ILeftNavigation leftNavigation, IFooterViewModel footerViewModel, IHeaderViewModel headerViewModel, IFooter footer, ISitecoreHelper sitecoreHelper)
 {
     _sitecoreHelper   = sitecoreHelper;
     _headerViewModel  = headerViewModel;
     _mvcContext       = mvcContext;
     _leftNavigation   = leftNavigation;
     _footerViewModel  = footerViewModel;
     _sitemapViewModel = sitemapViewModel;
 }