#pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
#line 2 "F:\Hospital\Hospital\Pages\Shift.cshtml"

            ViewData["Page"] = "Display";
            var          d        = 0;
            List <Room>  rooms    = data.SELECTRoom();
            List <Shift> Shifts   = data.SELECTShift();
            List <Nurse> nurse    = data.SELECTNurse();
            var          misRooms = rooms.Count;
            var          max      = rooms.Max(p => p.misRoom);
            DBFile       db       = new DBFile();

#line default
#line hidden
            BeginContext(305, 479, true);
            WriteLiteral(@"<meta name=""viewport"" content=""width=device-width, initial-scale=1.0"" />
<div>
    <div id=""tytle"">:משמרות</div>
</div>
<table id=""table"">
    <thead>
        <tr>
            <th>קוד</th>
            <th>ת.ז. אחות</th>
            <th>מספר חדר</th>
            <th>שעת התחלה</th>
            <th>שעת סיום</th>
            <th>תאריך</th>
            <th class=""delete"">מחיקה</th>
            <th class=""update"">עדכון</th>
        </tr>
    </thead>
    <tbody>
");
            EndContext();
#line 30 "F:\Hospital\Hospital\Pages\Shift.cshtml"
            foreach (var p in Shifts)
            {
#line default
#line hidden
                BeginContext(831, 15, true);
                WriteLiteral("            <tr");
                EndContext();
                BeginWriteAttribute("class", " class=\"", 846, "\"", 877, 1);
#line 32 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                WriteAttributeValue("", 854, d < 5?"start":"finish", 854, 23, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(878, 23, true);
                WriteLiteral(">\r\n                <td>");
                EndContext();
                BeginContext(902, 11, false);
#line 33 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                Write(p.codeShift);

#line default
#line hidden
                EndContext();
                BeginContext(913, 27, true);
                WriteLiteral("</td>\r\n                <td>");
                EndContext();
                BeginContext(941, 57, false);
#line 34 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                Write(nurse.First(i => i.idNurse.Equals(p.codeNurse)).nameNurse);

#line default
#line hidden
                EndContext();
                BeginContext(998, 27, true);
                WriteLiteral("</td>\r\n                <td>");
                EndContext();
                BeginContext(1026, 10, false);
#line 35 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                Write(p.codeRoom);

#line default
#line hidden
                EndContext();
                BeginContext(1036, 27, true);
                WriteLiteral("</td>\r\n                <td>");
                EndContext();
                BeginContext(1064, 11, false);
#line 36 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                Write(p.startTime);

#line default
#line hidden
                EndContext();
                BeginContext(1075, 27, true);
                WriteLiteral("</td>\r\n                <td>");
                EndContext();
                BeginContext(1103, 12, false);
#line 37 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                Write(p.finishTime);

#line default
#line hidden
                EndContext();
                BeginContext(1115, 27, true);
                WriteLiteral("</td>\r\n                <td>");
                EndContext();
                BeginContext(1143, 7, false);
#line 38 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                Write(p.date1);

#line default
#line hidden
                EndContext();
                BeginContext(1150, 44, true);
                WriteLiteral("</td>\r\n                <td class=\"deleteBtn\"");
                EndContext();
                BeginWriteAttribute("onclick", " onclick=\"", 1194, "\"", 1334, 5);
                WriteAttributeValue("", 1204, "document.getElementById(\'deleteRow\').classList.toggle(\'popupAct\',", 1204, 65, true);
                WriteAttributeValue(" ", 1269, "true);", 1270, 7, true);
                WriteAttributeValue(" ", 1276, "document.getElementById(\'delete\').innerHTML", 1277, 44, true);
                WriteAttributeValue(" ", 1320, "=", 1321, 2, true);
#line 39 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                WriteAttributeValue("", 1322, p.codeShift, 1322, 12, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(1335, 50, true);
                WriteLiteral(" ;>מחק</td>\r\n                <td class=\"updateBtn\"");
                EndContext();
                BeginWriteAttribute("onclick", " onclick=\"", 1385, "\"", 1957, 35);
                WriteAttributeValue("", 1395, "document.getElementById(\'upDateRow\').classList.toggle(\'popupAct\',", 1395, 65, true);
                WriteAttributeValue(" ", 1460, "true);", 1461, 7, true);
                WriteAttributeValue(" ", 1467, "document.getElementById(\'update1\').innerHTML", 1468, 45, true);
                WriteAttributeValue(" ", 1512, "=", 1513, 2, true);
                WriteAttributeValue(" ", 1514, "\'", 1515, 2, true);
#line 40 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                WriteAttributeValue("", 1516, p.codeShift, 1516, 12, false);

#line default
#line hidden
                WriteAttributeValue("", 1528, "\';", 1528, 2, true);
                WriteAttributeValue(" ", 1530, "document.getElementById(\'selectRoom\').selectedIndex", 1531, 52, true);
                WriteAttributeValue(" ", 1582, "=", 1583, 2, true);
#line 40 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                WriteAttributeValue(" ", 1584, p.codeRoom, 1585, 11, false);

#line default
#line hidden
                WriteAttributeValue("", 1596, "-", 1596, 1, true);
#line 40 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                WriteAttributeValue("", 1597, max, 1597, 4, false);

#line default
#line hidden
                WriteAttributeValue("", 1601, "-1", 1601, 2, true);
                WriteAttributeValue(" ", 1603, "+", 1604, 2, true);
#line 40 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                WriteAttributeValue("", 1605, misRooms, 1605, 9, false);

#line default
#line hidden
                WriteAttributeValue("", 1614, ";", 1614, 1, true);
                WriteAttributeValue(" ", 1615, "document.getElementById(\'selectNurse\').selectedIndex", 1616, 53, true);
                WriteAttributeValue(" ", 1668, "=", 1669, 2, true);
#line 40 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                WriteAttributeValue("", 1670, db.NurseIndex(p.codeNurse), 1670, 27, false);

#line default
#line hidden
                WriteAttributeValue("", 1697, ";", 1697, 1, true);
                WriteAttributeValue(" ", 1698, "document.getElementById(\'update4\').value", 1699, 41, true);
                WriteAttributeValue(" ", 1739, "=", 1740, 2, true);
                WriteAttributeValue(" ", 1741, "\'", 1742, 2, true);
#line 40 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                WriteAttributeValue("", 1743, DateTime.Parse(p.startTime).ToShortTimeString(), 1743, 48, false);

#line default
#line hidden
                WriteAttributeValue("", 1791, "\';", 1791, 2, true);
                WriteAttributeValue(" ", 1793, "document.getElementById(\'update5\').value", 1794, 41, true);
                WriteAttributeValue(" ", 1834, "=", 1835, 2, true);
                WriteAttributeValue(" ", 1836, "\'", 1837, 2, true);
#line 40 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                WriteAttributeValue("", 1838, DateTime.Parse(p.finishTime).ToShortTimeString(), 1838, 49, false);

#line default
#line hidden
                WriteAttributeValue("", 1887, "\';", 1887, 2, true);
                WriteAttributeValue(" ", 1889, "document.getElementById(\'update6\').value", 1890, 41, true);
                WriteAttributeValue(" ", 1930, "=", 1931, 2, true);
                WriteAttributeValue(" ", 1932, "\'", 1933, 2, true);
#line 40 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                WriteAttributeValue("", 1934, data.Convert(p.date1), 1934, 22, false);

#line default
#line hidden
                WriteAttributeValue("", 1956, "\'", 1956, 1, true);
                EndWriteAttribute();
                BeginContext(1958, 39, true);
                WriteLiteral(" ;>עדכן פרטים</td>\r\n            </tr>\r\n");
                EndContext();
#line 42 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                d++;
            }

#line default
#line hidden
            BeginContext(2026, 802, true);
            WriteLiteral(@"

    </tbody>
</table>
<div class=""popup"" id=""deleteRow"">
    <div>
        <h3>האם ברצונך למחוק את המשמרת?</h3>
        <h4>קוד המשמרת למחיקה:<span id=""delete""></span></h4>
        <div id=""Act"">
            <span id=""deleteAll"">מחק</span>
            <span id=""cancelBtn"" onclick=""document.getElementById('deleteRow').classList.toggle('popupAct', false)"">בטל</span>
        </div>

    </div>
</div>
<div class=""popup"" id=""upDateRow"">
    <div>
        <h3>?האם ברצונך לעדכן את המשמרת</h3>
        <h4>
            <span>קוד</span> 
            <span id=""update1""></span>
        </h4>
        <h4>
            <span>תעודת זהות</span>
        </h4>
        <div>
            <span>אחות</span>
            <div>
                <select class=""select"" id=""selectNurse"">

");
            EndContext();
#line 74 "F:\Hospital\Hospital\Pages\Shift.cshtml"
            foreach (var p in data.SELECTNurse())
            {
#line default
#line hidden
                BeginContext(2911, 24, true);
                WriteLiteral("                        ");
                EndContext();
                BeginContext(2935, 68, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("option", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "2b3d0240d5e34fbea3392674c41c3dda", async() => {
                    BeginContext(2983, 11, false);
#line 76 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                    Write(p.nameNurse);

#line default
#line hidden
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_OptionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.OptionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_OptionTagHelper);
                BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "code", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 76 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                AddHtmlAttributeValue("", 2949, p.idNurse, 2949, 10, false);

#line default
#line hidden
                EndAddHtmlAttributeValues(__tagHelperExecutionContext);
                BeginWriteTagHelperAttribute();
#line 76 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                WriteLiteral(p.nameNurse);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
                __Microsoft_AspNetCore_Mvc_TagHelpers_OptionTagHelper.Value = __tagHelperStringValueBuffer;
                __tagHelperExecutionContext.AddTagHelperAttribute("value", __Microsoft_AspNetCore_Mvc_TagHelpers_OptionTagHelper.Value, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(3003, 2, true);
                WriteLiteral("\r\n");
                EndContext();
#line 77 "F:\Hospital\Hospital\Pages\Shift.cshtml"
            }

#line default
#line hidden
            BeginContext(3028, 222, true);
            WriteLiteral("                </select>\r\n            </div>\r\n        </div>\r\n        <div>\r\n            <div>\r\n                <span>מספר חדר</span>\r\n                <div>\r\n                    <select class=\"select\" id=\"selectRoom\">\r\n\r\n");
            EndContext();
#line 87 "F:\Hospital\Hospital\Pages\Shift.cshtml"
            foreach (var p in data.SELECTRoom())
            {
#line default
#line hidden
                BeginContext(3340, 28, true);
                WriteLiteral("                            ");
                EndContext();
                BeginContext(3368, 64, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("option", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "5c76c919bd264c95b228b463d8b749f1", async() => {
                    BeginContext(3414, 9, false);
#line 89 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                    Write(p.misRoom);

#line default
#line hidden
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_OptionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.OptionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_OptionTagHelper);
                BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "code", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 89 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                AddHtmlAttributeValue("", 3382, p.misRoom, 3382, 10, false);

#line default
#line hidden
                EndAddHtmlAttributeValues(__tagHelperExecutionContext);
                BeginWriteTagHelperAttribute();
#line 89 "F:\Hospital\Hospital\Pages\Shift.cshtml"
                WriteLiteral(p.misRoom);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
                __Microsoft_AspNetCore_Mvc_TagHelpers_OptionTagHelper.Value = __tagHelperStringValueBuffer;
                __tagHelperExecutionContext.AddTagHelperAttribute("value", __Microsoft_AspNetCore_Mvc_TagHelpers_OptionTagHelper.Value, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(3432, 2, true);
                WriteLiteral("\r\n");
                EndContext();
#line 90 "F:\Hospital\Hospital\Pages\Shift.cshtml"
            }

#line default
#line hidden
            BeginContext(3461, 3203, true);
            WriteLiteral(@"                    </select>
                </div>

            </div>
        </div>
        <h4>
            <span> שעת התחלה</span> 
            <input id=""update4"" type=""time"">
        </h4>
        <h4>
            <span> שעת סיום</span>
            <input id=""update5"" type=""time"">
        </h4>
        <h4>
            <span>תאריך</span>  
            <input id=""update6"" type=""date"">
        </h4>

        <div id=""Act"">
            <span id=""deleteBtn"">עדכן</span>
            <span id=""cancelBtn"" onclick=""document.getElementById('upDateRow').classList.toggle('popupAct', false)"">בטל</span>
        </div>

    </div>
</div>
<div id=""linkInPages"">
    <a href=""AddShift"" id=""links"">| להוספת משמרת </a>
    <a href=""MakeShift"" id=""links"">| ליצירת משמרת |</a>
</div>
<script>
    document.getElementById(""deleteAll"").addEventListener('click', function (e) {
        var req = new XMLHttpRequest();
        req.open('POST', 'API/Shifts/DeleteShift', true);
        req.setRequestH");
            WriteLiteral(@"eader('Content-Type', 'application/json; charset=utf-8');
        document.getElementById('deleteRow').classList.toggle('popupAct', false);
        req.onload = function () {
            document.getElementById('table').innerHTML = '';
            if (req.responseText > 0)
                location.reload();
        }
        req.send(document.getElementById('delete').innerHTML);
    });
    document.getElementById(""deleteBtn"").addEventListener('click', function (e) {
        var data = {};
        data['codeShift'] = document.getElementById('update1').innerHTML;
        data['codeNurse'] = document.querySelector('#selectNurse').options[document.querySelector('#selectNurse').selectedIndex].getAttribute('code');
        data['codeRoom'] = document.querySelector('#selectRoom').options[document.querySelector('#selectRoom').selectedIndex].getAttribute('code');
        data['startTime'] = document.getElementById('update4').value;
        data['finishTime'] = document.getElementById('update5').value;
");
            WriteLiteral(@"
        data['date1'] = document.getElementById('update6').value;
        console.log(data);
        var req = new XMLHttpRequest();
        req.open('POST', 'API/Shifts/UpdateShift', true);
        req.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
        req.onload = function () {
            document.getElementById('upDateRow').classList.toggle('popupAct', false);
            location.reload();
        }
        req.send(JSON.stringify(data));
    });
    //document.querySelector('#select').addEventListener('change', function (e) {
    //    console.log(e);//האיבנט בעצמו
    //    console.log(e.target);//האלמנט עליו הופעל האיבנט
    //    console.log(e.target.options);//כל הערכים
    //    console.log(e.target.options[2]);//הערך השלישי
    //    console.log(e.target.selectedIndex);//מקום הפריט הנבחר
    //    console.log(e.target.options[e.target.selectedIndex]);//הפריט הנבחר
    //    console.log(e.target.options[e.target.selectedIndex].value);//שם הפריט הנבחר
  ");
            WriteLiteral("  //    console.log(e.target.options[e.target.selectedIndex].getAttribute(\"code\"));//האטריביוט של הפריט הנבחר\r\n    //});\r\n</script>");
            EndContext();
        }