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

            CopyrightText = footer.CopyrightText;
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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>());
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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 ");
        }
Ejemplo n.º 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");
        }
Ejemplo n.º 10
0
 public static global::Umbraco.Core.Models.PublishedContent.IPublishedContent GetFooterWave(IFooter that) => that.Value <global::Umbraco.Core.Models.PublishedContent.IPublishedContent>("footerWave");
Ejemplo n.º 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();
        }
Ejemplo n.º 12
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sheet"></param>
 protected virtual void CustomPageFooter(IFooter footer)
 {
 }
Ejemplo n.º 13
0
 /// <summary>Static getter for P.IVA</summary>
 public static string GetPIva(IFooter that)
 {
     return(that.GetPropertyValue <string>("pIVA"));
 }
Ejemplo n.º 14
0
 /// <summary>Static getter for Phone number</summary>
 public static string GetPhoneNumber(IFooter that)
 {
     return(that.GetPropertyValue <string>("phoneNumber"));
 }
Ejemplo n.º 15
0
 /// <summary>Static getter for Location</summary>
 public static string GetLocation(IFooter that)
 {
     return(that.GetPropertyValue <string>("location"));
 }
Ejemplo n.º 16
0
 /// <summary>Static getter for E-mail address</summary>
 public static string GetEMailAddress(IFooter that)
 {
     return(that.GetPropertyValue <string>("eMailAddress"));
 }
Ejemplo n.º 17
0
 /// <summary>Static getter for Company name</summary>
 public static string GetCompanyName(IFooter that)
 {
     return(that.GetPropertyValue <string>("companyName"));
 }
Ejemplo n.º 18
0
 public static string GetCopyrightText(IFooter that) => that.Value <string>("copyrightText");
Ejemplo n.º 19
0
 public FooterController()
 {
     Foot = new FooterClass();
     Data = new Hat_Bazar_databaseEntities();
 }
Ejemplo n.º 20
0
 public static global::System.Web.IHtmlString GetFooterText(IFooter that) => that.Value <global::System.Web.IHtmlString>("footerText");
Ejemplo n.º 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);
        }
Ejemplo n.º 22
0
 private static FooterDataObject CachedData(IFooter that)
 {
     return(that.FooterDataObject = that.FooterDataObject == null?FooterDataObject.DataItem(that) : that.FooterDataObject);
 }
Ejemplo n.º 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"));
 }
Ejemplo n.º 24
0
 internal static string GetHeader(IFooter that)
 {
     return(CachedData(that).FooterData);
 }
Ejemplo n.º 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;
 }