コード例 #1
0
        public IActionResult Departments()
        {
            listOfDepartments dpList = new listOfDepartments();

            // dpList.populateToJSON(); // Write to JSON
            dpList.populateDepartmentListFromJSON(); // Read from JSON

            ViewBag.dpList = dpList;
            ViewBag.Title  = "Department";
            return(View());
        }
コード例 #2
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
            BeginContext(31, 2, true);
            WriteLiteral("\r\n");
            EndContext();
#line 3 "C:\Users\Razat\Desktop\Projects\Github Projects\superking\Views\Home\Departments.cshtml"

            listOfDepartments list = ViewBag.dpList;

#line default
#line hidden
            BeginContext(86, 63, true);
            WriteLiteral("\r\n<style>\r\n   \r\n</style>\r\n\r\n<h1 class=\"display-4 reddishColor\">");
            EndContext();
            BeginContext(150, 17, false);
#line 11 "C:\Users\Razat\Desktop\Projects\Github Projects\superking\Views\Home\Departments.cshtml"
            Write(ViewData["Title"]);

#line default
#line hidden
            EndContext();
            BeginContext(167, 148, true);
            WriteLiteral("</h1>\r\n\r\n<!-- <div class=\"row\">\r\n    <div class=\"col-md-4\">.col-md-4</div>\r\n    <div class=\"col-md-8\">.col-md-8</div>\r\n</div> -->\r\n\r\n<!-- List -->\r\n");
            EndContext();
#line 19 "C:\Users\Razat\Desktop\Projects\Github Projects\superking\Views\Home\Departments.cshtml"
            for (var i = 0; i < @list.departmentList.Count; i++)
            {
#line default
#line hidden
                BeginContext(371, 85, true);
                WriteLiteral("    <div class=\"row border border-secondary rounded\" style = \"padding: 1rem 0rem;\">\r\n");
                EndContext();
#line 21 "C:\Users\Razat\Desktop\Projects\Github Projects\superking\Views\Home\Departments.cshtml"
                if (i == 0 || i % 2 == 0)
                {
#line default
#line hidden
                    BeginContext(496, 62, true);
                    WriteLiteral("            <div class=\"col-lg-4\">\r\n                <img src= ");
                    EndContext();
                    BeginContext(559, 29, false);
#line 23 "C:\Users\Razat\Desktop\Projects\Github Projects\superking\Views\Home\Departments.cshtml"
                    Write(list.departmentList[i].imgSrc);

#line default
#line hidden
                    EndContext();
                    BeginContext(588, 41, true);
                    WriteLiteral(" class = \"foodImg\">\r\n            </div>\r\n");
                    EndContext();
#line 25 "C:\Users\Razat\Desktop\Projects\Github Projects\superking\Views\Home\Departments.cshtml"
                }

#line default
#line hidden
                BeginContext(640, 106, true);
                WriteLiteral("\r\n        <div class=\"col-lg-8 text\">\r\n            <h4 title=\"\" class = \"reddishColor\"> \r\n                ");
                EndContext();
                BeginContext(747, 28, false);
#line 29 "C:\Users\Razat\Desktop\Projects\Github Projects\superking\Views\Home\Departments.cshtml"
                Write(list.departmentList[i].title);

#line default
#line hidden
                EndContext();
                BeginContext(775, 62, true);
                WriteLiteral("\r\n            </h4>\r\n            <p>\r\n                <strong>");
                EndContext();
                BeginContext(838, 31, false);
#line 32 "C:\Users\Razat\Desktop\Projects\Github Projects\superking\Views\Home\Departments.cshtml"
                Write(list.departmentList[i].subtitle);

#line default
#line hidden
                EndContext();
                BeginContext(869, 49, true);
                WriteLiteral("</strong>\r\n                <br>\r\n                ");
                EndContext();
                BeginContext(919, 25, false);
#line 34 "C:\Users\Razat\Desktop\Projects\Github Projects\superking\Views\Home\Departments.cshtml"
                Write(list.departmentList[i].p1);

#line default
#line hidden
                EndContext();
                BeginContext(944, 53, true);
                WriteLiteral("\r\n            </p>\r\n            <p>\r\n                ");
                EndContext();
                BeginContext(998, 25, false);
#line 37 "C:\Users\Razat\Desktop\Projects\Github Projects\superking\Views\Home\Departments.cshtml"
                Write(list.departmentList[i].p2);

#line default
#line hidden
                EndContext();
                BeginContext(1023, 108, true);
                WriteLiteral("\r\n            </p>\r\n        </div>\r\n\r\n        <!-- Odd Numbered Images of Index 1, 3, 5 will show here -->\r\n");
                EndContext();
#line 42 "C:\Users\Razat\Desktop\Projects\Github Projects\superking\Views\Home\Departments.cshtml"
                if (i > 0 && i % 2 != 0)
                {
#line default
#line hidden
                    BeginContext(1170, 62, true);
                    WriteLiteral("            <div class=\"col-lg-4\">\r\n                <img src= ");
                    EndContext();
                    BeginContext(1233, 29, false);
#line 44 "C:\Users\Razat\Desktop\Projects\Github Projects\superking\Views\Home\Departments.cshtml"
                    Write(list.departmentList[i].imgSrc);

#line default
#line hidden
                    EndContext();
                    BeginContext(1262, 41, true);
                    WriteLiteral(" class = \"foodImg\">\r\n            </div>\r\n");
                    EndContext();
#line 46 "C:\Users\Razat\Desktop\Projects\Github Projects\superking\Views\Home\Departments.cshtml"
                }

#line default
#line hidden
                BeginContext(1314, 12, true);
                WriteLiteral("    </div>\r\n");
                EndContext();
#line 48 "C:\Users\Razat\Desktop\Projects\Github Projects\superking\Views\Home\Departments.cshtml"
            }

#line default
#line hidden
            BeginContext(1329, 1997, true);
            WriteLiteral(@"
<!-- https://www.c-sharpcorner.com/UploadFile/abhikumarvatsa/various-ways-to-pass-data-from-controller-to-view-in-mvc/
-->
<!-- 
<div class=""row border border-secondary rounded"" style = ""padding: 1rem 0rem;"">
    <div class=""col-lg-4"">
        <img src=""/img/departments/1)Produce-image.jpg"" alt=""mango"" title=""Produce"" class = ""foodImg"">
    </div>

    <div class=""col-lg-8 text"">
        <h4 title=""Produce"" class = ""reddishColor"">Produce</h4>
        <p><strong>Produce Palace!</strong>
        <br>When our customers think <strong>Super King</strong> the first thing that comes to mind is <strong>Produce</strong>.</p>
        <p>
            We guarantee fresh produce and the lowest prices every day. 
            Our produce variety includes strawberries, blueberries, avocados, 
            the largest variety of eggplant anywhere and even pomegranates.
        </p>
    </div>
</div>

<div class=""row border border-secondary rounded"" style = ""padding: 1rem 0rem;"">
    <div class=""col-lg-8 ");
            WriteLiteral(@"text"">
        <h4 title=""Meat &amp; Seafood"" class = ""reddishColor"">Meat &amp; Seafood</h4>
        <p>
            Our friendly butchers have years of experience and can always meet your needs.
            If you're on the move, our <strong>meats</strong> are also 
            individually <strong>packaged</strong> and ready to go.</p>
            <p>Our meat is delivered daily and always guaranteed fresh or your money back. 
            If you are looking for a special cut or grade, 
            feel free to ask us and we can order it for you. 
            Fresh and premium quality seafood is what Super King takes pride in. 
            Whether it is cooked or raw shrimp, fresh fillets, whole fish or crab meat, we carry it!
        </p>
    </div>

    <div class=""col-lg-4"">
        <img src=""/img/departments/2)meat-image.jpg"" alt=""mango"" title=""Produce"" class = ""foodImg"">
    </div>
</div>

<p id = ""redfont"">
    HELLO WORLD
</p>
-->");
            EndContext();
        }