예제 #1
0
        public async Task <ViewGroupDesc> GetGroupDesc(int GroupId)
        {
            Group group = await _main.GetById <Group>(GroupId);

            Department department = await _main.GetById <Department>(group.DepartmentId);

            ViewGroupDesc result = new ViewGroupDesc();

            result.Id          = group.Id;
            result.EduStart    = group.EduFrom;
            result.EduDuration = group.EduDuration;
            result.Name        = group.Name;

            if (group.CuratorId == 0)
            {
                result.CuratorName = "Куратор не указан";
            }
            else
            {
                try
                {
                    var teacher = (await _main.GetById <Teacher>(group.CuratorId));
                    result.CuratorName = teacher.FullName;
                    result.CuratorId   = teacher.Id;
                }
                catch (System.Exception)
                {
                    result.CuratorName = "Не найдено";
                }
            }
            if (group.HeadManId == 0)
            {
                result.HeadMan = "Староста не указан";
            }
            else
            {
                try
                {
                    result.HeadMan = (await _main.GetById <Student>(group.HeadManId)).FullName;
                }
                catch (System.Exception)
                {
                    result.HeadMan = "Не найдено";
                }
            }
            result.Department   = department.Name;
            result.Speciality   = group.Speciality;
            result.DepartmentId = department.Id;
            return(result);
        }
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
#line 1 "C:\Users\_qosh\Documents\C#\University\Views\Group\descSorted.cshtml"

            List <MonthReport> skips  = Model.Skips;
            List <int>         idList = Model.IdList;
            List <string>      names  = Model.Names;
            List <string>      bb     = Model.BB;
            ViewGroupDesc      desc   = Model.desc;

#line default
#line hidden
            DefineSection("reportBlock", async() => {
                BeginContext(221, 212, true);
                WriteLiteral("\r\n    <div id=\"navR\" style=\"float: right;\">\r\n        <a class=\"waves-effect waves-teal btn-flat\" onclick=\"Report()\" style=\"background-image: url(/Img/System/box_arrow_in_down_icon_160379.svg);\"></a>\r\n    </div>\r\n");
                EndContext();
            }
                          );
            BeginContext(436, 326, true);
            WriteLiteral(@"<div id=""students"""">
    <table class=""table table-hover"" >
        <thead>
            <tr>
                <th>Ф.И.О</th>
                <th>Без причины</th> 
                <th>По причине</th>
                <th>Итог</th>
                <th>Поддержка</th>
            </tr>
        </thead>
        <tbody>
");
            EndContext();
#line 25 "C:\Users\_qosh\Documents\C#\University\Views\Group\descSorted.cshtml"
            for (int i = 0; i < skips.Count(); i++)
            {
#line default
#line hidden
                BeginContext(813, 61, true);
                WriteLiteral("            <tr>\r\n                <td>\r\n                   <a");
                EndContext();
                BeginWriteAttribute("href", " href=\"", 874, "\"", 905, 2);
                WriteAttributeValue("", 881, "/Student/desc/", 881, 14, true);
#line 28 "C:\Users\_qosh\Documents\C#\University\Views\Group\descSorted.cshtml"
                WriteAttributeValue("", 895, idList[i], 895, 10, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(906, 2, true);
                WriteLiteral(" >");
                EndContext();
                BeginContext(909, 8, false);
#line 28 "C:\Users\_qosh\Documents\C#\University\Views\Group\descSorted.cshtml"
                Write(names[i]);

#line default
#line hidden
                EndContext();
                BeginContext(917, 49, true);
                WriteLiteral("</a>\r\n                </td>\r\n                <td>");
                EndContext();
                BeginContext(967, 14, false);
#line 30 "C:\Users\_qosh\Documents\C#\University\Views\Group\descSorted.cshtml"
                Write(skips[i].count);

#line default
#line hidden
                EndContext();
                BeginContext(981, 28, true);
                WriteLiteral("</td>\r\n                <td >");
                EndContext();
                BeginContext(1010, 16, false);
#line 31 "C:\Users\_qosh\Documents\C#\University\Views\Group\descSorted.cshtml"
                Write(skips[i].sreason);

#line default
#line hidden
                EndContext();
                BeginContext(1026, 27, true);
                WriteLiteral("</td>\r\n                <td>");
                EndContext();
                BeginContext(1054, 14, false);
#line 32 "C:\Users\_qosh\Documents\C#\University\Views\Group\descSorted.cshtml"
                Write(skips[i].total);

#line default
#line hidden
                EndContext();
                BeginContext(1068, 27, true);
                WriteLiteral("</td>\r\n                <td>");
                EndContext();
                BeginContext(1096, 5, false);
#line 33 "C:\Users\_qosh\Documents\C#\University\Views\Group\descSorted.cshtml"
                Write(bb[i]);

#line default
#line hidden
                EndContext();
                BeginContext(1101, 26, true);
                WriteLiteral("</td>\r\n            </tr>\r\n");
                EndContext();
#line 35 "C:\Users\_qosh\Documents\C#\University\Views\Group\descSorted.cshtml"
            }

#line default
#line hidden
            BeginContext(1139, 40, true);
            WriteLiteral("        </tbody>\r\n    </table>\r\n</div>\r\n");
            EndContext();
            DefineSection("Scripts", async() => {
                BeginContext(1196, 92, true);
                WriteLiteral("\r\n    <script>\r\n        $($(document).ready(() => {\r\n            $(\"#title\").html(\"Группа : ");
                EndContext();
                BeginContext(1289, 9, false);
#line 42 "C:\Users\_qosh\Documents\C#\University\Views\Group\descSorted.cshtml"
                Write(desc.Name);

#line default
#line hidden
                EndContext();
                BeginContext(1298, 92, true);
                WriteLiteral("\")\r\n        }))\r\n        function Report() {\r\n            var reportHref = \"/Skip/Report?Id=");
                EndContext();
                BeginContext(1391, 7, false);
#line 45 "C:\Users\_qosh\Documents\C#\University\Views\Group\descSorted.cshtml"
                Write(desc.Id);

#line default
#line hidden
                EndContext();
                BeginContext(1398, 9, true);
                WriteLiteral("&eduYear=");
                EndContext();
                BeginContext(1409, 37, false);
#line 45 "C:\Users\_qosh\Documents\C#\University\Views\Group\descSorted.cshtml"
                Write(DateTime.Now.Year - desc.EduStart + 1);

#line default
#line hidden
                EndContext();
                BeginContext(1447, 10, true);
                WriteLiteral("&semester=");
                EndContext();
                BeginContext(1458, 25, false);
#line 45 "C:\Users\_qosh\Documents\C#\University\Views\Group\descSorted.cshtml"
                Write(lib.Methods.GetSemestry());

#line default
#line hidden
                EndContext();
                BeginContext(1483, 11, true);
                WriteLiteral("&fromCount=");
                EndContext();
                BeginContext(1495, 10, false);
#line 45 "C:\Users\_qosh\Documents\C#\University\Views\Group\descSorted.cshtml"
                Write(Model.type);

#line default
#line hidden
                EndContext();
                BeginContext(1505, 441, true);
                WriteLiteral(@"""
            $.ajax({
                url: reportHref,
                beforeSend: () => {
                    M.toast({ html: ""Генерируется отчет"" })
                },
                success: () => {
                    $(location).attr(""href"", reportHref)
                },
                error: () => {
                    M.toast({ html: ""Ошибка в запросе"" })
                }
            })
        }
    </script>
");
                EndContext();
            }
                          );
        }
예제 #3
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
#line 1 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"

            List <MonthReport> skips  = Model.Skips;
            List <int>         idList = Model.IdList;
            List <string>      names  = Model.Names;
            List <string>      bb     = Model.BB;
            string             href   = $"/Skip/Report?id={@Model.desc.Id}&eduYear={DateTime.Now.Year - Model.desc.EduStart + 1}&semester={lib.Methods.GetSemestry()}";
            string             hrefY  = $"/Skip/Report?id={@Model.desc.Id}&eduYear={DateTime.Now.Year - Model.desc.EduStart + 1}&semester={lib.Methods.GetSemestry()}&fromCount=" + 16;
            string             hrefR  = $"/Skip/Report?id={@Model.desc.Id}&eduYear={DateTime.Now.Year - Model.desc.EduStart + 1}&semester={lib.Methods.GetSemestry()}&fromCount=" + 35;
            ViewGroupDesc      group  = Model.desc;
            int course = Model.EduYear;

#line default
#line hidden
            BeginContext(719, 4, true);
            WriteLiteral("\r\n\r\n");
            EndContext();
            DefineSection("reportBlock", async() => {
                BeginContext(745, 344, true);
                WriteLiteral(@"
    
    <div id=""navR"" style=""float: right;background-size: 80% 80%;"">


        <a class=""waves-effect waves-teal btn-flat"" data-toggle=""modal"" data-target=""#grMethodsModal"" style=""background-image: url(/Img/System/Edit_icon-icons.com_55921.svg);""></a>
        <a class=""waves-effect waves-teal btn-flat"" onclick=""Report()"" id=""report""");
                EndContext();
                BeginWriteAttribute("key", " key=\"", 1089, "\"", 1104, 1);
#line 20 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                WriteAttributeValue("", 1095, group.Id, 1095, 9, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginWriteAttribute("eduyear", " eduyear=\"", 1105, "\"", 1122, 1);
#line 20 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                WriteAttributeValue("", 1115, course, 1115, 7, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginWriteAttribute("semester", " semester=\"", 1123, "\"", 1149, 1);
#line 20 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                WriteAttributeValue("", 1134, Model.semester, 1134, 15, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(1150, 259, true);
                WriteLiteral(@" style=""background-image: url(/Img/System/box_arrow_in_down_icon_160379.svg);""></a> 
        <a class=""waves-effect waves-teal btn-flat"" data-toggle=""modal"" data-target=""#exampleModal"" style=""background-image: url(/Img/System/send1.svg);""></a>
    </div> 
");
                EndContext();
            }
                          );
            BeginContext(1412, 101, true);
            WriteLiteral("\r\n<style>\r\n    p{\r\n        font-size: 12px;\r\n    }\r\n</style>\r\n<div style=\"display: none;\" id=\"hidden\"");
            EndContext();
            BeginWriteAttribute("key", " key=\"", 1513, "\"", 1528, 1);
#line 30 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
            WriteAttributeValue("", 1519, group.Id, 1519, 9, false);

#line default
#line hidden
            EndWriteAttribute();
            BeginWriteAttribute("value", " value=\"", 1529, "\"", 1544, 1);
#line 30 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
            WriteAttributeValue("", 1537, course, 1537, 7, false);

#line default
#line hidden
            EndWriteAttribute();
            BeginWriteAttribute("ss", " ss=\"", 1545, "\"", 1565, 1);
#line 30 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
            WriteAttributeValue("", 1550, Model.semester, 1550, 15, false);

#line default
#line hidden
            EndWriteAttribute();
            BeginContext(1566, 371, true);
            WriteLiteral(@"></div>

<div id=""students"""">
    <table class=""table table-hover"" >
        <thead>
            <tr>
                <th>Ф.И.О</th>
                <th>Без причины</th> 
                <th>По причине</th>
                <th>Итог</th>
                <th>Поддержка</th>
                <th>Функции</th>
            </tr>
        </thead>
        <tbody>
");
            EndContext();
#line 45 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
            for (int i = 0; i < skips.Count(); i++)
            {
#line default
#line hidden
                BeginContext(1988, 62, true);
                WriteLiteral("            <tr>\r\n                <td>\r\n                    <a");
                EndContext();
                BeginWriteAttribute("href", " href=\"", 2050, "\"", 2081, 2);
                WriteAttributeValue("", 2057, "/Student/desc/", 2057, 14, true);
#line 48 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                WriteAttributeValue("", 2071, idList[i], 2071, 10, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(2082, 2, true);
                WriteLiteral(" >");
                EndContext();
                BeginContext(2085, 8, false);
#line 48 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                Write(names[i]);

#line default
#line hidden
                EndContext();
                BeginContext(2093, 49, true);
                WriteLiteral("</a>\r\n                </td>\r\n                <td>");
                EndContext();
                BeginContext(2143, 14, false);
#line 50 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                Write(skips[i].count);

#line default
#line hidden
                EndContext();
                BeginContext(2157, 28, true);
                WriteLiteral("</td>\r\n                <td >");
                EndContext();
                BeginContext(2186, 16, false);
#line 51 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                Write(skips[i].sreason);

#line default
#line hidden
                EndContext();
                BeginContext(2202, 27, true);
                WriteLiteral("</td>\r\n                <td>");
                EndContext();
                BeginContext(2230, 14, false);
#line 52 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                Write(skips[i].total);

#line default
#line hidden
                EndContext();
                BeginContext(2244, 27, true);
                WriteLiteral("</td>\r\n                <td>");
                EndContext();
                BeginContext(2272, 5, false);
#line 53 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                Write(bb[i]);

#line default
#line hidden
                EndContext();
                BeginContext(2277, 71, true);
                WriteLiteral("</td>\r\n                <td>\r\n                    <a class=\"addSReasonR\"");
                EndContext();
                BeginWriteAttribute("cc", " cc=\"", 2348, "\"", 2367, 1);
#line 55 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                WriteAttributeValue("", 2353, Model.EduYear, 2353, 14, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginWriteAttribute("value", " value=\"", 2368, "\"", 2385, 1);
#line 55 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                WriteAttributeValue("", 2376, names[i], 2376, 9, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginWriteAttribute("key", " key=", 2386, "", 2401, 1);
#line 55 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                WriteAttributeValue("", 2391, idList[i], 2391, 10, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(2401, 115, true);
                WriteLiteral(" data-toggle=\"modal\" data-target=\"#referenceModal\">Добавить справку</a>\r\n                </td>\r\n            </tr>\r\n");
                EndContext();
#line 58 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
            }

#line default
#line hidden
            BeginContext(2528, 1302, true);
            WriteLiteral(@"        </tbody>
    </table>
</div>




<!-- Modal -->
<div style=""background-color: rgb(80, 64, 64);position: absolute; top: 50px;height : 55%"" class=""modal fade"" id=""referenceModal"" tabindex=""-1"" role=""dialog"" aria-labelledby=""referenceModalLabel"" aria-hidden=""true"">
  <div class=""modal-dialog"" role=""document"">
    <div class=""modal-content"">
      <div class=""modal-header"">
        <h5 class=""modal-title"" id=""referModalTitle"">Форма для добавления справки </h5>
      </div>
      <div class=""modal-body"">
        <form id=""referModal"">
            
        </form>
      </div>
      <div class=""modal-footer"">
        <button type=""button"" class=""btn btn-secondary"" data-dismiss=""modal"">Закрыть</button>
        <button onclick=""sendRefer()"" id=""setSkip"" type=""button"" class=""btn btn-primary"">Отправить в базу</button>
      </div>
    </div>
  </div>
</div>

<div style=""background-color: rgb(80, 64, 64);position: absolute; top: 50px;height : max-content"" class=""modal fade"" id=""grMetho");
            WriteLiteral(@"dsModal"" tabindex=""-1"" role=""dialog"" aria-labelledby=""grMethodsModalLabel"" aria-hidden=""true"">
  <div class=""modal-dialog"" role=""document"">
    <div class=""modal-content"">
      <div class=""modal-header"">
        <h5 class=""modal-title"" id=""referModalTitle"">Методы группы : ");
            EndContext();
            BeginContext(3831, 10, false);
#line 90 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
            Write(group.Name);

#line default
#line hidden
            EndContext();
            BeginContext(3841, 123, true);
            WriteLiteral("</h5>\r\n      </div>\r\n      <div class=\"modal-body\">\r\n        <a class=\"waves-effect waves-light btn\" href=\'/Group/AddGroup/");
            EndContext();
            BeginContext(3965, 18, false);
#line 93 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
            Write(group.DepartmentId);

#line default
#line hidden
            EndContext();
            BeginContext(3983, 98, true);
            WriteLiteral("\'> Добавить новую группу</a>\r\n        <a class=\"waves-effect waves-light btn\" href=\'/Student/list/");
            EndContext();
            BeginContext(4082, 8, false);
#line 94 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
            Write(group.Id);

#line default
#line hidden
            EndContext();
            BeginContext(4090, 83, true);
            WriteLiteral("\'> Студенты</a>\r\n        <a class=\"waves-effect waves-light btn\" href=\'/Group/Edit/");
            EndContext();
            BeginContext(4174, 8, false);
#line 95 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
            Write(group.Id);

#line default
#line hidden
            EndContext();
            BeginContext(4182, 85, true);
            WriteLiteral("\'>Изменить</a> \r\n        <a class=\"waves-effect waves-light btn\" href=\'/Group/Remove/");
            EndContext();
            BeginContext(4268, 8, false);
#line 96 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
            Write(group.Id);

#line default
#line hidden
            EndContext();
            BeginContext(4276, 522, true);
            WriteLiteral(@"' >Удалить</a>
      </div>
      <div id=""content""></div>
    </div>
  </div>
</div>


<!-- Curator ModaL -->
<div style=""background-color: rgb(80, 64, 64);position: absolute; top: 50px;height : max-content"" class=""modal fade"" id=""CuratorModal"" tabindex=""-1"" role=""dialog"" aria-labelledby=""CuratorModalLabel"" aria-hidden=""true"">
  <div class=""modal-dialog"" role=""document"">
    <div class=""modal-content"">
      <div class=""modal-header"">
        <h5 class=""modal-title"" id=""referModalTitle"">Методы группы : ");
            EndContext();
            BeginContext(4799, 10, false);
#line 109 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
            Write(group.Name);

#line default
#line hidden
            EndContext();
            BeginContext(4809, 179, true);
            WriteLiteral("</h5>\r\n      </div>\r\n      <div class=\"modal-body\" id=\"CuratorBody\">\r\n        \r\n      </div>\r\n      <div id=\"content\"></div>\r\n    </div>\r\n  </div>\r\n</div>\r\n\r\n              \r\n\r\n \r\n");
            EndContext();
            DefineSection("footer", async() => {
                BeginContext(5004, 57, true);
                WriteLiteral("\r\n    \r\n    <footer style=\"display: inline;\">\r\n        \r\n");
                EndContext();
#line 126 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                if (Model.elder != null)
                {
#line default
#line hidden
                    BeginContext(5096, 50, true);
                    WriteLiteral("            <div style=\"float: left;\"id=\"cDir\" >\r\n");
                    EndContext();
                    BeginContext(5192, 18, true);
                    WriteLiteral("                <a");
                    EndContext();
                    BeginWriteAttribute("href", " href=\"", 5210, "\"", 5246, 2);
                    WriteAttributeValue("", 5217, "/Student/desc/", 5217, 14, true);
#line 129 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                    WriteAttributeValue("", 5231, Model.elder.Id, 5231, 15, false);

#line default
#line hidden
                    EndWriteAttribute();
                    BeginContext(5247, 14, true);
                    WriteLiteral(" > Староста : ");
                    EndContext();
                    BeginContext(5262, 20, false);
#line 129 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                    Write(Model.elder.FullName);

#line default
#line hidden
                    EndContext();
                    BeginContext(5282, 26, true);
                    WriteLiteral("</a>\r\n            </div>\r\n");
                    EndContext();
#line 131 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                }
                else
                {
#line default
#line hidden
                    BeginContext(5326, 107, true);
                    WriteLiteral("            <div style=\"float: left;\" >\r\n                <a  > Староста не указан</a>\r\n            </div>\r\n");
                    EndContext();
#line 135 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                }

#line default
#line hidden
                BeginContext(5444, 131, true);
                WriteLiteral("            <div style=\"float: right;\">\r\n                <form id=\"descByYear\" style=\"margin-right:25px;height: 16px;\"> Семестр :\r\n");
                EndContext();
#line 138 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                if (@Model.semester == 1)
                {
#line default
#line hidden
                    BeginContext(5623, 512, true);
                    WriteLiteral(@"                        <label >
                            <input name=""semester"" onclick=""setSemester(1)"" value=""1"" type=""radio"" checked  />
                            <span style=""font-size: 12px; color:#fff"">1</span>
                        </label>
                        <label >
                            <input name=""semester"" onclick=""setSemester(2)"" value=""2"" type=""radio""  />
                            <span style=""font-size: 12px; color:#fff"">2</span>
                        </label>
");
                    EndContext();
#line 147 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                }
                else
                {
#line default
#line hidden
                    BeginContext(6165, 512, true);
                    WriteLiteral(@"                        <label >
                            <input name=""semester"" onclick=""setSemester(1)"" value=""1"" type=""radio""  />
                            <span style=""font-size: 12px; color:#fff"">1</span>
                        </label>
                        <label >
                            <input name=""semester"" onclick=""setSemester(2)"" value=""2"" type=""radio"" checked  />
                            <span style=""font-size: 12px; color:#fff"">2</span>
                        </label>
");
                    EndContext();
#line 156 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                }

#line default
#line hidden
                BeginContext(6700, 163, true);
                WriteLiteral("                    \r\n                    <span style=\"margin-left: 40px;\">Курс :</span>\r\n                     \r\n                    <input type=\"hidden\" name=\"Id\"");
                EndContext();
                BeginWriteAttribute("value", " value=\"", 6863, "\"", 6880, 1);
#line 160 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                WriteAttributeValue("", 6871, group.Id, 6871, 9, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(6881, 3, true);
                WriteLiteral(">\r\n");
                EndContext();
#line 161 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                for (int i = 0; i < group.EduDuration; i++)
                {
                    if (course == i + 1)
                    {
#line default
#line hidden
                        BeginContext(7017, 114, true);
                        WriteLiteral("                            <label >\r\n                                <input name=\"eduYear\" onclick=\"descByYear()\"");
                        EndContext();
                        BeginWriteAttribute("value", " value=\"", 7131, "\"", 7145, 1);
#line 165 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                        WriteAttributeValue("", 7139, i + 1, 7139, 6, false);

#line default
#line hidden
                        EndWriteAttribute();
                        BeginContext(7146, 101, true);
                        WriteLiteral(" type=\"radio\" checked  />\r\n                                <span style=\"font-size: 12px; color:#fff\">");
                        EndContext();
                        BeginContext(7249, 3, false);
#line 166 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                        Write(i + 1);

#line default
#line hidden
                        EndContext();
                        BeginContext(7253, 47, true);
                        WriteLiteral("</span>\r\n                            </label>\r\n");
                        EndContext();
#line 168 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                    }
                    else
                    {
#line default
#line hidden
                        BeginContext(7334, 113, true);
                        WriteLiteral("                            <label>\r\n                                <input name=\"eduYear\" onclick=\"descByYear()\"");
                        EndContext();
                        BeginWriteAttribute("value", " value=\"", 7447, "\"", 7461, 1);
#line 170 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                        WriteAttributeValue("", 7455, i + 1, 7455, 6, false);

#line default
#line hidden
                        EndWriteAttribute();
                        BeginContext(7462, 93, true);
                        WriteLiteral(" type=\"radio\"  />\r\n                                <span style=\"font-size: 12px; color:#fff\">");
                        EndContext();
                        BeginContext(7557, 3, false);
#line 171 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                        Write(i + 1);

#line default
#line hidden
                        EndContext();
                        BeginContext(7561, 47, true);
                        WriteLiteral("</span>\r\n                            </label>\r\n");
                        EndContext();
#line 173 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                    }
                }

#line default
#line hidden
                BeginContext(7658, 74, true);
                WriteLiteral("                </form>\r\n            </div>\r\n        \r\n        </footer>\r\n");
                EndContext();
            }
                          );
            BeginContext(7735, 2, true);
            WriteLiteral("\r\n");
            EndContext();
            DefineSection("Scripts", async() => {
                BeginContext(7754, 39, true);
                WriteLiteral("\r\n    <script>\r\n        var semester = ");
                EndContext();
                BeginContext(7794, 25, false);
#line 183 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                Write(lib.Methods.GetSemestry());

#line default
#line hidden
                EndContext();
                BeginContext(7819, 608, true);
                WriteLiteral(@";
        function setSemester(index){
            semester = index;
            descByYear()
        }
        function descByYear() {
            var data = $(""#descByYear"").serializeArray();
            var href = ""/Group/desc?""
            data.forEach(el => {
                href += el.name + ""="" + el.value + ""&"";
            });
            $(location).attr(""href"", href.substr(0,href.length -1))
        }
        function initPage(){
            //getCuratorData
            $.ajax({
                url : `/Teacher/get`,
                type: ""GET"",
                data : {Id : ");
                EndContext();
                BeginContext(8428, 15, false);
#line 201 "C:\Users\_qosh\Documents\C#\University\Views\Group\desc.cshtml"
                Write(group.CuratorId);

#line default
#line hidden
                EndContext();
                BeginContext(8443, 2130, true);
                WriteLiteral(@"},
                success : data => {
                    try{
                        $(""#cDir"").prepend(`<a style=""margin-right:15px;margin-left:5px"" id=""CuratorLink"" data-toggle=""modal"" data-target=""#CuratorModal"" >  Куратор : ${data.fullName}</a>`);
                        $(""#CuratorBody"").append(`<p>Ф.И.О : ${data.fullName}</p>`)
                        $(""#CuratorBody"").append(`<p>Электронная почта : ${data.email}</p>`)
                        $(""#CuratorBody"").append(`<p>Номер телефона : ${data.phoneNumber}</p>`)
                    }catch(e){
                        print(e)
                    }
                },
                error : error => {
                    console.log(error)
                }
            })
        }
        function sendRefer(){
            
            var fd = new FormData;
            var data = $('#referModal').serializeArray();

            fd.append('files', $(""#files"").prop('files')[0]);
            $.each(data,function(){
                ");
                WriteLiteral(@"fd.append(this.name,this.value);

            });
             $.ajax({
                url: '/Skip/setSReason',
                data: fd,
                processData: false,
                contentType: false,
                type: 'POST',
                success: function (data) {
                    M.toast({html : data});
                }, error: data => {
                    M.toast({html : data});
                }
            }); 
        }
        function redirect(path){
            $.ajax({
                url: path,
                type: 'GET',
                success: () => {
                    $(""#grMethodsModal #content"").load(path);
                }, error: data => {
                    M.toast({html : data});
                }
            })
        }
        $($(document).ready(() => {
            initPage()
            Modal($(""#hidden"").attr(""key""), $(""#hidden"").attr(""value""))
        }))
    </script>
    <script src=""~/js/main.js"" asp-append-version=""tru");
                WriteLiteral("e\"></script>\r\n    <script src=\"~/js/desc.js\" asp-append-version=\"true\"></script>\r\n");
                EndContext();
            }
                          );
        }
예제 #4
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
#line 1 "C:\Users\_qosh\Documents\C#\University\Views\Student\list.cshtml"

            Student[]     students = Model.list;
            ViewGroupDesc group    = Model.group;

#line default
#line hidden
            BeginContext(85, 4, true);
            WriteLiteral("\r\n\r\n");
            EndContext();
            DefineSection("reportBlock", async() => {
                BeginContext(111, 152, true);
                WriteLiteral("\r\n    \r\n    <div id=\"navR\" style=\"float: right;background-size: 80% 80%;\">\r\n        <a  class=\"waves-effect waves-light btn\" style=\"width: max-content;\"");
                EndContext();
                BeginWriteAttribute("href", "  href=\'", 263, "\'", 300, 2);
                WriteAttributeValue("", 271, "/Student/AddStudent/", 271, 20, true);
#line 10 "C:\Users\_qosh\Documents\C#\University\Views\Student\list.cshtml"
                WriteAttributeValue("", 291, group.Id, 291, 9, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(301, 151, true);
                WriteLiteral(">Добавить студентов</a> \r\n\r\n        <a  class=\"waves-effect waves-light btn\"  style=\"background-image: url(/Img/System/Edit_icon-icons.com_55921.svg);\"");
                EndContext();
                BeginWriteAttribute("href", " href=\'", 452, "\'", 480, 2);
                WriteAttributeValue("", 459, "/Group/Edit/", 459, 12, true);
#line 12 "C:\Users\_qosh\Documents\C#\University\Views\Student\list.cshtml"
                WriteAttributeValue("", 471, group.Id, 471, 9, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(481, 31, true);
                WriteLiteral("></a> \r\n        \r\n    </div> \r\n");
                EndContext();
            }
                          );
            BeginContext(515, 384, true);
            WriteLiteral(@"

<table class=""table table-hover"" style=""margin-bottom: 50px"">
    <thead>
        <tr>
            <th>Ф.И.О</th>
            <th>Номер телефона</th>
            <th>Адрес</th>
            <th>Дата рождения</th>
            <th>Форма обучения</th>
            <th>Номер студенческого билета</th>
            <th>Поддержка </th>
        </tr>
    </thead>
    <tbody>
");
            EndContext();
#line 31 "C:\Users\_qosh\Documents\C#\University\Views\Student\list.cshtml"
            foreach (Student student in students)
            {
                string contract = student.Contract ? "Договорник" : "Бюджетник";
                var    date     = lib.Methods.date(student.Birthday.ToString());


#line default
#line hidden
                BeginContext(1109, 60, true);
                WriteLiteral("            <tr>\r\n                <td>\r\n                    ");
                EndContext();
                BeginContext(1169, 95, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "36ec4b47b2ef7025691d0edeed0ce8ab878161bc6834", async() => {
                    BeginContext(1244, 16, false);
#line 38 "C:\Users\_qosh\Documents\C#\University\Views\Student\list.cshtml"
                    Write(student.FullName);

#line default
#line hidden
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Controller = (string)__tagHelperAttribute_0.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_1.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
                if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
                {
                    throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-Id", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
                }
                BeginWriteTagHelperAttribute();
#line 38 "C:\Users\_qosh\Documents\C#\University\Views\Student\list.cshtml"
                WriteLiteral(student.Id);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["Id"] = __tagHelperStringValueBuffer;
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-Id", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["Id"], 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(1264, 46, true);
                WriteLiteral("\r\n                </td>\r\n                <td> ");
                EndContext();
                BeginContext(1311, 19, false);
#line 40 "C:\Users\_qosh\Documents\C#\University\Views\Student\list.cshtml"
                Write(student.PhoneNumber);

#line default
#line hidden
                EndContext();
                BeginContext(1330, 29, true);
                WriteLiteral(" </td>\r\n                <td> ");
                EndContext();
                BeginContext(1360, 15, false);
#line 41 "C:\Users\_qosh\Documents\C#\University\Views\Student\list.cshtml"
                Write(student.Address);

#line default
#line hidden
                EndContext();
                BeginContext(1375, 29, true);
                WriteLiteral(" </td>\r\n                <td> ");
                EndContext();
                BeginContext(1405, 4, false);
#line 42 "C:\Users\_qosh\Documents\C#\University\Views\Student\list.cshtml"
                Write(date);

#line default
#line hidden
                EndContext();
                BeginContext(1409, 29, true);
                WriteLiteral(" </td>\r\n                <td> ");
                EndContext();
                BeginContext(1439, 8, false);
#line 43 "C:\Users\_qosh\Documents\C#\University\Views\Student\list.cshtml"
                Write(contract);

#line default
#line hidden
                EndContext();
                BeginContext(1447, 29, true);
                WriteLiteral(" </td>\r\n                <td> ");
                EndContext();
                BeginContext(1477, 24, false);
#line 44 "C:\Users\_qosh\Documents\C#\University\Views\Student\list.cshtml"
                Write(student.RecordBookNumber);

#line default
#line hidden
                EndContext();
                BeginContext(1501, 29, true);
                WriteLiteral(" </td>\r\n                <td> ");
                EndContext();
                BeginContext(1531, 10, false);
#line 45 "C:\Users\_qosh\Documents\C#\University\Views\Student\list.cshtml"
                Write(student.BB);

#line default
#line hidden
                EndContext();
                BeginContext(1541, 27, true);
                WriteLiteral(" </td>\r\n            </tr>\r\n");
                EndContext();
#line 47 "C:\Users\_qosh\Documents\C#\University\Views\Student\list.cshtml"
            }

#line default
#line hidden
            BeginContext(1593, 22, true);
            WriteLiteral("    </tbody>\r\n</table>");
            EndContext();
        }