Beispiel #1
0
        public override void Execute()
        {
            #line 4 "..\..\Views\nvQLTapSu\Index.cshtml"

            ViewBag.Title = "Theo dõi tập sự";
            var      db   = new HRMDBEntities();
            var      All  = Request["All"] == "on";
            var      From = new Nullable <DateTime>();
            var      To   = new Nullable <DateTime>();
            DateTime date;
            if (DateTime.TryParse(Request["From"], out date))
            {
                From = date;
            }
            if (DateTime.TryParse(Request["To"], out date))
            {
                To = date;
            }
            var Download = Request["Download"] == "OK";
            var Database = new List <nvQTLamViec>();



            #line default
            #line hidden
            WriteLiteral("\r\n<div style=\"margin-top:-20px;left:0;position:absolute\">\r\n");



            #line 20 "..\..\Views\nvQLTapSu\Index.cshtml"
            Write(Html.StatusMessage(TempData["Message"]));


            #line default
            #line hidden
            WriteLiteral("\r\n");



            #line 21 "..\..\Views\nvQLTapSu\Index.cshtml"

            var error = db.nvQLTapSu.Where(ts => !ts.ThoiGianDenHan.HasValue);
            if (error.Count() > 0)
            {
            #line default
            #line hidden
                WriteLiteral("        <p class=\"message-error\">Có ");



            #line 25 "..\..\Views\nvQLTapSu\Index.cshtml"
                Write(error.Count());


            #line default
            #line hidden
                WriteLiteral(" trường hợp chưa có thời gian đến hạn!</p>\r\n");



            #line 26 "..\..\Views\nvQLTapSu\Index.cshtml"
            }



            #line default
            #line hidden


            #line 28 "..\..\Views\nvQLTapSu\Index.cshtml"
            using (Html.BeginForm("Index", "nvQLTapSu", FormMethod.Get, new { id = "Filter" }))
            {
            #line default
            #line hidden
                WriteLiteral("    <input type=\"datetime\" name=\"From\" title=\"Từ ngày\" value=\"");



            #line 30 "..\..\Views\nvQLTapSu\Index.cshtml"
                Write(From);


            #line default
            #line hidden
                WriteLiteral("\" />\r\n");



                WriteLiteral("    <input type=\"datetime\" name=\"To\" title=\"Đến ngày\" value=\"");



            #line 31 "..\..\Views\nvQLTapSu\Index.cshtml"
                Write(To);


            #line default
            #line hidden
                WriteLiteral("\" />\r\n");



                WriteLiteral("    <input type=\"checkbox\" name=\"All\" ");



            #line 32 "..\..\Views\nvQLTapSu\Index.cshtml"
                Write(All ? "checked" : "");


            #line default
            #line hidden
                WriteLiteral("><span>Tất cả</span></input>\r\n");



                WriteLiteral("    <input type=\"submit\" value=\"Filter\" />\r\n");



                WriteLiteral("    <a href=\"~/QLTTNhanSu/nvQLTapSu?From=");



            #line 34 "..\..\Views\nvQLTapSu\Index.cshtml"
                Write(Request["From"]);


            #line default
            #line hidden
                WriteLiteral("&To=");



            #line 34 "..\..\Views\nvQLTapSu\Index.cshtml"
                Write(Request["To"]);


            #line default
            #line hidden
                WriteLiteral("&All=");



            #line 34 "..\..\Views\nvQLTapSu\Index.cshtml"
                Write(Request["All"]);


            #line default
            #line hidden
                WriteLiteral("&Download=OK\" title=\"Download\"><img src=\"~/images/excel.gif\" /></a>\r\n");



                WriteLiteral("    <span>&nbsp;Tìm kiếm</span>");



                WriteLiteral("<input id=\"TimKiem\" type=\"text\" />\r\n");



            #line 36 "..\..\Views\nvQLTapSu\Index.cshtml"
            }


            #line default
            #line hidden
            WriteLiteral(@"<table id=""nvQLTapSu"" class=""tableWithFloatingHeader"">
<thead><tr>
    <th nowrap>Họ và tên</th>
    <th nowrap>Đơn vị</th>
    <th style=""text-align:center"" nowrap>Thời gian<br />tuyển dụng</th>
    <th style=""text-align:center"" nowrap>Chức danh<br />chuyên môn</th>
    <th style=""text-align:center"" nowrap>Thời gian<br />bắt đầu</th>
    <th style=""text-align:center"" nowrap>Thời gian<br />đến hạn</th>
    <th style=""text-align:center"" nowrap>Thời gian<br />kết thúc</th>
    <th style=""text-align:center"" nowrap data-tip=""Tháng làm việc"">T</th>
    <th style=""text-align:center"" nowrap>Ngày<br />thông báo</th>
    <th style=""text-align:center"" nowrap>Ngày nhận<br />hồ sơ</th>
    <th style=""text-align:center"" nowrap>Ngày lập<br />tờ trình</th>
    <th title=""Bồi dưỡng nghiệp vụ sư phạm"" nowrap>BDNVSP</th>
    <th title=""Lý luận dạy học đại học"" nowrap>LLDHĐH</th>
    <th nowrap></th>
</tr></thead>
<tbody>
");



            #line 55 "..\..\Views\nvQLTapSu\Index.cshtml"
            var Distinct = new HashSet <int>();


            #line default
            #line hidden


            #line 56 "..\..\Views\nvQLTapSu\Index.cshtml"
            foreach (var nv in db.nvQLTapSu.OrderBy(ts => ts.CongTac.ThoiGianKetThuc.HasValue ? new Nullable <DateTime>(DateTime.MaxValue) : ts.ThoiGianDenHan).Select(ts => ts.CongTac.NhanVien))
            {
                if (!Distinct.Add(nv.id))
                {
                    continue;
                }
                var cts = db.nvQTLamViec.Where(ct => ct.NV_id == nv.id).OrderBy(ct => ct.ThoiGianBatDau)
                          .Where(ct => ct.nvQLTapSus.Count > 0) // have managed TapSu
                          .Where(ct => !ct.ThoiGianKetThuc.HasValue || All)
                          .Where(ct => ct.nvQLTapSus.FirstOrDefault().ThoiGianDenHan >= From || !From.HasValue)
                          .Where(ct => ct.nvQLTapSus.FirstOrDefault().ThoiGianDenHan <= To || !To.HasValue);
                if (cts.Count() == 0)
                {
                    continue;
                }
                else
                {
                    Database.AddRange(cts);
                }
                using (Html.BeginForm("Update", "nvQLTapSu", new { From = From.HasValue ? From.Value.ToShortDateString() : "", To = To.HasValue ? To.Value.ToShortDateString() : "", All = All ? "on" : "" }))
                {
                    ViewData.TemplateInfo.HtmlFieldPrefix = null;


            #line default
            #line hidden

            #line 69 "..\..\Views\nvQLTapSu\Index.cshtml"
                    Write(Html.Hidden("NV_id", nv.id));


            #line default
            #line hidden

            #line 69 "..\..\Views\nvQLTapSu\Index.cshtml"

                    var nvPrefix = "" + nv.id;
                    var first    = true;
                    foreach (var ct in cts)
                    {
                        var ctPrefix = nvPrefix + "." + ct.id;


            #line default
            #line hidden
                        WriteLiteral("<tr id=\"");



            #line 75 "..\..\Views\nvQLTapSu\Index.cshtml"
                        Write(nv.id);


            #line default
            #line hidden
                        WriteLiteral("\">\r\n");



            #line 76 "..\..\Views\nvQLTapSu\Index.cshtml"
                        ViewData.TemplateInfo.HtmlFieldPrefix = null;


            #line default
            #line hidden
                        WriteLiteral("    ");



            #line 77 "..\..\Views\nvQLTapSu\Index.cshtml"
                        Write(Html.Hidden("CT_id", ct.id));


            #line default
            #line hidden
                        WriteLiteral("\r\n");



            #line 78 "..\..\Views\nvQLTapSu\Index.cshtml"
                        if (first)
                        {
            #line default
            #line hidden
                            WriteLiteral("    <td rowspan=");



            #line 80 "..\..\Views\nvQLTapSu\Index.cshtml"
                            Write(cts.Count());


            #line default
            #line hidden
                            WriteLiteral(" nowrap>\r\n        ");



            #line 81 "..\..\Views\nvQLTapSu\Index.cshtml"
                            Write(Html.ActionLink(nv.nvSoYeuLyLiches.Single().HoVaTen, "Details", "HSNhanSu", new { id = nv.id, tab = "QTCongTac" }, null));


            #line default
            #line hidden
                            WriteLiteral("\r\n    </td>\r\n");



            #line 83 "..\..\Views\nvQLTapSu\Index.cshtml"
                        }


            #line default
            #line hidden
                        WriteLiteral("    <td nowrap>\r\n");



            #line 85 "..\..\Views\nvQLTapSu\Index.cshtml"
                        if (ct.DonVi != null)
                        {
            #line default
            #line hidden
                            WriteLiteral("            <mark data-tip=\"");



            #line 87 "..\..\Views\nvQLTapSu\Index.cshtml"
                            Write(ct.DonVi.tenDonVi);


            #line default
            #line hidden
                            WriteLiteral("\">");



            #line 87 "..\..\Views\nvQLTapSu\Index.cshtml"
                            Write(ct.DonVi.maDonVi);


            #line default
            #line hidden
                            WriteLiteral("</mark>\r\n");



            #line 88 "..\..\Views\nvQLTapSu\Index.cshtml"
                        }


            #line default
            #line hidden
                        WriteLiteral("    </td>\r\n");



            #line 90 "..\..\Views\nvQLTapSu\Index.cshtml"
                        if (first)
                        {
            #line default
            #line hidden
                            WriteLiteral("    <td rowspan=");



            #line 92 "..\..\Views\nvQLTapSu\Index.cshtml"
                            Write(cts.Count());


            #line default
            #line hidden
                            WriteLiteral(" nowrap>\r\n");



            #line 93 "..\..\Views\nvQLTapSu\Index.cshtml"
                            if (nv.nvSoYeuLyLiches.Single().NgayTuyenDung.HasValue)
                            {
            #line default
            #line hidden

            #line 95 "..\..\Views\nvQLTapSu\Index.cshtml"
                                Write(nv.nvSoYeuLyLiches.Single().NgayTuyenDung.Value.ToShortDateString());


            #line default
            #line hidden

            #line 95 "..\..\Views\nvQLTapSu\Index.cshtml"
                            }


            #line default
            #line hidden
                            WriteLiteral("    </td>\r\n");



            #line 98 "..\..\Views\nvQLTapSu\Index.cshtml"
                        }


            #line default
            #line hidden
                        WriteLiteral("    <td nowrap>\r\n");



            #line 100 "..\..\Views\nvQLTapSu\Index.cshtml"
                        if (ct.ChucDanhChuyenMon != null)
                        {
            #line default
            #line hidden

            #line 102 "..\..\Views\nvQLTapSu\Index.cshtml"
                            Write(ct.ChucDanhChuyenMon.tenChucDanhChuyenMon);


            #line default
            #line hidden

            #line 102 "..\..\Views\nvQLTapSu\Index.cshtml"
                        }


            #line default
            #line hidden
                        WriteLiteral("    </td>\r\n    <td nowrap>\r\n        <span id=\"ThoiGianBatDau\">\r\n        //if (ct." +
                                     "ThoiGianBatDau.HasValue)\r\n        {\r\n            ");



            #line 109 "..\..\Views\nvQLTapSu\Index.cshtml"
                        Write(ct.ThoiGianBatDau.ToShortDateString());


            #line default
            #line hidden
                        WriteLiteral("\r\n        }\r\n        </span>\r\n    </td>\r\n    <td nowrap ");



            #line 113 "..\..\Views\nvQLTapSu\Index.cshtml"
                        Write(ct.nvQLTapSus.Single().ThoiGianDenHan.HasValue ? "" : "style=background:yellow");


            #line default
            #line hidden
                        WriteLiteral(">\r\n<span id=\"View\">\r\n");



            #line 115 "..\..\Views\nvQLTapSu\Index.cshtml"
                        if (ct.nvQLTapSus.Single().ThoiGianDenHan.HasValue)
                        {
            #line default
            #line hidden

            #line 117 "..\..\Views\nvQLTapSu\Index.cshtml"
                            Write(ct.nvQLTapSus.Single().ThoiGianDenHan.Value.ToShortDateString());


            #line default
            #line hidden

            #line 117 "..\..\Views\nvQLTapSu\Index.cshtml"
                        }


            #line default
            #line hidden
                        WriteLiteral("</span>\r\n<span id=\"Edit\">\r\n");



            #line 121 "..\..\Views\nvQLTapSu\Index.cshtml"
                        ViewData.TemplateInfo.HtmlFieldPrefix = ctPrefix;


            #line default
            #line hidden
                        WriteLiteral("        ");



            #line 122 "..\..\Views\nvQLTapSu\Index.cshtml"
                        Write(Html.EditorFor(model => ct.nvQLTapSus.Single().ThoiGianDenHan));


            #line default
            #line hidden
                        WriteLiteral("\r\n        ");



            #line 123 "..\..\Views\nvQLTapSu\Index.cshtml"
                        Write(Html.ValidationMessageFor(model => ct.nvQLTapSus.Single().ThoiGianDenHan));


            #line default
            #line hidden
                        WriteLiteral("\r\n</span>\r\n    </td>\r\n    <td nowrap>\r\n");



            #line 127 "..\..\Views\nvQLTapSu\Index.cshtml"
                        if (ct.ThoiGianKetThuc.HasValue)
                        {
            #line default
            #line hidden

            #line 129 "..\..\Views\nvQLTapSu\Index.cshtml"
                            Write(ct.ThoiGianKetThuc.Value.ToShortDateString());


            #line default
            #line hidden

            #line 129 "..\..\Views\nvQLTapSu\Index.cshtml"
                        }


            #line default
            #line hidden
                        WriteLiteral("    </td>\r\n    <td>\r\n        <mark><sup data-tip=\"");



            #line 133 "..\..\Views\nvQLTapSu\Index.cshtml"
                        Write(TinhThamNien.Ti1nh(ct.ThoiGianBatDau, ct.ThoiGianKetThuc));


            #line default
            #line hidden
                        WriteLiteral("\">");



            #line 133 "..\..\Views\nvQLTapSu\Index.cshtml"
                        Write(ct.ThoiGianKetThuc.HasValue ? (int)((ct.ThoiGianKetThuc.Value - ct.ThoiGianBatDau).Days / (365.25 / 12) + 0.5) : (int)((DateTime.Now - ct.ThoiGianBatDau).Days / (365.25 / 12) + 0.5));


            #line default
            #line hidden
                        WriteLiteral("</sup></mark>\r\n    </td>\r\n    <td nowrap>\r\n<span id=\"View\">\r\n");



            #line 137 "..\..\Views\nvQLTapSu\Index.cshtml"
                        if (ct.nvQLTapSus.Single().NgayThongBao.HasValue)
                        {
            #line default
            #line hidden

            #line 139 "..\..\Views\nvQLTapSu\Index.cshtml"
                            Write(ct.nvQLTapSus.Single().NgayThongBao.Value.ToShortDateString());


            #line default
            #line hidden

            #line 139 "..\..\Views\nvQLTapSu\Index.cshtml"
                        }


            #line default
            #line hidden
                        WriteLiteral("</span>\r\n<span id=\"Edit\">\r\n");



            #line 143 "..\..\Views\nvQLTapSu\Index.cshtml"
                        ViewData.TemplateInfo.HtmlFieldPrefix = ctPrefix;


            #line default
            #line hidden
                        WriteLiteral("        ");



            #line 144 "..\..\Views\nvQLTapSu\Index.cshtml"
                        Write(Html.EditorFor(model => ct.nvQLTapSus.Single().NgayThongBao));


            #line default
            #line hidden
                        WriteLiteral("\r\n        ");



            #line 145 "..\..\Views\nvQLTapSu\Index.cshtml"
                        Write(Html.ValidationMessageFor(model => ct.nvQLTapSus.Single().NgayThongBao));


            #line default
            #line hidden
                        WriteLiteral("\r\n</span>\r\n    </td>\r\n    <td nowrap>\r\n<span id=\"View\">\r\n");



            #line 150 "..\..\Views\nvQLTapSu\Index.cshtml"
                        if (ct.nvQLTapSus.Single().NgayNhanHoSo.HasValue)
                        {
            #line default
            #line hidden

            #line 152 "..\..\Views\nvQLTapSu\Index.cshtml"
                            Write(ct.nvQLTapSus.Single().NgayNhanHoSo.Value.ToShortDateString());


            #line default
            #line hidden

            #line 152 "..\..\Views\nvQLTapSu\Index.cshtml"
                        }


            #line default
            #line hidden
                        WriteLiteral("</span>\r\n<span id=\"Edit\">\r\n");



            #line 156 "..\..\Views\nvQLTapSu\Index.cshtml"
                        ViewData.TemplateInfo.HtmlFieldPrefix = ctPrefix;


            #line default
            #line hidden
                        WriteLiteral("        ");



            #line 157 "..\..\Views\nvQLTapSu\Index.cshtml"
                        Write(Html.EditorFor(model => ct.nvQLTapSus.Single().NgayNhanHoSo));


            #line default
            #line hidden
                        WriteLiteral("\r\n        ");



            #line 158 "..\..\Views\nvQLTapSu\Index.cshtml"
                        Write(Html.ValidationMessageFor(model => ct.nvQLTapSus.Single().NgayNhanHoSo));


            #line default
            #line hidden
                        WriteLiteral("\r\n</span>\r\n    </td>\r\n    <td nowrap>\r\n<span id=\"View\">\r\n");



            #line 163 "..\..\Views\nvQLTapSu\Index.cshtml"
                        if (ct.nvQLTapSus.First().NgayLapToTrinh.HasValue)
                        {
            #line default
            #line hidden

            #line 165 "..\..\Views\nvQLTapSu\Index.cshtml"
                            Write(ct.nvQLTapSus.First().NgayLapToTrinh.Value.ToShortDateString());


            #line default
            #line hidden

            #line 165 "..\..\Views\nvQLTapSu\Index.cshtml"
                        }


            #line default
            #line hidden
                        WriteLiteral("</span>\r\n<span id=\"Edit\">\r\n");



            #line 169 "..\..\Views\nvQLTapSu\Index.cshtml"
                        ViewData.TemplateInfo.HtmlFieldPrefix = ctPrefix;


            #line default
            #line hidden
                        WriteLiteral("        ");



            #line 170 "..\..\Views\nvQLTapSu\Index.cshtml"
                        Write(Html.EditorFor(model => ct.nvQLTapSus.Single().NgayLapToTrinh));


            #line default
            #line hidden
                        WriteLiteral("\r\n        ");



            #line 171 "..\..\Views\nvQLTapSu\Index.cshtml"
                        Write(Html.ValidationMessageFor(model => ct.nvQLTapSus.Single().NgayLapToTrinh));


            #line default
            #line hidden
                        WriteLiteral("\r\n</span>\r\n    </td>\r\n");



            #line 174 "..\..\Views\nvQLTapSu\Index.cshtml"
                        if (first)
                        {
            #line default
            #line hidden
                            WriteLiteral("    <td align=center rowspan=");



            #line 176 "..\..\Views\nvQLTapSu\Index.cshtml"
                            Write(cts.Count());


            #line default
            #line hidden
                            WriteLiteral(" nowrap>\r\n");



            #line 177 "..\..\Views\nvQLTapSu\Index.cshtml"
                            if (nv.ChungChis.Where(cc => cc.dmLoaichungchi.maLoaiChungChi == "NV").Count() > 0)
                            {
            #line default
            #line hidden

            #line 179 "..\..\Views\nvQLTapSu\Index.cshtml"
                                Write(Html.ActionLink("X", "Details", "HSNhanSu", new { id = nv.id, tab = "QTCongHocTap" }, null));


            #line default
            #line hidden

            #line 179 "..\..\Views\nvQLTapSu\Index.cshtml"
                            }


            #line default
            #line hidden
                            WriteLiteral("    </td>\r\n");



                            WriteLiteral("    <td align=center rowspan=");



            #line 182 "..\..\Views\nvQLTapSu\Index.cshtml"
                            Write(cts.Count());


            #line default
            #line hidden
                            WriteLiteral(" nowrap>\r\n");



            #line 183 "..\..\Views\nvQLTapSu\Index.cshtml"
                            if (nv.ChungChis.Where(cc => cc.dmLoaichungchi.maLoaiChungChi == "LL").Count() > 0)
                            {
            #line default
            #line hidden

            #line 185 "..\..\Views\nvQLTapSu\Index.cshtml"
                                Write(Html.ActionLink("X", "Details", "HSNhanSu", new { id = nv.id, tab = "QTCongHocTap" }, null));


            #line default
            #line hidden

            #line 185 "..\..\Views\nvQLTapSu\Index.cshtml"
                            }


            #line default
            #line hidden
                            WriteLiteral("    </td>\r\n");



                            WriteLiteral("    <td rowspan=");



            #line 188 "..\..\Views\nvQLTapSu\Index.cshtml"
                            Write(cts.Count());


            #line default
            #line hidden
                            WriteLiteral(@">
        <input type=""submit"" style=""position:absolute;left:-9999px"" />
        <a title=""Sửa"" id=""Edit""><span class=""ui-icon ui-icon-pencil"" style=""display:inline-block""/></a>
        <a title=""Lưu"" id=""Save"" hidden><span class=""ui-icon ui-icon-disk"" style=""display:inline-block""/></a>
    </td>
");



            #line 193 "..\..\Views\nvQLTapSu\Index.cshtml"
                        }


            #line default
            #line hidden
                        WriteLiteral("</tr>\r\n");



            #line 195 "..\..\Views\nvQLTapSu\Index.cshtml"
                        first = false;
                    }
                }
            }


            #line default
            #line hidden
            WriteLiteral("</tbody>\r\n</table>\r\n</div>\r\n\r\n");



            #line 203 "..\..\Views\nvQLTapSu\Index.cshtml"
            if (Download)
            {
            #line default
            #line hidden

            #line 205 "..\..\Views\nvQLTapSu\Index.cshtml"
                Write(Html.Partial("Download", Database));


            #line default
            #line hidden

            #line 205 "..\..\Views\nvQLTapSu\Index.cshtml"
            }


            #line default
            #line hidden
            WriteLiteral(@"
<style>
td { padding: 0 }
.ui-state-hover { font-weight: normal !important }
</style>

<script src=""~/Scripts/datatables/DataTableFixedHeader.js""></script>

<script>
    $().ready(function () {
        $(""body"").block();
        var table$ = $(""#nvQLTapSu"");
        table$.find(""th"").each(function () {
            $(this).addClass(""ui-state-default"");
        });
        table$.find(""td"").each(function () {
            $(this).addClass(""ui-widget-content"");
        });
        table$.find(""tr"").hover(function () {
            $(this).children(""td"").addClass(""ui-state-hover"");
        }, function () {
            $(this).children(""td"").removeClass(""ui-state-hover"");
        });
        table$.find(""tr"").click(function () {
            $(this).children(""td"").toggleClass(""ui-state-highlight"");
        });
        table$.find(""tr[id=");



            #line 233 "..\..\Views\nvQLTapSu\Index.cshtml"
            Write(TempData["NV_id"]);


            #line default
            #line hidden
            WriteLiteral("]\").children(\"td\").toggleClass(\"ui-state-highlight\");\r\n        $(\"#TimKiem\").on(\"" +
                         "input\", function () {\r\n            var search = $(this).val();\r\n            sear" +
                         "ch = unVietnamese(search).toLowerCase();\r\n            var rows = table$.find(\"tr" +
                         "[id^=]\");\r\n            for (var i = 0; i < rows.length; i++) {\r\n                " +
                         "var row = $(rows[i]);\r\n                var col = $(row.find(\"td\")[0]);\r\n        " +
                         "        var datarow = col.text();\r\n                datarow = unVietnamese(dataro" +
                         "w).toLowerCase();\r\n                var display = datarow.indexOf(search) == -1 ?" +
                         " \"none\" : \"table-row\";\r\n                for (var j = col.attr(\"rowspan\"); j > 0;" +
                         " j--, i++) {\r\n                    row = $(rows[i]);\r\n                    row.css" +
                         "(\"display\", display);\r\n                } i--;\r\n            }\r\n        });\r\n     " +
                         "   table$.find(\"span[id=Edit]\").prop(\"hidden\", true);\r\n        table$.find(\"inpu" +
                         "t[type=datetime]\").css(\"width\", \"80px\")\r\n              .css(\"border\", \"0\").css(\"" +
                         "border-bottom\", \"1px dotted\")\r\n              .datepicker({ changeMonth: true, ch" +
                         "angeYear: true })\r\n              .css(\"font-size\", \"1.1em\").css(\"margin\", \"0\").c" +
                         "ss(\"padding\", \"0\");\r\n        table$.find(\"a[id=Edit]\").on(\"click\", function () {" +
                         "\r\n            var row = $(this).parents(\"tr\");\r\n            do {\r\n              " +
                         "  row.find(\"span[id=View]\").prop(\"hidden\", true);\r\n                row.find(\"spa" +
                         "n[id=Edit]\").prop(\"hidden\", false);\r\n                row = row.next(\"tr\");\r\n    " +
                         "        } while (row.length > 0)\r\n            $(this).prop(\"hidden\", true).next(" +
                         "\"a\").prop(\"hidden\", false);\r\n            return false;\r\n        });\r\n        tab" +
                         "le$.find(\"a[id=Save]\").on(\"click\", function () {\r\n            $(\"body\").block();" +
                         "\r\n            $(this).parents(\"tr\").prev(\"input\").prev(\"form\").submit();\r\n      " +
                         "      return false;\r\n        });\r\n        if (\"");



            #line 270 "..\..\Views\nvQLTapSu\Index.cshtml"
            Write(TempData["NV_id"]);


            #line default
            #line hidden
            WriteLiteral("\".length > 0)\r\n            $(\"html, body\").animate({\r\n                scrollTop: " +
                         "$(\"tr[id=");



            #line 272 "..\..\Views\nvQLTapSu\Index.cshtml"
            Write(TempData["NV_id"]);


            #line default
            #line hidden
            WriteLiteral("]\").offset().top - 100\r\n            }, 2000);\r\n        $(\"#Filter\").find(\"input[t" +
                         "ype=datetime]\").css(\"width\", \"80px\")\r\n            .datepicker({ changeMonth: tru" +
                         "e, changeYear: true });\r\n        //$(\"table.tableWithFloatingHeader\").stickyTabl" +
                         "eHeaders();\r\n\r\n        var header = new FixedHeader(document.getElementById(\"nvQ" +
                         "LTapSu\"));\r\n        //header.fnGetSettings().aoCache[0].sType = \"fixedFooter\";\r\n" +
                         "        //header._fnUpdatePositions();\r\n\r\n        $(\"body\").unblock(); $(\"footer" +
                         "\").hide();\r\n\r\n        \r\n        var nDiv = document.createElement(\"input\");\r\n   " +
                         "     nDiv.style.position = \"absolute\";\r\n\t\tnDiv.style.top = \"0px\";\r\n\t\tnDiv.style." +
                         "left = \"0px\";\r\n        nDiv.style.width = \"80px\";\r\n        nDiv.style.margin = \"" +
                         "0\";\r\n        nDiv.style.padding = \"0\";\r\n        nDiv.className = \"Utility\";\r\n   " +
                         "     document.body.appendChild(nDiv);\r\n        var oDiv = undefined;\r\n        $(" +
                         "nDiv).hide().on(\"click\", function() {\r\n            if ($(this).val() == \"Số thán" +
                         "g\")\r\n                $(this).val(\"\");\r\n        }).on(\"input\", function() {\r\n    " +
                         "        var mons = parseInt($(this).val());\r\n            if (mons > 0) {\r\n      " +
                         "          var data = $.trim($(this).prop(\"base\")).split(\'/\');\r\n                v" +
                         "ar dd = parseInt(data[0], 10);\r\n                var mm = parseInt(data[1], 10);\r" +
                         "\n                var yyyy = parseInt(data[2], 10);\r\n                var date = n" +
                         "ew Date(yyyy, mm - 1, dd);\r\n                date = new Date(date.setMonth(date.g" +
                         "etMonth() + mons));\r\n                oDiv.val(date.getDate() + \"/\" + (date.getMo" +
                         "nth()+1) + \"/\" + date.getFullYear());\r\n            }\r\n        }).on(\"focusout\", " +
                         "function() { $(this).hide(); });\r\n        $(\"input[name$=ThoiGianDenHan]\").on(\"f" +
                         "ocusin\", function() {\r\n            oDiv = $(this);\r\n            $(\".Utility\").cs" +
                         "s(\"top\", $(this).offset().top);\r\n            $(\".Utility\").css(\"left\", $(this).o" +
                         "ffset().left-$(\".Utility\").width());\r\n            $(\".Utility\").prop(\"base\", $(t" +
                         "his).parents(\"tr\").find(\"#ThoiGianBatDau\").text());\r\n            $(\".Utility\").v" +
                         "al(\"Số tháng\").show();\r\n        });\r\n    });/*\r\n    function UpdateTableHeaders(" +
                         ") {\r\n        $(\"div.divTableWithFloatingHeader\").each(function() {\r\n            " +
                         "var originalHeaderRow = $(\".tableFloatingHeaderOriginal\", this);\r\n            va" +
                         "r floatingHeaderRow = $(\".tableFloatingHeader\", this);\r\n            var offset =" +
                         " $(this).offset();\r\n            var scrollTop = $(window).scrollTop();\r\n        " +
                         "    if ((scrollTop > offset.top) && (scrollTop < offset.top + $(this).height()))" +
                         " {\r\n                floatingHeaderRow.css(\"visibility\", \"visible\");\r\n           " +
                         "     floatingHeaderRow.css(\"top\", Math.min(scrollTop - offset.top, $(this).heigh" +
                         "t() - floatingHeaderRow.height()) + \"px\");\r\n\r\n                var totalWidth = 0" +
                         ";\r\n                // Copy cell widths from original header\r\n                $(\"" +
                         "th\", floatingHeaderRow).each(function(index) {\r\n                    var cellWidt" +
                         "h = $(\"th\", originalHeaderRow).eq(index).css(\'width\');\r\n                    cell" +
                         "Width = parseInt(cellWidth.replace(\"px\", \"\")) + 3;\r\n                    totalWid" +
                         "th += cellWidth;\r\n                    $(this).css(\'width\', \"\" + cellWidth + \"px\"" +
                         ");\r\n                });\r\n\r\n                // Copy row width from whole table\r\n " +
                         "               floatingHeaderRow.css(\"width\", totalWidth + \"px\");//(this).css(\"w" +
                         "idth\");\r\n            }\r\n            else {\r\n                floatingHeaderRow.cs" +
                         "s(\"visibility\", \"hidden\");\r\n                floatingHeaderRow.css(\"top\", \"0px\");" +
                         "\r\n            }\r\n        });\r\n    }\r\n    $(document).ready(function() {\r\n       " +
                         " $(\"table.tableWithFloatingHeader\").each(function() {\r\n            $(this).wrap(" +
                         "\"<div class=\\\"divTableWithFloatingHeader\\\" style=\\\"position:relative;overflow-y:" +
                         "auto\\\"></div>\");\r\n\r\n            var originalHeaderRow = $(\"tr:first\", this)\r\n   " +
                         "         originalHeaderRow.before(originalHeaderRow.clone());\r\n            var c" +
                         "lonedHeaderRow = $(\"tr:first\", this)\r\n\r\n            clonedHeaderRow.addClass(\"ta" +
                         "bleFloatingHeader\");\r\n            clonedHeaderRow.css(\"position\", \"absolute\");\r\n" +
                         "            clonedHeaderRow.css(\"top\", \"0px\");\r\n            clonedHeaderRow.css(" +
                         "\"left\", $(this).css(\"margin-left\"));\r\n            clonedHeaderRow.css(\"visibilit" +
                         "y\", \"hidden\");\r\n            clonedHeaderRow.css(\"z-index\", \"1000\");\r\n\r\n         " +
                         "   originalHeaderRow.addClass(\"tableFloatingHeaderOriginal\");\r\n        });\r\n    " +
                         "    UpdateTableHeaders();\r\n        $(window).scroll(UpdateTableHeaders);\r\n      " +
                         "  $(window).resize(UpdateTableHeaders);\r\n    });*/\r\n</script>\r\n");
        }
        public static DiaPhuong getNoiSinh(this nvSoYeuLyLich model, HRMDBEntities db)
        {
            var obj = db.DiaPhuong.Find(model.NoiSinh_id);

            return(obj != null ? obj : new DiaPhuong());
        }
 public static void Include(this TaiNguyen tainguyen, HRMDBEntities context)
 {
     tainguyen.chaTaiNguyen = context.TaiNguyen.Find(tainguyen.idTaiNguyen);
 }
Beispiel #4
0
 public static string SqlCreate(this HRMDBEntities db, string name, NameValueCollection form)
 {
     return(db.Database.SqlCreate(name, form));
 }
Beispiel #5
0
 public static string SqlDelete(this HRMDBEntities db, string name, int id)
 {
     return(db.Database.SqlDelete(name, id));
 }
Beispiel #6
0
 public static DataTable SqlQuery(this HRMDBEntities db, string sql, params object[] parameters)
 {
     return(db.Database.SqlQuery(sql, parameters));
 }
Beispiel #7
0
 public static int SqlExecute(this HRMDBEntities db, string query, params object[] parameters)
 {
     return(db.Database.SqlExecute(query, parameters));
 }