/// <summary> /// Create the template output /// </summary> public virtual string TransformText() { #line 1 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* The MIT License (MIT) */ #line default #line hidden #line 2 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* Copyright (c) 1994-2021 The Sage Group plc or its licensors. All rights reserved. */ #line default #line hidden #line 3 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* */ #line default #line hidden #line 4 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* Permission is hereby granted, free of charge, to any person obtaining a copy of */ #line default #line hidden #line 5 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* this software and associated documentation files (the "Software"), to deal in */ #line default #line hidden #line 6 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* the Software without restriction, including without limitation the rights to use, */ #line default #line hidden #line 7 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the */ #line default #line hidden #line 8 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* Software, and to permit persons to whom the Software is furnished to do so, */ #line default #line hidden #line 9 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* subject to the following conditions: */ #line default #line hidden #line 10 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* */ #line default #line hidden #line 11 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* The above copyright notice and this permission notice shall be included in all */ #line default #line hidden #line 12 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* copies or substantial portions of the Software. */ #line default #line hidden #line 13 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* */ #line default #line hidden #line 14 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, */ #line default #line hidden #line 15 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A */ #line default #line hidden #line 16 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT */ #line default #line hidden #line 17 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF */ #line default #line hidden #line 18 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE */ #line default #line hidden #line 19 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" /* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #line default #line hidden #line 26 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" // Locals var entityName = view.Properties[BusinessView.Constants.EntityName]; var moduleId = settings.ModuleId; var copyright = settings.Copyright; var resxName = view.Properties[BusinessView.Constants.ResxName]; var companyNamespace = settings.CompanyNamespace; var keyFieldName = view.Keys.FirstOrDefault(); var modelName = view.Properties[BusinessView.Constants.ModelName]; var webModuleNamespace = (settings.DoesAreasExist ? (settings.WebProjectIncludesModule ? moduleId + "." : string.Empty) + "Web.Areas." + moduleId : moduleId + ".Web"); var xmlLayout = settings.XmlLayout; #line default #line hidden this.Write("@* "); #line 39 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(copyright)); #line default #line hidden this.Write(" *@\r\n\r\n@using Sage.CA.SBS.ERP.Sage300.Common.Web.HtmlHelperExtension\r\n@using Comm" + "onResx = Sage.CA.SBS.ERP.Sage300.Common.Resources.CommonResx\r\n@using "); #line 43 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write("Resx = "); #line 43 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(companyNamespace)); #line default #line hidden this.Write("."); #line 43 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(moduleId)); #line default #line hidden this.Write(".Resources.Reports."); #line 43 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write("Resx\r\n\r\n@model "); #line 45 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(companyNamespace)); #line default #line hidden this.Write("."); #line 45 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(webModuleNamespace)); #line default #line hidden this.Write(".Models.Reports."); #line 45 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write("ViewModel<"); #line 45 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(companyNamespace)); #line default #line hidden this.Write("."); #line 45 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(moduleId)); #line default #line hidden this.Write(".Models.Reports."); #line 45 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(modelName)); #line default #line hidden this.Write(">\r\n\r\n<script type=\"text/javascript\">\r\n @Html.ConvertToJsVariableUsingNewtonSof" + "t(\""); #line 48 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write("ViewModel\", Model)\r\n @Html.ConvertToJsVariableUsingNewtonSoft(\"screenName\", "); #line 49 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(resxName)); #line default #line hidden this.Write(@".Entity); </script> <div class=""form-screen""> <div id=""message""></div> <header> <section class=""header-group-1""> <div class=""header-wrapper""> <div class=""header-headline""> @Html.SageHeader3Label(""lbl"); #line 58 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write("\", "); #line 58 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(resxName)); #line default #line hidden this.Write(".Entity)\r\n </div>\r\n </div>\r\n </section>\r\n </h" + "eader>\r\n "); #line 63 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" if (xmlLayout == null) { WriteLine(new string(' ', 4) + "<div class=\"form-group\">"); } #line default #line hidden this.Write(" "); #line 69 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" if (xmlLayout != null) { // XML Layout has been specified and therefore generate layout // Counter for indentation int depth = 0; // Get first element and proceed if there are elements specified var element = xmlLayout.Root.Descendants().First(); // Iterate xml and apply snippets directly to template if (element.HasElements) { // Recursion var snippet = new StringBuilder(); SnippetHelper.GenerateWidgets(depth, element, snippet, settings, view); WriteLine(snippet.ToString()); } } #line default #line hidden this.Write(" "); #line 90 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Reports\View\Entity.tt" if (xmlLayout == null) { WriteLine(new string(' ', 4) + "</div>"); } #line default #line hidden this.Write(" <section class=\"footer-group-1\">\r\n @Html.KoSageButton(\"btnPrint\", null" + ", new { @id = \"btnPrint\", @class = \"btn btn-primary\", @value = CommonResx.Print " + "})\r\n </section>\r\n\r\n</div>"); return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public virtual string TransformText() { #line 1 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* The MIT License (MIT) */ #line default #line hidden #line 2 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* Copyright (c) 1994-2021 The Sage Group plc or its licensors. All rights reserved. */ #line default #line hidden #line 3 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* */ #line default #line hidden #line 4 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* Permission is hereby granted, free of charge, to any person obtaining a copy of */ #line default #line hidden #line 5 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* this software and associated documentation files (the "Software"), to deal in */ #line default #line hidden #line 6 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* the Software without restriction, including without limitation the rights to use, */ #line default #line hidden #line 7 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the */ #line default #line hidden #line 8 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* Software, and to permit persons to whom the Software is furnished to do so, */ #line default #line hidden #line 9 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* subject to the following conditions: */ #line default #line hidden #line 10 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* */ #line default #line hidden #line 11 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* The above copyright notice and this permission notice shall be included in all */ #line default #line hidden #line 12 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* copies or substantial portions of the Software. */ #line default #line hidden #line 13 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* */ #line default #line hidden #line 14 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, */ #line default #line hidden #line 15 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A */ #line default #line hidden #line 16 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT */ #line default #line hidden #line 17 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF */ #line default #line hidden #line 18 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE */ #line default #line hidden #line 19 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" /* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #line default #line hidden #line 27 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" // Locals var entityName = settings.EntitiesContainerName; var resxName = view.Properties[BusinessView.Constants.ResxName]; var moduleId = settings.ModuleId; var copyright = settings.Copyright; var companyNamespace = settings.CompanyNamespace; var modelName = view.Properties[BusinessView.Constants.ModelName]; var webModuleNamespace = (settings.DoesAreasExist ? (settings.WebProjectIncludesModule ? moduleId + "." : string.Empty) + "Web.Areas." + moduleId : moduleId + ".Web"); var xmlLayout = settings.XmlLayout; #line default #line hidden this.Write("@* "); #line 39 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(copyright)); #line default #line hidden this.Write(@" *@ @using Sage.CA.SBS.ERP.Sage300.Common.Web.AreaConstants @using Sage.CA.SBS.ERP.Sage300.Common.Models.Enums @using Sage.CA.SBS.ERP.Sage300.Common.Web.HtmlHelperExtension @using CommonResx = Sage.CA.SBS.ERP.Sage300.Common.Resources.CommonResx @using AnnotationsResx = Sage.CA.SBS.ERP.Sage300.Common.Resources.AnnotationsResx @using "); #line 46 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(resxName)); #line default #line hidden this.Write(" = "); #line 46 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(companyNamespace)); #line default #line hidden this.Write("."); #line 46 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(moduleId)); #line default #line hidden this.Write(".Resources.Forms."); #line 46 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(resxName)); #line default #line hidden this.Write("\r\n@using "); #line 47 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(companyNamespace)); #line default #line hidden this.Write("."); #line 47 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(moduleId)); #line default #line hidden this.Write(".Web.Areas."); #line 47 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(moduleId)); #line default #line hidden this.Write(".Constants\r\n\r\n@model "); #line 49 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(companyNamespace)); #line default #line hidden this.Write("."); #line 49 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(webModuleNamespace)); #line default #line hidden this.Write(".Models."); #line 49 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write("ViewModel\r\n\r\n<div>\r\n"); #line 52 "C:\Development\Branches\UIWizard\Columbus-Innovation\src\wizards\CodeGenerationWizard\Templates\HeaderDetail\View\PartialEntity.tt" // Counter for indentation int depth = 0; // Iterate xml and apply snippets directly to template if (element.HasElements) { // Recursion var snippet = new StringBuilder(); SnippetHelper.GenerateWidgets(depth, element, snippet, settings, view); WriteLine(snippet.ToString()); } #line default #line hidden this.Write("</div>"); return(this.GenerationEnvironment.ToString()); }
/// <summary> /// Create the template output /// </summary> public virtual string TransformText() { #line 1 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* The MIT License (MIT) */ #line default #line hidden #line 2 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* Copyright (c) 1994-2021 The Sage Group plc or its licensors. All rights reserved. */ #line default #line hidden #line 3 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* */ #line default #line hidden #line 4 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* Permission is hereby granted, free of charge, to any person obtaining a copy of */ #line default #line hidden #line 5 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* this software and associated documentation files (the "Software"), to deal in */ #line default #line hidden #line 6 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* the Software without restriction, including without limitation the rights to use, */ #line default #line hidden #line 7 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the */ #line default #line hidden #line 8 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* Software, and to permit persons to whom the Software is furnished to do so, */ #line default #line hidden #line 9 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* subject to the following conditions: */ #line default #line hidden #line 10 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* */ #line default #line hidden #line 11 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* The above copyright notice and this permission notice shall be included in all */ #line default #line hidden #line 12 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* copies or substantial portions of the Software. */ #line default #line hidden #line 13 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* */ #line default #line hidden #line 14 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, */ #line default #line hidden #line 15 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A */ #line default #line hidden #line 16 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT */ #line default #line hidden #line 17 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF */ #line default #line hidden #line 18 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE */ #line default #line hidden #line 19 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" /* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #line default #line hidden #line 26 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" // Locals var entityName = view.Properties[BusinessView.Constants.EntityName]; var resxName = view.Properties[BusinessView.Constants.ResxName]; var moduleId = settings.ModuleId; var copyright = settings.Copyright; var companyNamespace = settings.CompanyNamespace; var keyFieldName = view.Keys.FirstOrDefault(); var modelName = view.Properties[BusinessView.Constants.ModelName]; var webModuleNamespace = (settings.DoesAreasExist ? (settings.WebProjectIncludesModule ? moduleId + "." : string.Empty) + "Web.Areas." + moduleId : moduleId + ".Web"); var xmlLayout = settings.XmlLayout; #line default #line hidden this.Write("@* "); #line 41 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(copyright)); #line default #line hidden this.Write(" *@\r\n"); #line 42 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" if (view.Options[BusinessView.Constants.GenerateGrid]) { #line default #line hidden this.Write("\t@model "); #line 46 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(companyNamespace)); #line default #line hidden this.Write("."); #line 46 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(webModuleNamespace)); #line default #line hidden this.Write(".Models."); #line 46 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write("ViewModel\r\n"); #line 47 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" } else { #line default #line hidden this.Write("\t@model "); #line 52 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(companyNamespace)); #line default #line hidden this.Write("."); #line 52 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(webModuleNamespace)); #line default #line hidden this.Write(".Models."); #line 52 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write("ViewModel<"); #line 52 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(companyNamespace)); #line default #line hidden this.Write("."); #line 52 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(moduleId)); #line default #line hidden this.Write(".Models."); #line 52 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(modelName)); #line default #line hidden this.Write(">\r\n"); #line 53 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" } #line default #line hidden this.Write("\r\n@using "); #line 57 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(resxName)); #line default #line hidden this.Write(" = "); #line 57 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(companyNamespace)); #line default #line hidden this.Write("."); #line 57 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(moduleId)); #line default #line hidden this.Write(".Resources.Forms."); #line 57 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(resxName)); #line default #line hidden this.Write("\r\n@using "); #line 58 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(companyNamespace)); #line default #line hidden this.Write("."); #line 58 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(moduleId)); #line default #line hidden this.Write(".Web.Areas."); #line 58 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(moduleId)); #line default #line hidden this.Write(@".Constants @using Sage.CA.SBS.ERP.Sage300.Common.Web.AreaConstants @using Sage.CA.SBS.ERP.Sage300.Common.Resources @using Sage.CA.SBS.ERP.Sage300.Common.Web.HtmlHelperExtension @using Sage.CA.SBS.ERP.Sage300.Common.Models.Enums @using AnnotationsResx = Sage.CA.SBS.ERP.Sage300.Common.Resources.AnnotationsResx <script type=""text/javascript""> @Html.ConvertToJsVariableUsingNewtonSoft("""); #line 67 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write("ViewModel\", Model)\r\n</script>\r\n\r\[email protected](\"~/Areas/"); #line 70 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(moduleId)); #line default #line hidden this.Write("/Views/"); #line 70 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write(@"/Partials/_Localization.cshtml"") <div id=""success"" class=""message""></div> <div class=""form-screen""> <div id=""message""></div> <header> <section class=""header-group-1""> <div class=""header-wrapper""> <div class=""header-headline""> @Html.SageHeader1Label("""); #line 80 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(entityName)); #line default #line hidden this.Write("Header\", "); #line 80 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" this.Write(this.ToStringHelper.ToStringWithCulture(resxName)); #line default #line hidden this.Write(".Entity)\r\n </div>\r\n @Html.Partial(Core.OptionsMenu," + " Model.UserAccess)\t\r\n\t"); #line 83 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" if (!view.Options[BusinessView.Constants.GenerateGrid]) { #line default #line hidden this.Write(@" <div class=""header-options""> @if (Model.UserAccess.SecurityType.HasFlag(SecurityType.Modify)) { @Html.KoSageButton(""btnNew"", null, new { @value = CommonResx.CreateNew, @id = ""btnNew"", @class = ""btn btn-primary"" }) } </div> "); #line 93 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" } #line default #line hidden this.Write(" </div>\r\n <div class=\"flag-required\">\r\n <spa" + "n class=\"req-option\">@CommonResx.RequiredLegend</span>\r\n </div>\r\n " + " </section>\r\n </header>\r\n"); #line 102 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" if (xmlLayout == null) { WriteLine(new string(' ', 4) + "<div class=\"form-group\">"); } #line default #line hidden #line 108 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" if (view.Options[BusinessView.Constants.GenerateGrid]) { var gridName = entityName.Substring(0, 1).ToLower() + entityName.Substring(1); WriteLine("@Html.SageGrid(\"{0}Grid\", (Sage.CA.SBS.ERP.Sage300.Common.Models.GridDefinition)@ViewBag.{1}Grid)", gridName, view.Properties[BusinessView.Constants.EntityName]); } else if (xmlLayout != null) { // XML Layout has been specified and therefore generate layout using this instead of generating // only the key field // Counter for indentation int depth = 0; // Get first element and proceed if there are elements specified var element = xmlLayout.Root.Descendants().First(); // Iterate xml and apply snippets directly to template if (element.HasElements) { // Recursion var snippet = new StringBuilder(); SnippetHelper.GenerateWidgets(depth, element, snippet, settings, view); WriteLine(snippet.ToString()); } } else { // No XML layout specified, therefore we will no longer generate only the key field } if (xmlLayout == null) { WriteLine(new string(' ', 4) + "</div>"); } #line default #line hidden this.Write(@" <section class=""footer-group-1""> @if (Model.UserAccess.SecurityType.HasFlag(SecurityType.Modify)) { @Html.KoSageButton(""btnSave"", new { }, new { @value = CommonResx.Save, @id = ""btnSave"", @class = ""btn btn-primary"" }) "); #line 148 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" if (!view.Options[BusinessView.Constants.GenerateGrid]) { #line default #line hidden this.Write("\t\t\[email protected](\"btnDelete\", new { }, new { @value = CommonResx.Delete, @id" + " = \"btnDelete\", @class = \"btn btn-primary\" })\r\n"); #line 153 "C:\Development\Branches\SDK\Sage300-SDK\src\wizards\CodeGenerationWizard\Templates\Flat\View\Entity.tt" } #line default #line hidden this.Write(" }\r\n </section>\r\n</div>"); return(this.GenerationEnvironment.ToString()); }