protected override void CustomPageFooter(IFooter footer) { if (PageFooterWriting != null) { PageFooterWriting(this, new PageWritingEventArgs(footer, GetExport(ExportId))); } }
public FooterViewModel(IFooter footer) { if (footer == null) { throw new ArgumentNullException(nameof(footer)); } CopyrightText = footer.CopyrightText; }
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); }
internal static IEnumerable <string> GetHeaderItems(IFooter that) { var header = GetHeader(that); if (!string.IsNullOrWhiteSpace(header)) { return(header.Split('\n').ToList()); } return(new List <string>()); }
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); }
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)); }
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 "); }
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"); }
public static global::Umbraco.Core.Models.PublishedContent.IPublishedContent GetFooterWave(IFooter that) => that.Value <global::Umbraco.Core.Models.PublishedContent.IPublishedContent>("footerWave");
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(); }
/// <summary> /// /// </summary> /// <param name="sheet"></param> protected virtual void CustomPageFooter(IFooter footer) { }
/// <summary>Static getter for P.IVA</summary> public static string GetPIva(IFooter that) { return(that.GetPropertyValue <string>("pIVA")); }
/// <summary>Static getter for Phone number</summary> public static string GetPhoneNumber(IFooter that) { return(that.GetPropertyValue <string>("phoneNumber")); }
/// <summary>Static getter for Location</summary> public static string GetLocation(IFooter that) { return(that.GetPropertyValue <string>("location")); }
/// <summary>Static getter for E-mail address</summary> public static string GetEMailAddress(IFooter that) { return(that.GetPropertyValue <string>("eMailAddress")); }
/// <summary>Static getter for Company name</summary> public static string GetCompanyName(IFooter that) { return(that.GetPropertyValue <string>("companyName")); }
public static string GetCopyrightText(IFooter that) => that.Value <string>("copyrightText");
public FooterController() { Foot = new FooterClass(); Data = new Hat_Bazar_databaseEntities(); }
public static global::System.Web.IHtmlString GetFooterText(IFooter that) => that.Value <global::System.Web.IHtmlString>("footerText");
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); }
private static FooterDataObject CachedData(IFooter that) { return(that.FooterDataObject = that.FooterDataObject == null?FooterDataObject.DataItem(that) : that.FooterDataObject); }
/// <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")); }
internal static string GetHeader(IFooter that) { return(CachedData(that).FooterData); }
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; }