Esempio n. 1
0
        public override void Execute()
        {
            DataSet        dataSet  = (DataSet)Model;
            NormalListData pageData = (NormalListData)ViewBag.PageData;

            WriteLiteral("\r\n");

            DefineSection("DefaultHeader", () => {
                WriteLiteral("\r\n");


                if (pageData.Header != null)
                {
                    Write(RenderRazorOutputData(pageData.Header, Model));
                }
                else
                {
                    WriteLiteral("        <h1>");

                    Write(ViewBag.Title);

                    WriteLiteral("</h1>\r\n");
                }
            });

            DefineSection("DefaultFooter", () => {
                WriteLiteral("\r\n");

                WriteLiteral("    ");

                Write(RenderRazorOutputData(pageData.Footer, Model));

                WriteLiteral("\r\n");
            });

            DefineSection("DefaultListButton", () => {
                WriteLiteral("\r\n");


                if (BootcssUtil.HasListButtons(dataSet) || pageData.ShowExportExcel)
                {
                    WriteLiteral("        <div");

                    WriteLiteral(" class=\"panel panel-info\"");

                    WriteLiteral(">\r\n            <div");

                    WriteLiteral(" class=\"panel-body\"");

                    WriteLiteral(">\r\n");


                    if (BootcssUtil.HasListButtons(dataSet))
                    {
                        Write(BootcssUtil.CreateListButtons(dataSet));
                    }

                    WriteLiteral("                ");

                    if (pageData.ShowExportExcel)
                    {
                        Write(BootcssUtil.CreateExcelButton());
                    }

                    WriteLiteral("            </div>\r\n        </div>\r\n");
                }
            });

            WriteLiteral("<!DOCTYPE html>\r\n<html>\r\n<head>\r\n    <title>");

            Write(ViewBag.Title);

            WriteLiteral("</title>\r\n    <meta");

            WriteLiteral(" http-equiv=\"X-UA-Compatible\"");

            WriteLiteral(" content=\"IE=edge\"");

            WriteLiteral(" />\r\n    <meta");

            WriteLiteral(" http-equiv=\"Content-Type\"");

            WriteLiteral(" content=\"text/html; charset=utf-8\"");

            WriteLiteral(" />\r\n    <meta");

            WriteLiteral(" name=\"viewport\"");

            WriteLiteral(" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable" +
                         "=0;\"");

            WriteLiteral(" />\r\n");

            WriteLiteral("    ");

            Write(RenderLayoutPartial("../bin/css.cshtml", null));

            WriteLiteral("\r\n    <link");

            WriteLiteral(" rel=\"stylesheet\"");

            WriteLiteral(" type=\"text/css\"");

            WriteAttribute("href", Tuple.Create(" href=\"", 1477), Tuple.Create("\"", 1540)
                           , Tuple.Create(Tuple.Create("", 1484), Tuple.Create <System.Object, System.Int32>("toolkitcss/v5/commonM/datalist.css".AppVirutalPath()
                                                                                                             , 1484), false)
                           );

            WriteLiteral(" />\r\n");

            WriteLiteral("    ");

            Write(ViewBag.Script.CreateUserCss());

            WriteLiteral("\r\n</head>\r\n<body");

            WriteAttribute("id", Tuple.Create(" id=\"", 1597), Tuple.Create("\"", 1628)
                           , Tuple.Create(Tuple.Create("", 1602), Tuple.Create <System.Object, System.Int32>(HtmlUtil.GetPageId(Model)
                                                                                                             , 1602), false)
                           );

            WriteLiteral(" class=\"tk-dataPage\"");

            WriteLiteral(" data-webpath=\"");

            Write(HtmlUtil.AppVirtualPath);

            WriteLiteral("\"");

            WriteLiteral(" data-dialog-height=\"");

            Write(pageData.DialogHeight);

            WriteLiteral("\"");

            WriteLiteral(">\r\n    <div");

            WriteLiteral(" class=\"container-fluid\"");

            WriteLiteral(">\r\n");


            if (pageData.ShowTitle)
            {
                Write(RenderSectionOrDefault("Header", "DefaultHeader"));
            }

            WriteLiteral("        ");

            Write(RenderSectionIfDefined("Query", "query.cshtml", Model));

            WriteLiteral("\r\n        <div");

            WriteLiteral(" class=\"tk-datalist\"");

            WriteLiteral(">\r\n");


            if (pageData.OperatorPosition != OperatorPosition.None)
            {
                Write(RenderSectionOrDefault("ListButtons", "DefaultListButton"));
            }

            WriteLiteral("            <div");

            WriteLiteral(" id=\"listData\"");

            WriteLiteral(">\r\n");

            WriteLiteral("                ");

            Write(RenderSectionIfDefined("Main", "listmain.cshtml", Model));

            WriteLiteral("\r\n            </div>\r\n        </div>\r\n");

            WriteLiteral("        ");

            Write(RenderSectionOrDefault("Footer", "DefaultFooter"));

            WriteLiteral("\r\n    </div>\r\n");

            WriteLiteral("    ");

            Write(RenderLayoutPartial("../bin/js.cshtml", null));

            WriteLiteral("\r\n    <script");

            WriteLiteral(" type=\"text/javascript\"");

            WriteAttribute("src", Tuple.Create(" src=\"", 2470), Tuple.Create("\"", 2546)
                           , Tuple.Create(Tuple.Create("", 2476), Tuple.Create <System.Object, System.Int32>("toolkitjs/v5/toolkit/coreT/toolkit.normallist.js".AppVirutalPath()
                                                                                                             , 2476), false)
                           );

            WriteLiteral("> </script>\r\n");

            WriteLiteral("    ");

            Write(ViewBag.Script.CreateUserJavaScript());

            WriteLiteral("\r\n</body>\r\n</html>\r\n");
        }
Esempio n. 2
0
        public override void Execute()
        {
            NormalDetailData pageData    = (NormalDetailData)ViewBag.PageData;
            bool             showPicture = pageData.ShowPicture;
            string           title       = HtmlUtil.GetTitle(pageData.TitleFormat, ViewBag.Title);

            WriteLiteral("\r\n");

            DefineSection("DefaultHeader", () => {
                WriteLiteral("\r\n");


                if (pageData.Header != null)
                {
                    Write(RenderRazorOutputData(pageData.Header, Model));
                }
                else
                {
                    WriteLiteral("        <h1>");

                    Write(title);

                    WriteLiteral("</h1>\r\n");
                }
            });

            DefineSection("DefaultFooter", () => {
                WriteLiteral("\r\n");

                WriteLiteral("    ");

                Write(RenderRazorOutputData(pageData.Footer, Model));

                WriteLiteral("\r\n");
            });

            WriteLiteral("<!DOCTYPE html>\r\n<html>\r\n<head>\r\n    <title>");

            Write(title);

            WriteLiteral("</title>\r\n    <meta");

            WriteLiteral(" http-equiv=\"X-UA-Compatible\"");

            WriteLiteral(" content=\"IE=edge\"");

            WriteLiteral(" />\r\n    <meta");

            WriteLiteral(" http-equiv=\"Content-Type\"");

            WriteLiteral(" content=\"text/html; charset=utf-8\"");

            WriteLiteral(" />\r\n    <meta");

            WriteLiteral(" name=\"viewport\"");

            WriteLiteral(" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable" +
                         "=0;\"");

            WriteLiteral(" />\r\n");

            WriteLiteral("    ");

            Write(RenderLayoutPartial("../bin/css.cshtml", null));

            WriteLiteral(" \r\n");

            WriteLiteral("    ");

            Write(ViewBag.Script.CreateUserCss());

            WriteLiteral("\r\n</head>\r\n<body");

            WriteAttribute("id", Tuple.Create(" id=\"", 1005), Tuple.Create("\"", 1036)
                           , Tuple.Create(Tuple.Create("", 1010), Tuple.Create <System.Object, System.Int32>(HtmlUtil.GetPageId(Model)
                                                                                                             , 1010), false)
                           );

            WriteLiteral(" class=\"tk-dataPage\"");

            WriteLiteral(" data-webpath=\"");

            Write(HtmlUtil.AppVirtualPath);

            WriteLiteral("\"");

            WriteLiteral(" data-dialog-height=\"");

            Write(pageData.DialogHeight);

            WriteLiteral("\"");

            WriteLiteral(">\r\n    <div");

            WriteLiteral(" class=\"container-fluid\"");

            WriteLiteral(">\r\n");


            if (pageData.ShowTitle)
            {
                Write(RenderSectionOrDefault("Header", "DefaultHeader"));
            }

            WriteLiteral("        ");

            if (showPicture)
            {
                Write(RenderSectionIfDefined("Picture", "picture.cshtml", Model));
            }

            WriteLiteral("        ");

            Write(RenderSectionIfDefined("Main", "main.cshtml", Model));

            WriteLiteral("\r\n");

            WriteLiteral("        ");

            Write(RenderSectionOrDefault("Footer", "DefaultFooter"));

            WriteLiteral("\r\n    </div>\r\n");

            WriteLiteral("    ");

            Write(RenderLayoutPartial("../bin/js.cshtml", null));

            WriteLiteral("\r\n    ");

            WriteLiteral("\r\n");

            WriteLiteral("    ");

            Write(ViewBag.Script.CreateUserJavaScript());

            WriteLiteral("\r\n</body>\r\n\r\n</html>\r\n");
        }
        public override void Execute()
        {
            DataSet        dataSet  = (DataSet)Model;
            NormalEditData pageData = (NormalEditData)ViewBag.PageData;
            string         title    = HtmlUtil.GetEditTitle(dataSet, ViewBag);

            WriteLiteral("\r\n");

            DefineSection("DefaultHeader", () => {
                WriteLiteral("\r\n");


                if (pageData.Header != null)
                {
                    Write(RenderRazorOutputData(pageData.Header, Model));
                }
                else
                {
                    WriteLiteral("        <br />\r\n");

                    WriteLiteral("        <h1");

                    WriteLiteral(" class=\"text-center\"");

                    WriteLiteral(">");

                    Write(ViewBag.Title);

                    WriteLiteral("</h1>\r\n");

                    WriteLiteral("        <br />\r\n");
                }
            });

            DefineSection("DefaultFooter", () => {
                WriteLiteral("\r\n");

                WriteLiteral("    ");

                Write(RenderRazorOutputData(pageData.Footer, Model));

                WriteLiteral("\r\n");
            });

            WriteLiteral("<!DOCTYPE html>\r\n<html>\r\n<head>\r\n    <title>");

            Write(title);

            WriteLiteral("</title>\r\n    <meta");

            WriteLiteral(" http-equiv=\"X-UA-Compatible\"");

            WriteLiteral(" content=\"IE=edge\"");

            WriteLiteral(" />\r\n    <meta");

            WriteLiteral(" http-equiv=\"Content-Type\"");

            WriteLiteral(" content=\"text/html; charset=utf-8\"");

            WriteLiteral(" />\r\n    <meta");

            WriteLiteral(" name=\"viewport\"");

            WriteLiteral(" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable" +
                         "=0\"");

            WriteLiteral(" />\r\n");

            WriteLiteral("    ");

            Write(RenderLayoutPartial("../bin/css.cshtml", null));

            WriteLiteral("\r\n");

            WriteLiteral("    ");

            Write(ViewBag.Script.CreateUserCss());

            WriteLiteral(@"
    <style>
        td {
            vertical-align: middle !important;
        }

        .pdl-1 {
            padding-left: 1.5em !important;
        }

        .pdl-2 {
            padding-left: 2.5em !important;
        }
    </style>
</head>
<body");

            WriteAttribute("id", Tuple.Create(" id=\"", 1314), Tuple.Create("\"", 1345)
                           , Tuple.Create(Tuple.Create("", 1319), Tuple.Create <System.Object, System.Int32>(HtmlUtil.GetPageId(Model)
                                                                                                             , 1319), false)
                           );

            WriteLiteral(" class=\"tk-dataPage\"");

            WriteLiteral(" data-webPath=\"");

            Write(HtmlUtil.AppVirtualPath);

            WriteLiteral("\"");

            WriteLiteral(">\r\n    <div");

            WriteLiteral(" class=\"container\"");

            WriteLiteral(">\r\n");


            if (pageData.ShowTitle)
            {
                Write(RenderSectionOrDefault("Header", "DefaultHeader"));
            }

            WriteLiteral("        ");

            Write(RenderSectionIfDefined("Main", "main.cshtml", Model));

            WriteLiteral("\r\n");

            WriteLiteral("        ");

            Write(RenderSectionOrDefault("Footer", "DefaultFooter"));

            WriteLiteral("\r\n    </div>\r\n");

            WriteLiteral("    ");

            Write(RenderLayoutPartial("../bin/js.cshtml", null));

            WriteLiteral("\r\n    <script");

            WriteLiteral(" type=\"text/javascript\"");

            WriteAttribute("src", Tuple.Create(" src=\"", 1779), Tuple.Create("\"", 1849)
                           , Tuple.Create(Tuple.Create("", 1785), Tuple.Create <System.Object, System.Int32>("toolkitjs/v5/toolkit/coreT/toolkit.edit.js".AppVirutalPath()
                                                                                                             , 1785), false)
                           );

            WriteLiteral("> </script>\r\n");

            WriteLiteral("    ");

            Write(ViewBag.Script.CreateUserJavaScript());

            WriteLiteral("\r\n</body>\r\n</html>\r\n");
        }