private string getHtmlDocument() { string template = File.ReadAllText("Printing/PlanDayPrinting.cshtml"); var model = new ShippingListPrintModel() { Plan = Plan }; string html; if (Engine.Razor.IsTemplateCached("planday", typeof(ShippingListPrintModel))) { html = Engine.Razor.RunCompile("planday", typeof(ShippingListPrintModel), model); } else { html = Engine.Razor.RunCompile(template, "planday", typeof(ShippingListPrintModel), model); } return(html); }
private string getHtmlDocument() { string template = File.ReadAllText("Printing/ShoppingListTemplate.cshtml"); var model = new ShippingListPrintModel() { Items = Items }; string html; if (Engine.Razor.IsTemplateCached("shopping", typeof(ShippingListPrintModel))) { html = Engine.Razor.RunCompile("shopping", typeof(ShippingListPrintModel), model); } else { html = Engine.Razor.RunCompile(template, "shopping", typeof(ShippingListPrintModel), model); } return(html); }