(context));
25 |
26 |
27 |
28 | if (!roleManager.RoleExists("Admin"))
29 | {
30 | var role = new IdentityRole();
31 | role.Name = "Admin";
32 | roleManager.Create(role);
33 | }
34 |
35 | if (!roleManager.RoleExists("Teacher"))
36 | {
37 | var role = new IdentityRole();
38 | role.Name = "Teacher";
39 | roleManager.Create(role);
40 | }
41 |
42 | if (!roleManager.RoleExists("Supervisor"))
43 | {
44 | var role = new IdentityRole();
45 | role.Name = "Supervisor";
46 | roleManager.Create(role);
47 | }
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Account/ResetPassword.cshtml:
--------------------------------------------------------------------------------
1 | @model SchoolManagement.Models.ResetPasswordViewModel
2 | @{
3 | ViewBag.Title = "Reset password";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | @using (Html.BeginForm("ResetPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
9 | {
10 | @Html.AntiForgeryToken()
11 | Reset your password.
12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" })
14 | @Html.HiddenFor(model => model.Code)
15 |
21 |
27 |
33 |
38 | }
39 |
40 | @section Scripts {
41 | @Scripts.Render("~/bundles/jqueryval")
42 | }
43 |
--------------------------------------------------------------------------------
/SchoolManagement/Content/themes/base/dialog.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Dialog 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | *
9 | * http://api.jqueryui.com/dialog/#theming
10 | */
11 | .ui-dialog {
12 | overflow: hidden;
13 | position: absolute;
14 | top: 0;
15 | left: 0;
16 | padding: .2em;
17 | outline: 0;
18 | }
19 | .ui-dialog .ui-dialog-titlebar {
20 | padding: .4em 1em;
21 | position: relative;
22 | }
23 | .ui-dialog .ui-dialog-title {
24 | float: left;
25 | margin: .1em 0;
26 | white-space: nowrap;
27 | width: 90%;
28 | overflow: hidden;
29 | text-overflow: ellipsis;
30 | }
31 | .ui-dialog .ui-dialog-titlebar-close {
32 | position: absolute;
33 | right: .3em;
34 | top: 50%;
35 | width: 20px;
36 | margin: -10px 0 0 0;
37 | padding: 1px;
38 | height: 20px;
39 | }
40 | .ui-dialog .ui-dialog-content {
41 | position: relative;
42 | border: 0;
43 | padding: .5em 1em;
44 | background: none;
45 | overflow: auto;
46 | }
47 | .ui-dialog .ui-dialog-buttonpane {
48 | text-align: left;
49 | border-width: 1px 0 0 0;
50 | background-image: none;
51 | margin-top: .5em;
52 | padding: .3em 1em .5em .4em;
53 | }
54 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
55 | float: right;
56 | }
57 | .ui-dialog .ui-dialog-buttonpane button {
58 | margin: .5em .4em .5em 0;
59 | cursor: pointer;
60 | }
61 | .ui-dialog .ui-resizable-se {
62 | width: 12px;
63 | height: 12px;
64 | right: -5px;
65 | bottom: -5px;
66 | background-position: 16px 16px;
67 | }
68 | .ui-draggable .ui-dialog-titlebar {
69 | cursor: move;
70 | }
71 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Courses/Create.cshtml:
--------------------------------------------------------------------------------
1 | @model SchoolManagement.Models.Course
2 |
3 | @{
4 | ViewBag.Title = "Create";
5 | Layout = "~/Views/Shared/_Layout.cshtml";
6 | }
7 |
8 | Create
9 |
10 | @using (Html.BeginForm())
11 | {
12 | @Html.AntiForgeryToken()
13 |
14 |
40 | }
41 |
42 |
43 | @Html.ActionLink("Back to List", "Index")
44 |
45 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Lecturers/Create.cshtml:
--------------------------------------------------------------------------------
1 | @model SchoolManagement.Models.Lecturer
2 |
3 | @{
4 | ViewBag.Title = "Create";
5 | Layout = "~/Views/Shared/_Layout.cshtml";
6 | }
7 |
8 | Create
9 |
10 | @using (Html.BeginForm())
11 | {
12 | @Html.AntiForgeryToken()
13 |
14 |
40 | }
41 |
42 |
43 | @Html.ActionLink("Back to List", "Index")
44 |
45 |
--------------------------------------------------------------------------------
/SchoolManagement/Content/themes/base/slider.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Slider 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | *
9 | * http://api.jqueryui.com/slider/#theming
10 | */
11 | .ui-slider {
12 | position: relative;
13 | text-align: left;
14 | }
15 | .ui-slider .ui-slider-handle {
16 | position: absolute;
17 | z-index: 2;
18 | width: 1.2em;
19 | height: 1.2em;
20 | cursor: default;
21 | -ms-touch-action: none;
22 | touch-action: none;
23 | }
24 | .ui-slider .ui-slider-range {
25 | position: absolute;
26 | z-index: 1;
27 | font-size: .7em;
28 | display: block;
29 | border: 0;
30 | background-position: 0 0;
31 | }
32 |
33 | /* support: IE8 - See #6727 */
34 | .ui-slider.ui-state-disabled .ui-slider-handle,
35 | .ui-slider.ui-state-disabled .ui-slider-range {
36 | filter: inherit;
37 | }
38 |
39 | .ui-slider-horizontal {
40 | height: .8em;
41 | }
42 | .ui-slider-horizontal .ui-slider-handle {
43 | top: -.3em;
44 | margin-left: -.6em;
45 | }
46 | .ui-slider-horizontal .ui-slider-range {
47 | top: 0;
48 | height: 100%;
49 | }
50 | .ui-slider-horizontal .ui-slider-range-min {
51 | left: 0;
52 | }
53 | .ui-slider-horizontal .ui-slider-range-max {
54 | right: 0;
55 | }
56 |
57 | .ui-slider-vertical {
58 | width: .8em;
59 | height: 100px;
60 | }
61 | .ui-slider-vertical .ui-slider-handle {
62 | left: -.3em;
63 | margin-left: 0;
64 | margin-bottom: -.6em;
65 | }
66 | .ui-slider-vertical .ui-slider-range {
67 | left: 0;
68 | width: 100%;
69 | }
70 | .ui-slider-vertical .ui-slider-range-min {
71 | bottom: 0;
72 | }
73 | .ui-slider-vertical .ui-slider-range-max {
74 | top: 0;
75 | }
76 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Courses/Edit.cshtml:
--------------------------------------------------------------------------------
1 | @model SchoolManagement.Models.Course
2 |
3 | @{
4 | ViewBag.Title = "Edit";
5 | Layout = "~/Views/Shared/_Layout.cshtml";
6 | }
7 |
8 | Edit
9 |
10 | @using (Html.BeginForm())
11 | {
12 | @Html.AntiForgeryToken()
13 |
14 |
42 | }
43 |
44 |
45 | @Html.ActionLink("Back to List", "Index")
46 |
47 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Lecturers/Edit.cshtml:
--------------------------------------------------------------------------------
1 | @model SchoolManagement.Models.Lecturer
2 |
3 | @{
4 | ViewBag.Title = "Edit";
5 | Layout = "~/Views/Shared/_Layout.cshtml";
6 | }
7 |
8 | Edit
9 |
10 | @using (Html.BeginForm())
11 | {
12 | @Html.AntiForgeryToken()
13 |
14 |
42 | }
43 |
44 |
45 | @Html.ActionLink("Back to List", "Index")
46 |
47 |
--------------------------------------------------------------------------------
/SchoolManagement/App_Start/BundleConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Web;
2 | using System.Web.Optimization;
3 |
4 | namespace SchoolManagement
5 | {
6 | public class BundleConfig
7 | {
8 | // For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
9 | public static void RegisterBundles(BundleCollection bundles)
10 | {
11 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
12 | "~/Scripts/jquery-{version}.js"));
13 |
14 | bundles.Add(new ScriptBundle("~/bundles/jquery-ajax").Include(
15 | "~/Scripts/jquery.unobtrusive-ajax.js"));
16 |
17 | bundles.Add(new ScriptBundle("~/bundles/jquery-ui").Include(
18 | "~/Scripts/jquery-ui-{version}.js"));
19 |
20 | bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
21 | "~/Scripts/jquery.validate*"));
22 |
23 | // Use the development version of Modernizr to develop with and learn from. Then, when you're
24 | // ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
25 | bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
26 | "~/Scripts/modernizr-*"));
27 |
28 | bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
29 | "~/Scripts/bootstrap.js",
30 | "~/Scripts/respond.js"));
31 |
32 | bundles.Add(new StyleBundle("~/Content/css").Include(
33 | "~/Content/bootstrap.css",
34 | "~/Content/site.css"));
35 |
36 | bundles.Add(new StyleBundle("~/Content/jqueryui").Include(
37 | "~/Content/themes/base/all.css",
38 | "~/Content/themes/base/autocomplete.css"));
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/SchoolManagement/Content/themes/base/core.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI CSS Framework 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | *
9 | * http://api.jqueryui.com/category/theming/
10 | */
11 |
12 | /* Layout helpers
13 | ----------------------------------*/
14 | .ui-helper-hidden {
15 | display: none;
16 | }
17 | .ui-helper-hidden-accessible {
18 | border: 0;
19 | clip: rect(0 0 0 0);
20 | height: 1px;
21 | margin: -1px;
22 | overflow: hidden;
23 | padding: 0;
24 | position: absolute;
25 | width: 1px;
26 | }
27 | .ui-helper-reset {
28 | margin: 0;
29 | padding: 0;
30 | border: 0;
31 | outline: 0;
32 | line-height: 1.3;
33 | text-decoration: none;
34 | font-size: 100%;
35 | list-style: none;
36 | }
37 | .ui-helper-clearfix:before,
38 | .ui-helper-clearfix:after {
39 | content: "";
40 | display: table;
41 | border-collapse: collapse;
42 | }
43 | .ui-helper-clearfix:after {
44 | clear: both;
45 | }
46 | .ui-helper-clearfix {
47 | min-height: 0; /* support: IE7 */
48 | }
49 | .ui-helper-zfix {
50 | width: 100%;
51 | height: 100%;
52 | top: 0;
53 | left: 0;
54 | position: absolute;
55 | opacity: 0;
56 | filter:Alpha(Opacity=0); /* support: IE8 */
57 | }
58 |
59 | .ui-front {
60 | z-index: 100;
61 | }
62 |
63 |
64 | /* Interaction Cues
65 | ----------------------------------*/
66 | .ui-state-disabled {
67 | cursor: default !important;
68 | }
69 |
70 |
71 | /* Icons
72 | ----------------------------------*/
73 |
74 | /* states and images */
75 | .ui-icon {
76 | display: block;
77 | text-indent: -99999px;
78 | overflow: hidden;
79 | background-repeat: no-repeat;
80 | }
81 |
82 |
83 | /* Misc visuals
84 | ----------------------------------*/
85 |
86 | /* Overlays */
87 | .ui-widget-overlay {
88 | position: fixed;
89 | top: 0;
90 | left: 0;
91 | width: 100%;
92 | height: 100%;
93 | }
94 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Students/Details.cshtml:
--------------------------------------------------------------------------------
1 | @model SchoolManagement.Models.Student
2 |
3 | @{
4 | ViewBag.Title = "Details";
5 | Layout = "~/Views/Shared/_Layout.cshtml";
6 | }
7 |
8 | Student Details
9 |
10 |
11 |
Student
12 |
13 |
14 |
15 | @Html.DisplayNameFor(model => model.LastName)
16 |
17 |
18 |
19 | @Html.DisplayFor(model => model.LastName)
20 |
21 |
22 |
23 | @Html.DisplayNameFor(model => model.FirstName)
24 |
25 |
26 |
27 | @Html.DisplayFor(model => model.FirstName)
28 |
29 |
30 |
31 | @Html.DisplayNameFor(model => model.MiddleName)
32 |
33 |
34 |
35 | @Html.DisplayFor(model => model.MiddleName)
36 |
37 |
38 |
39 | @Html.DisplayNameFor(model => model.EnrollmentDate)
40 |
41 |
42 |
43 | @Html.DisplayFor(model => model.EnrollmentDate)
44 |
45 |
46 |
47 |
48 |
49 |
50 | Course Title
51 | Credits
52 | Grade
53 |
54 | @foreach(var enrollment in Model.Enrollments)
55 | {
56 |
57 |
58 |
59 | @enrollment.Course.Title
60 |
61 |
62 |
63 |
64 | @enrollment.Course.Credits
65 |
66 |
67 |
68 |
69 | @enrollment.Grade
70 |
71 |
72 |
73 | }
74 |
75 |
76 |
77 |
78 | @Html.ActionLink("Edit", "Edit", new { id = Model.StudentID }) |
79 | @Html.ActionLink("Back to List", "Index")
80 |
81 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Shared/_Layout.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | @ViewBag.Title - School Management System
7 | @Styles.Render("~/Content/css")
8 | @Styles.Render("~/Content/jqueryui")
9 | @Scripts.Render("~/bundles/modernizr")
10 | @Scripts.Render("~/bundles/jquery")
11 | @Scripts.Render("~/bundles/jquery-ajax")
12 | @Scripts.Render("~/bundles/jquery-ui")
13 | @Scripts.Render("~/bundles/bootstrap")
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
29 |
30 |
31 | @Html.ActionLink("Home", "Index", "Home")
32 | @Html.ActionLink("Courses", "Index", "Courses")
33 | @Html.ActionLink("Students", "Index", "Students")
34 | @Html.ActionLink("Lecturers", "Index", "Lecturers")
35 | @Html.ActionLink("Enrollments", "Index", "Enrollments")
36 |
37 | @Html.Partial("_LoginPartial")
38 |
39 |
40 |
41 |
42 | @RenderBody()
43 |
44 |
47 |
48 |
49 |
50 | @RenderSection("scripts", required: false)
51 |
52 |
53 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Account/Register.cshtml:
--------------------------------------------------------------------------------
1 | @model SchoolManagement.Models.RegisterViewModel
2 | @{
3 | ViewBag.Title = "Register";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | @using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
9 | {
10 | @Html.AntiForgeryToken()
11 | Create a new account.
12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" })
14 |
20 |
26 |
32 |
38 |
44 |
45 |
51 |
56 | }
57 |
58 | @section Scripts {
59 | @Scripts.Render("~/bundles/jqueryval")
60 | }
61 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Home/Index.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Home Page";
3 | }
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | We Learn!
19 |
20 |
21 |
22 |
23 |
24 | Use on Any Device
25 |
26 |
27 |
28 |
29 |
30 | WE Win!
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | Previous
39 |
40 |
41 |
42 | Next
43 |
44 |
45 |
46 |
47 |
48 |
Courses
49 |
50 | Use this option to view all course and offerings at this institution.
51 |
52 |
@Html.ActionLink("Learn More", "Index", "Courses", null, new {@class="btn btn-primary" })
53 |
54 |
55 |
Students
56 |
View all students that are enrolled at this institution
57 |
@Html.ActionLink("All Students", "Index", "Students", null, new { @class = "btn btn-info" })
58 |
59 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Students/Create.cshtml:
--------------------------------------------------------------------------------
1 | @model SchoolManagement.Models.Student
2 |
3 | @{
4 | ViewBag.Title = "Create";
5 | Layout = "~/Views/Shared/_Layout.cshtml";
6 | }
7 |
8 | Create
9 |
10 | @using (Html.BeginForm())
11 | {
12 | @Html.AntiForgeryToken()
13 |
14 |
56 | }
57 |
58 |
59 | @Html.ActionLink("Back to List", "Index")
60 |
61 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Students/Edit.cshtml:
--------------------------------------------------------------------------------
1 | @model SchoolManagement.Models.Student
2 |
3 | @{
4 | ViewBag.Title = "Edit";
5 | Layout = "~/Views/Shared/_Layout.cshtml";
6 | }
7 |
8 | Edit
9 |
10 | @using (Html.BeginForm())
11 | {
12 | @Html.AntiForgeryToken()
13 |
14 |
58 | }
59 |
60 |
61 | @Html.ActionLink("Back to List", "Index")
62 |
63 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Enrollments/Edit.cshtml:
--------------------------------------------------------------------------------
1 | @model SchoolManagement.Models.Enrollment
2 |
3 | @{
4 | ViewBag.Title = "Edit";
5 | Layout = "~/Views/Shared/_Layout.cshtml";
6 | }
7 |
8 | Edit
9 |
10 | @using (Html.BeginForm())
11 | {
12 | @Html.AntiForgeryToken()
13 |
14 |
58 | }
59 |
60 |
61 | @Html.ActionLink("Back to List", "Index")
62 |
63 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Account/Login.cshtml:
--------------------------------------------------------------------------------
1 | @using SchoolManagement.Models
2 | @model LoginViewModel
3 | @{
4 | ViewBag.Title = "Log in";
5 | }
6 |
7 | @ViewBag.Title.
8 |
60 |
61 | @section Scripts {
62 | @Scripts.Render("~/bundles/jqueryval")
63 | }
--------------------------------------------------------------------------------
/SchoolManagement/Models/ManageViewModels.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.ComponentModel.DataAnnotations;
3 | using Microsoft.AspNet.Identity;
4 | using Microsoft.Owin.Security;
5 |
6 | namespace SchoolManagement.Models
7 | {
8 | public class IndexViewModel
9 | {
10 | public bool HasPassword { get; set; }
11 | public IList Logins { get; set; }
12 | public string PhoneNumber { get; set; }
13 | public bool TwoFactor { get; set; }
14 | public bool BrowserRemembered { get; set; }
15 | }
16 |
17 | public class ManageLoginsViewModel
18 | {
19 | public IList CurrentLogins { get; set; }
20 | public IList OtherLogins { get; set; }
21 | }
22 |
23 | public class FactorViewModel
24 | {
25 | public string Purpose { get; set; }
26 | }
27 |
28 | public class SetPasswordViewModel
29 | {
30 | [Required]
31 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
32 | [DataType(DataType.Password)]
33 | [Display(Name = "New password")]
34 | public string NewPassword { get; set; }
35 |
36 | [DataType(DataType.Password)]
37 | [Display(Name = "Confirm new password")]
38 | [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
39 | public string ConfirmPassword { get; set; }
40 | }
41 |
42 | public class ChangePasswordViewModel
43 | {
44 | [Required]
45 | [DataType(DataType.Password)]
46 | [Display(Name = "Current password")]
47 | public string OldPassword { get; set; }
48 |
49 | [Required]
50 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
51 | [DataType(DataType.Password)]
52 | [Display(Name = "New password")]
53 | public string NewPassword { get; set; }
54 |
55 | [DataType(DataType.Password)]
56 | [Display(Name = "Confirm new password")]
57 | [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
58 | public string ConfirmPassword { get; set; }
59 | }
60 |
61 | public class AddPhoneNumberViewModel
62 | {
63 | [Required]
64 | [Phone]
65 | [Display(Name = "Phone Number")]
66 | public string Number { get; set; }
67 | }
68 |
69 | public class VerifyPhoneNumberViewModel
70 | {
71 | [Required]
72 | [Display(Name = "Code")]
73 | public string Code { get; set; }
74 |
75 | [Required]
76 | [Phone]
77 | [Display(Name = "Phone Number")]
78 | public string PhoneNumber { get; set; }
79 | }
80 |
81 | public class ConfigureTwoFactorViewModel
82 | {
83 | public string SelectedProvider { get; set; }
84 | public ICollection Providers { get; set; }
85 | }
86 | }
--------------------------------------------------------------------------------
/SchoolManagement/Content/themes/base/progressbar.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Progressbar 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | *
9 | * http://api.jqueryui.com/progressbar/#theming
10 | */
11 | .ui-progressbar {
12 | height: 2em;
13 | text-align: left;
14 | overflow: hidden;
15 | }
16 | .ui-progressbar .ui-progressbar-value {
17 | margin: -1px;
18 | height: 100%;
19 | }
20 | .ui-progressbar .ui-progressbar-overlay {
21 | background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
22 | height: 100%;
23 | filter: alpha(opacity=25); /* support: IE8 */
24 | opacity: 0.25;
25 | }
26 | .ui-progressbar-indeterminate .ui-progressbar-value {
27 | background-image: none;
28 | }
29 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Manage/ManageLogins.cshtml:
--------------------------------------------------------------------------------
1 | @model SchoolManagement.Models.ManageLoginsViewModel
2 | @using Microsoft.Owin.Security
3 | @{
4 | ViewBag.Title = "Manage your external logins";
5 | }
6 |
7 | @ViewBag.Title.
8 |
9 | @ViewBag.StatusMessage
10 | @{
11 | var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes();
12 | if (loginProviders.Count() == 0) {
13 |
14 |
15 | There are no external authentication services configured. See this article
16 | for details on setting up this ASP.NET application to support logging in via external services.
17 |
18 |
19 | }
20 | else
21 | {
22 | if (Model.CurrentLogins.Count > 0)
23 | {
24 | Registered Logins
25 |
53 | }
54 | if (Model.OtherLogins.Count > 0)
55 | {
56 | using (Html.BeginForm("LinkLogin", "Manage"))
57 | {
58 | @Html.AntiForgeryToken()
59 |
60 |
61 | @foreach (AuthenticationDescription p in Model.OtherLogins)
62 | {
63 | @p.AuthenticationType
64 | }
65 |
66 |
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/SchoolManagement/Content/themes/base/button.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Button 1.11.4
3 | * http://jqueryui.com
4 | *
5 | * Copyright jQuery Foundation and other contributors
6 | * Released under the MIT license.
7 | * http://jquery.org/license
8 | *
9 | * http://api.jqueryui.com/button/#theming
10 | */
11 | .ui-button {
12 | display: inline-block;
13 | position: relative;
14 | padding: 0;
15 | line-height: normal;
16 | margin-right: .1em;
17 | cursor: pointer;
18 | vertical-align: middle;
19 | text-align: center;
20 | overflow: visible; /* removes extra width in IE */
21 | }
22 | .ui-button,
23 | .ui-button:link,
24 | .ui-button:visited,
25 | .ui-button:hover,
26 | .ui-button:active {
27 | text-decoration: none;
28 | }
29 | /* to make room for the icon, a width needs to be set here */
30 | .ui-button-icon-only {
31 | width: 2.2em;
32 | }
33 | /* button elements seem to need a little more width */
34 | button.ui-button-icon-only {
35 | width: 2.4em;
36 | }
37 | .ui-button-icons-only {
38 | width: 3.4em;
39 | }
40 | button.ui-button-icons-only {
41 | width: 3.7em;
42 | }
43 |
44 | /* button text element */
45 | .ui-button .ui-button-text {
46 | display: block;
47 | line-height: normal;
48 | }
49 | .ui-button-text-only .ui-button-text {
50 | padding: .4em 1em;
51 | }
52 | .ui-button-icon-only .ui-button-text,
53 | .ui-button-icons-only .ui-button-text {
54 | padding: .4em;
55 | text-indent: -9999999px;
56 | }
57 | .ui-button-text-icon-primary .ui-button-text,
58 | .ui-button-text-icons .ui-button-text {
59 | padding: .4em 1em .4em 2.1em;
60 | }
61 | .ui-button-text-icon-secondary .ui-button-text,
62 | .ui-button-text-icons .ui-button-text {
63 | padding: .4em 2.1em .4em 1em;
64 | }
65 | .ui-button-text-icons .ui-button-text {
66 | padding-left: 2.1em;
67 | padding-right: 2.1em;
68 | }
69 | /* no icon support for input elements, provide padding by default */
70 | input.ui-button {
71 | padding: .4em 1em;
72 | }
73 |
74 | /* button icon element(s) */
75 | .ui-button-icon-only .ui-icon,
76 | .ui-button-text-icon-primary .ui-icon,
77 | .ui-button-text-icon-secondary .ui-icon,
78 | .ui-button-text-icons .ui-icon,
79 | .ui-button-icons-only .ui-icon {
80 | position: absolute;
81 | top: 50%;
82 | margin-top: -8px;
83 | }
84 | .ui-button-icon-only .ui-icon {
85 | left: 50%;
86 | margin-left: -8px;
87 | }
88 | .ui-button-text-icon-primary .ui-button-icon-primary,
89 | .ui-button-text-icons .ui-button-icon-primary,
90 | .ui-button-icons-only .ui-button-icon-primary {
91 | left: .5em;
92 | }
93 | .ui-button-text-icon-secondary .ui-button-icon-secondary,
94 | .ui-button-text-icons .ui-button-icon-secondary,
95 | .ui-button-icons-only .ui-button-icon-secondary {
96 | right: .5em;
97 | }
98 |
99 | /* button sets */
100 | .ui-buttonset {
101 | margin-right: 7px;
102 | }
103 | .ui-buttonset .ui-button {
104 | margin-left: 0;
105 | margin-right: -.3em;
106 | }
107 |
108 | /* workarounds */
109 | /* reset extra padding in Firefox, see h5bp.com/l */
110 | input.ui-button::-moz-focus-inner,
111 | button.ui-button::-moz-focus-inner {
112 | border: 0;
113 | padding: 0;
114 | }
115 |
--------------------------------------------------------------------------------
/SchoolManagement/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/SchoolManagement/Views/Manage/Index.cshtml:
--------------------------------------------------------------------------------
1 | @model SchoolManagement.Models.IndexViewModel
2 | @{
3 | ViewBag.Title = "Manage";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | @ViewBag.StatusMessage
9 |
10 |
Change your account settings
11 |
12 |
13 | Password:
14 |
15 | [
16 | @if (Model.HasPassword)
17 | {
18 | @Html.ActionLink("Change your password", "ChangePassword")
19 | }
20 | else
21 | {
22 | @Html.ActionLink("Create", "SetPassword")
23 | }
24 | ]
25 |
26 | External Logins:
27 |
28 | @Model.Logins.Count [
29 | @Html.ActionLink("Manage", "ManageLogins") ]
30 |
31 | @*
32 | Phone Numbers can used as a second factor of verification in a two-factor authentication system.
33 |
34 | See this article
35 | for details on setting up this ASP.NET application to support two-factor authentication using SMS.
36 |
37 | Uncomment the following block after you have set up two-factor authentication
38 | *@
39 | @*
40 | Phone Number:
41 |
42 | @(Model.PhoneNumber ?? "None")
43 | @if (Model.PhoneNumber != null)
44 | {
45 |
46 | [ @Html.ActionLink("Change", "AddPhoneNumber") ]
47 | using (Html.BeginForm("RemovePhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
48 | {
49 | @Html.AntiForgeryToken()
50 | [ ]
51 | }
52 | }
53 | else
54 | {
55 | [ @Html.ActionLink("Add", "AddPhoneNumber")
56 | }
57 |
58 | *@
59 | Two-Factor Authentication:
60 |
61 |
62 | There are no two-factor authentication providers configured. See this article
63 | for details on setting up this ASP.NET application to support two-factor authentication.
64 |
65 | @*@if (Model.TwoFactor)
66 | {
67 | using (Html.BeginForm("DisableTwoFactorAuthentication", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
68 | {
69 | @Html.AntiForgeryToken()
70 | Enabled
71 |
72 |
73 | }
74 | }
75 | else
76 | {
77 | using (Html.BeginForm("EnableTwoFactorAuthentication", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
78 | {
79 | @Html.AntiForgeryToken()
80 | Disabled
81 |
82 |
83 | }
84 | }*@
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/SchoolManagement/App_Start/Startup.Auth.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.AspNet.Identity;
3 | using Microsoft.AspNet.Identity.Owin;
4 | using Microsoft.Owin;
5 | using Microsoft.Owin.Security.Cookies;
6 | using Microsoft.Owin.Security.Google;
7 | using Owin;
8 | using SchoolManagement.Models;
9 |
10 | namespace SchoolManagement
11 | {
12 | public partial class Startup
13 | {
14 | // For more information on configuring authentication, please visit https://go.microsoft.com/fwlink/?LinkId=301864
15 | public void ConfigureAuth(IAppBuilder app)
16 | {
17 | // Configure the db context, user manager and signin manager to use a single instance per request
18 | app.CreatePerOwinContext(ApplicationDbContext.Create);
19 | app.CreatePerOwinContext(ApplicationUserManager.Create);
20 | app.CreatePerOwinContext(ApplicationSignInManager.Create);
21 |
22 | // Enable the application to use a cookie to store information for the signed in user
23 | // and to use a cookie to temporarily store information about a user logging in with a third party login provider
24 | // Configure the sign in cookie
25 | app.UseCookieAuthentication(new CookieAuthenticationOptions
26 | {
27 | AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
28 | LoginPath = new PathString("/Account/Login"),
29 | Provider = new CookieAuthenticationProvider
30 | {
31 | // Enables the application to validate the security stamp when the user logs in.
32 | // This is a security feature which is used when you change a password or add an external login to your account.
33 | OnValidateIdentity = SecurityStampValidator.OnValidateIdentity(
34 | validateInterval: TimeSpan.FromMinutes(30),
35 | regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager))
36 | }
37 | });
38 | app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
39 |
40 | // Enables the application to temporarily store user information when they are verifying the second factor in the two-factor authentication process.
41 | app.UseTwoFactorSignInCookie(DefaultAuthenticationTypes.TwoFactorCookie, TimeSpan.FromMinutes(5));
42 |
43 | // Enables the application to remember the second login verification factor such as phone or email.
44 | // Once you check this option, your second step of verification during the login process will be remembered on the device where you logged in from.
45 | // This is similar to the RememberMe option when you log in.
46 | app.UseTwoFactorRememberBrowserCookie(DefaultAuthenticationTypes.TwoFactorRememberBrowserCookie);
47 |
48 | // Uncomment the following lines to enable logging in with third party login providers
49 | //app.UseMicrosoftAccountAuthentication(
50 | // clientId: "",
51 | // clientSecret: "");
52 |
53 | //app.UseTwitterAuthentication(
54 | // consumerKey: "",
55 | // consumerSecret: "");
56 |
57 | //app.UseFacebookAuthentication(
58 | // appId: "",
59 | // appSecret: "");
60 |
61 | //app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
62 | //{
63 | // ClientId = "",
64 | // ClientSecret = ""
65 | //});
66 | }
67 | }
68 | }
--------------------------------------------------------------------------------
/SchoolManagement/Scripts/jquery.unobtrusive-ajax.min.js:
--------------------------------------------------------------------------------
1 | // Unobtrusive Ajax support library for jQuery
2 | // Copyright (c) .NET Foundation. All rights reserved.
3 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
4 | // @version v3.2.6
5 | //
6 | // Microsoft grants you the right to use these script files for the sole
7 | // purpose of either: (i) interacting through your browser with the Microsoft
8 | // website or online service, subject to the applicable licensing or use
9 | // terms; or (ii) using the files as included with a Microsoft product subject
10 | // to that product's license terms. Microsoft reserves all other rights to the
11 | // files not expressly granted by Microsoft, whether by implication, estoppel
12 | // or otherwise. Insofar as a script file is dual licensed under GPL,
13 | // Microsoft neither took the code under GPL nor distributes it thereunder but
14 | // under the terms set out in this paragraph. All notices and licenses
15 | // below are for informational purposes only.
16 | !function(t){function a(t,a){for(var e=window,r=(t||"").split(".");e&&r.length;)e=e[r.shift()];return"function"==typeof e?e:(a.push(t),Function.constructor.apply(null,a))}function e(t){return"GET"===t||"POST"===t}function r(t,a){e(a)||t.setRequestHeader("X-HTTP-Method-Override",a)}function n(a,e,r){var n;r.indexOf("application/x-javascript")===-1&&(n=(a.getAttribute("data-ajax-mode")||"").toUpperCase(),t(a.getAttribute("data-ajax-update")).each(function(a,r){switch(n){case"BEFORE":t(r).prepend(e);break;case"AFTER":t(r).append(e);break;case"REPLACE-WITH":t(r).replaceWith(e);break;default:t(r).html(e)}}))}function i(i,u){var o,c,d,s;if(o=i.getAttribute("data-ajax-confirm"),!o||window.confirm(o)){c=t(i.getAttribute("data-ajax-loading")),s=parseInt(i.getAttribute("data-ajax-loading-duration"),10)||0,t.extend(u,{type:i.getAttribute("data-ajax-method")||void 0,url:i.getAttribute("data-ajax-url")||void 0,cache:"true"===(i.getAttribute("data-ajax-cache")||"").toLowerCase(),beforeSend:function(t){var e;return r(t,d),e=a(i.getAttribute("data-ajax-begin"),["xhr"]).apply(i,arguments),e!==!1&&c.show(s),e},complete:function(){c.hide(s),a(i.getAttribute("data-ajax-complete"),["xhr","status"]).apply(i,arguments)},success:function(t,e,r){n(i,t,r.getResponseHeader("Content-Type")||"text/html"),a(i.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(i,arguments)},error:function(){a(i.getAttribute("data-ajax-failure"),["xhr","status","error"]).apply(i,arguments)}}),u.data.push({name:"X-Requested-With",value:"XMLHttpRequest"}),d=u.type.toUpperCase(),e(d)||(u.type="POST",u.data.push({name:"X-HTTP-Method-Override",value:d}));var p=t(i);if(p.is("form")&&"multipart/form-data"==p.attr("enctype")){var f=new FormData;t.each(u.data,function(t,a){f.append(a.name,a.value)}),t("input[type=file]",p).each(function(){var a=this;t.each(a.files,function(t,e){f.append(a.name,e)})}),t.extend(u,{processData:!1,contentType:!1,data:f})}t.ajax(u)}}function u(a){var e=t(a).data(d);return!e||!e.validate||e.validate()}var o="unobtrusiveAjaxClick",c="unobtrusiveAjaxClickTarget",d="unobtrusiveValidation";t(document).on("click","a[data-ajax=true]",function(t){t.preventDefault(),i(this,{url:this.href,type:"GET",data:[]})}),t(document).on("click","form[data-ajax=true] input[type=image]",function(a){var e=a.target.name,r=t(a.target),n=t(r.parents("form")[0]),i=r.offset();n.data(o,[{name:e+".x",value:Math.round(a.pageX-i.left)},{name:e+".y",value:Math.round(a.pageY-i.top)}]),setTimeout(function(){n.removeData(o)},0)}),t(document).on("click","form[data-ajax=true] :submit",function(a){var e=a.currentTarget.name,r=t(a.target),n=t(r.parents("form")[0]);n.data(o,e?[{name:e,value:a.currentTarget.value}]:[]),n.data(c,r),setTimeout(function(){n.removeData(o),n.removeData(c)},0)}),t(document).on("submit","form[data-ajax=true]",function(a){var e=t(this).data(o)||[],r=t(this).data(c),n=r&&(r.hasClass("cancel")||void 0!==r.attr("formnovalidate"));a.preventDefault(),(n||u(this))&&i(this,{url:this.action,type:this.method||"GET",data:e.concat(t(this).serializeArray())})})}(jQuery);
--------------------------------------------------------------------------------
/SchoolManagement/Models/AccountViewModels.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel.DataAnnotations;
4 |
5 | namespace SchoolManagement.Models
6 | {
7 | public class ExternalLoginConfirmationViewModel
8 | {
9 | [Required]
10 | [Display(Name = "Email")]
11 | public string Email { get; set; }
12 | }
13 |
14 | public class ExternalLoginListViewModel
15 | {
16 | public string ReturnUrl { get; set; }
17 | }
18 |
19 | public class SendCodeViewModel
20 | {
21 | public string SelectedProvider { get; set; }
22 | public ICollection Providers { get; set; }
23 | public string ReturnUrl { get; set; }
24 | public bool RememberMe { get; set; }
25 | }
26 |
27 | public class VerifyCodeViewModel
28 | {
29 | [Required]
30 | public string Provider { get; set; }
31 |
32 | [Required]
33 | [Display(Name = "Code")]
34 | public string Code { get; set; }
35 | public string ReturnUrl { get; set; }
36 |
37 | [Display(Name = "Remember this browser?")]
38 | public bool RememberBrowser { get; set; }
39 |
40 | public bool RememberMe { get; set; }
41 | }
42 |
43 | public class ForgotViewModel
44 | {
45 | [Required]
46 | [Display(Name = "Email")]
47 | public string Email { get; set; }
48 | }
49 |
50 | public class LoginViewModel
51 | {
52 | [Required]
53 | [Display(Name = "Username")]
54 | public string Username { get; set; }
55 |
56 | [Required]
57 | [DataType(DataType.Password)]
58 | [Display(Name = "Password")]
59 | public string Password { get; set; }
60 |
61 | [Display(Name = "Remember me?")]
62 | public bool RememberMe { get; set; }
63 | }
64 |
65 | public class RegisterViewModel
66 | {
67 | [Required]
68 | [EmailAddress]
69 | [Display(Name = "Email Address / Username")]
70 | public string Email { get; set; }
71 |
72 | [Required]
73 | [DataType(DataType.DateTime)]
74 | [Display(Name = "Date of Birth")]
75 | public DateTime BirthDate { get; set; }
76 |
77 | [Required]
78 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
79 | [DataType(DataType.Password)]
80 | [Display(Name = "Password")]
81 | public string Password { get; set; }
82 |
83 | [DataType(DataType.Password)]
84 | [Display(Name = "Confirm password")]
85 | [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
86 | public string ConfirmPassword { get; set; }
87 |
88 | [Required]
89 | [Display(Name = "User Role")]
90 | public string UserRole { get; set; }
91 |
92 | [Required]
93 | [Display(Name = "Username")]
94 | public string Username { get; set; }
95 | }
96 |
97 | public class ResetPasswordViewModel
98 | {
99 | [Required]
100 | [EmailAddress]
101 | [Display(Name = "Email")]
102 | public string Email { get; set; }
103 |
104 | [Required]
105 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
106 | [DataType(DataType.Password)]
107 | [Display(Name = "Password")]
108 | public string Password { get; set; }
109 |
110 | [DataType(DataType.Password)]
111 | [Display(Name = "Confirm password")]
112 | [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
113 | public string ConfirmPassword { get; set; }
114 |
115 | public string Code { get; set; }
116 | }
117 |
118 | public class ForgotPasswordViewModel
119 | {
120 | [Required]
121 | [EmailAddress]
122 | [Display(Name = "Email")]
123 | public string Email { get; set; }
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/SchoolManagement/Scripts/respond.min.js:
--------------------------------------------------------------------------------
1 | /*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
2 | * Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
3 | * */
4 |
5 | !function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b Index()
20 | {
21 | return View(await db.Lecturers.ToListAsync());
22 | }
23 |
24 | // GET: Lecturers/Details/5
25 | public async Task Details(int? id)
26 | {
27 | if (id == null)
28 | {
29 | return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
30 | }
31 | Lecturer lecturer = await db.Lecturers.FindAsync(id);
32 | if (lecturer == null)
33 | {
34 | return HttpNotFound();
35 | }
36 | return View(lecturer);
37 | }
38 |
39 | // GET: Lecturers/Create
40 | public ActionResult Create()
41 | {
42 | return View();
43 | }
44 |
45 | // POST: Lecturers/Create
46 | // To protect from overposting attacks, please enable the specific properties you want to bind to, for
47 | // more details see https://go.microsoft.com/fwlink/?LinkId=317598.
48 | [HttpPost]
49 | [ValidateAntiForgeryToken]
50 | public async Task Create([Bind(Include = "Id,First_Name,Last_Name")] Lecturer lecturer)
51 | {
52 | if (ModelState.IsValid)
53 | {
54 | db.Lecturers.Add(lecturer);
55 | await db.SaveChangesAsync();
56 | return RedirectToAction("Index");
57 | }
58 |
59 | return View(lecturer);
60 | }
61 |
62 | // GET: Lecturers/Edit/5
63 | public async Task Edit(int? id)
64 | {
65 | if (id == null)
66 | {
67 | return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
68 | }
69 | Lecturer lecturer = await db.Lecturers.FindAsync(id);
70 | if (lecturer == null)
71 | {
72 | return HttpNotFound();
73 | }
74 | return View(lecturer);
75 | }
76 |
77 | // POST: Lecturers/Edit/5
78 | // To protect from overposting attacks, please enable the specific properties you want to bind to, for
79 | // more details see https://go.microsoft.com/fwlink/?LinkId=317598.
80 | [HttpPost]
81 | [ValidateAntiForgeryToken]
82 | public async Task Edit([Bind(Include = "Id,First_Name,Last_Name")] Lecturer lecturer)
83 | {
84 | if (ModelState.IsValid)
85 | {
86 | db.Entry(lecturer).State = EntityState.Modified;
87 | await db.SaveChangesAsync();
88 | return RedirectToAction("Index");
89 | }
90 | return View(lecturer);
91 | }
92 |
93 | // GET: Lecturers/Delete/5
94 | public async Task Delete(int? id)
95 | {
96 | if (id == null)
97 | {
98 | return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
99 | }
100 | Lecturer lecturer = await db.Lecturers.FindAsync(id);
101 | if (lecturer == null)
102 | {
103 | return HttpNotFound();
104 | }
105 | return View(lecturer);
106 | }
107 |
108 | // POST: Lecturers/Delete/5
109 | [HttpPost, ActionName("Delete")]
110 | [ValidateAntiForgeryToken]
111 | public async Task DeleteConfirmed(int id)
112 | {
113 | Lecturer lecturer = await db.Lecturers.FindAsync(id);
114 | db.Lecturers.Remove(lecturer);
115 | await db.SaveChangesAsync();
116 | return RedirectToAction("Index");
117 | }
118 |
119 | protected override void Dispose(bool disposing)
120 | {
121 | if (disposing)
122 | {
123 | db.Dispose();
124 | }
125 | base.Dispose(disposing);
126 | }
127 | }
128 | }
129 |
--------------------------------------------------------------------------------
/SchoolManagement/Controllers/StudentsController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Data;
4 | using System.Data.Entity;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Net;
8 | using System.Web;
9 | using System.Web.Mvc;
10 | using SchoolManagement.Models;
11 |
12 | namespace SchoolManagement.Controllers
13 | {
14 | [Authorize(Roles ="Teacher")]
15 | public class StudentsController : Controller
16 | {
17 | private SchoolManagement_DBEntities db = new SchoolManagement_DBEntities();
18 |
19 | // GET: Students
20 | [AllowAnonymous]
21 | public async Task Index()
22 | {
23 | return View(await db.Students.ToListAsync());
24 | }
25 |
26 | // GET: Students/Details/5
27 |
28 | public async Task Details(int? id)
29 | {
30 | if (id == null)
31 | {
32 | return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
33 | }
34 | Student student = await db.Students.FindAsync(id);
35 | if (student == null)
36 | {
37 | return HttpNotFound();
38 | }
39 | return View(student);
40 | }
41 |
42 | // GET: Students/Create
43 | public ActionResult Create()
44 | {
45 | return View();
46 | }
47 |
48 | // POST: Students/Create
49 | // To protect from overposting attacks, please enable the specific properties you want to bind to, for
50 | // more details see https://go.microsoft.com/fwlink/?LinkId=317598.
51 | [HttpPost]
52 | [ValidateAntiForgeryToken]
53 | public async Task Create([Bind(Include = "StudentID,LastName,FirstName,EnrollmentDate,MiddleName")] Student student)
54 | {
55 | if (ModelState.IsValid)
56 | {
57 | db.Students.Add(student);
58 | await db.SaveChangesAsync();
59 | return RedirectToAction("Index");
60 | }
61 |
62 | return View(student);
63 | }
64 |
65 | // GET: Students/Edit/5
66 | public async Task Edit(int? id)
67 | {
68 | if (id == null)
69 | {
70 | return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
71 | }
72 | Student student = await db.Students.FindAsync(id);
73 | if (student == null)
74 | {
75 | return HttpNotFound();
76 | }
77 | return View(student);
78 | }
79 |
80 | // POST: Students/Edit/5
81 | // To protect from overposting attacks, please enable the specific properties you want to bind to, for
82 | // more details see https://go.microsoft.com/fwlink/?LinkId=317598.
83 | [HttpPost]
84 | [ValidateAntiForgeryToken]
85 | public async Task Edit([Bind(Include = "StudentID,LastName,FirstName,EnrollmentDate,MiddleName")] Student student)
86 | {
87 | if (ModelState.IsValid)
88 | {
89 | db.Entry(student).State = EntityState.Modified;
90 | await db.SaveChangesAsync();
91 | return RedirectToAction("Index");
92 | }
93 | return View(student);
94 | }
95 |
96 | // GET: Students/Delete/5
97 | public async Task Delete(int? id)
98 | {
99 | if (id == null)
100 | {
101 | return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
102 | }
103 | Student student = await db.Students.FindAsync(id);
104 | if (student == null)
105 | {
106 | return HttpNotFound();
107 | }
108 | return View(student);
109 | }
110 |
111 | // POST: Students/Delete/5
112 | [HttpPost, ActionName("Delete")]
113 | [ValidateAntiForgeryToken]
114 | public async Task DeleteConfirmed(int id)
115 | {
116 | Student student = await db.Students.FindAsync(id);
117 | db.Students.Remove(student);
118 | await db.SaveChangesAsync();
119 | return RedirectToAction("Index");
120 | }
121 |
122 | protected override void Dispose(bool disposing)
123 | {
124 | if (disposing)
125 | {
126 | db.Dispose();
127 | }
128 | base.Dispose(disposing);
129 | }
130 | }
131 | }
132 |
--------------------------------------------------------------------------------
/SchoolManagement/App_Start/IdentityConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Data.Entity;
4 | using System.Linq;
5 | using System.Security.Claims;
6 | using System.Threading.Tasks;
7 | using System.Web;
8 | using Microsoft.AspNet.Identity;
9 | using Microsoft.AspNet.Identity.EntityFramework;
10 | using Microsoft.AspNet.Identity.Owin;
11 | using Microsoft.Owin;
12 | using Microsoft.Owin.Security;
13 | using SchoolManagement.Models;
14 |
15 | namespace SchoolManagement
16 | {
17 | public class EmailService : IIdentityMessageService
18 | {
19 | public Task SendAsync(IdentityMessage message)
20 | {
21 | // Plug in your email service here to send an email.
22 | return Task.FromResult(0);
23 | }
24 | }
25 |
26 | public class SmsService : IIdentityMessageService
27 | {
28 | public Task SendAsync(IdentityMessage message)
29 | {
30 | // Plug in your SMS service here to send a text message.
31 | return Task.FromResult(0);
32 | }
33 | }
34 |
35 | // Configure the application user manager used in this application. UserManager is defined in ASP.NET Identity and is used by the application.
36 | public class ApplicationUserManager : UserManager
37 | {
38 | public ApplicationUserManager(IUserStore store)
39 | : base(store)
40 | {
41 | }
42 |
43 | public static ApplicationUserManager Create(IdentityFactoryOptions options, IOwinContext context)
44 | {
45 | var manager = new ApplicationUserManager(new UserStore(context.Get()));
46 | // Configure validation logic for usernames
47 | manager.UserValidator = new UserValidator(manager)
48 | {
49 | AllowOnlyAlphanumericUserNames = false,
50 | RequireUniqueEmail = true
51 | };
52 |
53 | // Configure validation logic for passwords
54 | manager.PasswordValidator = new PasswordValidator
55 | {
56 | RequiredLength = 6,
57 | RequireNonLetterOrDigit = true,
58 | RequireDigit = true,
59 | RequireLowercase = true,
60 | RequireUppercase = true,
61 | };
62 |
63 | // Configure user lockout defaults
64 | manager.UserLockoutEnabledByDefault = true;
65 | manager.DefaultAccountLockoutTimeSpan = TimeSpan.FromMinutes(5);
66 | manager.MaxFailedAccessAttemptsBeforeLockout = 5;
67 |
68 | // Register two factor authentication providers. This application uses Phone and Emails as a step of receiving a code for verifying the user
69 | // You can write your own provider and plug it in here.
70 | manager.RegisterTwoFactorProvider("Phone Code", new PhoneNumberTokenProvider
71 | {
72 | MessageFormat = "Your security code is {0}"
73 | });
74 | manager.RegisterTwoFactorProvider("Email Code", new EmailTokenProvider
75 | {
76 | Subject = "Security Code",
77 | BodyFormat = "Your security code is {0}"
78 | });
79 | manager.EmailService = new EmailService();
80 | manager.SmsService = new SmsService();
81 | var dataProtectionProvider = options.DataProtectionProvider;
82 | if (dataProtectionProvider != null)
83 | {
84 | manager.UserTokenProvider =
85 | new DataProtectorTokenProvider(dataProtectionProvider.Create("ASP.NET Identity"));
86 | }
87 | return manager;
88 | }
89 | }
90 |
91 | // Configure the application sign-in manager which is used in this application.
92 | public class ApplicationSignInManager : SignInManager
93 | {
94 | public ApplicationSignInManager(ApplicationUserManager userManager, IAuthenticationManager authenticationManager)
95 | : base(userManager, authenticationManager)
96 | {
97 | }
98 |
99 | public override Task CreateUserIdentityAsync(ApplicationUser user)
100 | {
101 | return user.GenerateUserIdentityAsync((ApplicationUserManager)UserManager);
102 | }
103 |
104 | public static ApplicationSignInManager Create(IdentityFactoryOptions options, IOwinContext context)
105 | {
106 | return new ApplicationSignInManager(context.GetUserManager(), context.Authentication);
107 | }
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/SchoolManagement/Migrations/201904092248030_InitialCreate.cs:
--------------------------------------------------------------------------------
1 | namespace SchoolManagement.Migrations
2 | {
3 | using System;
4 | using System.Data.Entity.Migrations;
5 |
6 | public partial class InitialCreate : DbMigration
7 | {
8 | public override void Up()
9 | {
10 | CreateTable(
11 | "dbo.AspNetRoles",
12 | c => new
13 | {
14 | Id = c.String(nullable: false, maxLength: 128),
15 | Name = c.String(nullable: false, maxLength: 256),
16 | })
17 | .PrimaryKey(t => t.Id)
18 | .Index(t => t.Name, unique: true, name: "RoleNameIndex");
19 |
20 | CreateTable(
21 | "dbo.AspNetUserRoles",
22 | c => new
23 | {
24 | UserId = c.String(nullable: false, maxLength: 128),
25 | RoleId = c.String(nullable: false, maxLength: 128),
26 | })
27 | .PrimaryKey(t => new { t.UserId, t.RoleId })
28 | .ForeignKey("dbo.AspNetRoles", t => t.RoleId, cascadeDelete: true)
29 | .ForeignKey("dbo.AspNetUsers", t => t.UserId, cascadeDelete: true)
30 | .Index(t => t.UserId)
31 | .Index(t => t.RoleId);
32 |
33 | CreateTable(
34 | "dbo.AspNetUsers",
35 | c => new
36 | {
37 | Id = c.String(nullable: false, maxLength: 128),
38 | Email = c.String(maxLength: 256),
39 | EmailConfirmed = c.Boolean(nullable: false),
40 | PasswordHash = c.String(),
41 | SecurityStamp = c.String(),
42 | PhoneNumber = c.String(),
43 | PhoneNumberConfirmed = c.Boolean(nullable: false),
44 | TwoFactorEnabled = c.Boolean(nullable: false),
45 | LockoutEndDateUtc = c.DateTime(),
46 | LockoutEnabled = c.Boolean(nullable: false),
47 | AccessFailedCount = c.Int(nullable: false),
48 | UserName = c.String(nullable: false, maxLength: 256),
49 | })
50 | .PrimaryKey(t => t.Id)
51 | .Index(t => t.UserName, unique: true, name: "UserNameIndex");
52 |
53 | CreateTable(
54 | "dbo.AspNetUserClaims",
55 | c => new
56 | {
57 | Id = c.Int(nullable: false, identity: true),
58 | UserId = c.String(nullable: false, maxLength: 128),
59 | ClaimType = c.String(),
60 | ClaimValue = c.String(),
61 | })
62 | .PrimaryKey(t => t.Id)
63 | .ForeignKey("dbo.AspNetUsers", t => t.UserId, cascadeDelete: true)
64 | .Index(t => t.UserId);
65 |
66 | CreateTable(
67 | "dbo.AspNetUserLogins",
68 | c => new
69 | {
70 | LoginProvider = c.String(nullable: false, maxLength: 128),
71 | ProviderKey = c.String(nullable: false, maxLength: 128),
72 | UserId = c.String(nullable: false, maxLength: 128),
73 | })
74 | .PrimaryKey(t => new { t.LoginProvider, t.ProviderKey, t.UserId })
75 | .ForeignKey("dbo.AspNetUsers", t => t.UserId, cascadeDelete: true)
76 | .Index(t => t.UserId);
77 |
78 | }
79 |
80 | public override void Down()
81 | {
82 | DropForeignKey("dbo.AspNetUserRoles", "UserId", "dbo.AspNetUsers");
83 | DropForeignKey("dbo.AspNetUserLogins", "UserId", "dbo.AspNetUsers");
84 | DropForeignKey("dbo.AspNetUserClaims", "UserId", "dbo.AspNetUsers");
85 | DropForeignKey("dbo.AspNetUserRoles", "RoleId", "dbo.AspNetRoles");
86 | DropIndex("dbo.AspNetUserLogins", new[] { "UserId" });
87 | DropIndex("dbo.AspNetUserClaims", new[] { "UserId" });
88 | DropIndex("dbo.AspNetUsers", "UserNameIndex");
89 | DropIndex("dbo.AspNetUserRoles", new[] { "RoleId" });
90 | DropIndex("dbo.AspNetUserRoles", new[] { "UserId" });
91 | DropIndex("dbo.AspNetRoles", "RoleNameIndex");
92 | DropTable("dbo.AspNetUserLogins");
93 | DropTable("dbo.AspNetUserClaims");
94 | DropTable("dbo.AspNetUsers");
95 | DropTable("dbo.AspNetUserRoles");
96 | DropTable("dbo.AspNetRoles");
97 | }
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/SchoolManagement/Scripts/respond.matchmedia.addListener.min.js:
--------------------------------------------------------------------------------
1 | /*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
2 | * Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
3 | * */
4 |
5 | !function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";if(a.matchMedia&&a.matchMedia("all").addListener)return!1;var b=a.matchMedia,c=b("only all").matches,d=!1,e=0,f=[],g=function(){a.clearTimeout(e),e=a.setTimeout(function(){for(var c=0,d=f.length;d>c;c++){var e=f[c].mql,g=f[c].listeners||[],h=b(e.media).matches;if(h!==e.matches){e.matches=h;for(var i=0,j=g.length;j>i;i++)g[i].call(a,e)}}},30)};a.matchMedia=function(e){var h=b(e),i=[],j=0;return h.addListener=function(b){c&&(d||(d=!0,a.addEventListener("resize",g,!0)),0===j&&(j=f.push({mql:h,listeners:i})),i.push(b))},h.removeListener=function(a){for(var b=0,c=i.length;c>b;b++)i[b]===a&&i.splice(b,1)},h}}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b
9 |
10 | $(function () {
11 |
12 | function LoadEnrollments(cid) {
13 | $.ajax({
14 | url: '@Url.Action("_enrollmentPartial", "Enrollments")',
15 | dataType: 'html',
16 | contentType: 'application/html; charset=utf-8',
17 | type: 'GET',
18 | data: {
19 | courseid: cid
20 | },
21 | success: function (data) {
22 | $('#data').fadeOut().html(data).fadeIn();
23 | }
24 | });
25 | }
26 |
27 | var cid = $('#CourseID').val();
28 | LoadEnrollments(cid);
29 |
30 | $('#CourseID').change(function () {
31 | var cid = $('#CourseID').val();
32 | LoadEnrollments(cid);
33 | $("#failed").fadeOut('fast');
34 | $("#success").fadeOut('fast');
35 | });
36 |
37 | $("#Student_FirstName" ).autocomplete({
38 | source: function( request, response ) {
39 | $.ajax( {
40 | url: "/Enrollments/GetStudents",
41 | dataType: "json",
42 | type: "POST",
43 | data: {
44 | term: request.term
45 | },
46 | success: function (data) {
47 | console.log(data);
48 | $("#Student_FirstName").val("");
49 | response($.map(data, function (item) {
50 | return { label: item.Name, value: item.Name, id: item.Id };
51 | }))
52 | }
53 | } );
54 | },
55 | minLength: 2,
56 | select: function (event, query) {
57 | console.log(query);
58 | $("#StudentID").val(query.item.id);
59 | }
60 | } );
61 | });
62 |
63 | function Added(res) {
64 | if (res.IsSuccess) {
65 | $(function () {
66 | $("#failed").fadeOut('fast');
67 | $("#success").fadeIn('fast');
68 | //$('#success').append(res.Message);
69 | var cid = $('#CourseID').val();
70 | $.ajax({
71 | url: '@Url.Action("_enrollmentPartial", "Enrollments")',
72 | dataType: 'html',
73 | contentType: 'application/html; charset=utf-8',
74 | type: 'GET',
75 | data: {
76 | courseid: cid
77 | },
78 | success: function (data) {
79 | $('#data').fadeOut().html(data).fadeIn();
80 | }
81 | });
82 | })
83 | }
84 | else {
85 | Failed(res);
86 | }
87 | }
88 |
89 | function Failed(res) {
90 | $(function () {
91 | $("#failed").fadeIn('fast');
92 | $("#success").fadeOut('fast');
93 | //$('#failed').append(res.Message);
94 | })
95 | }
96 |
97 | function Failure() {
98 | $(function () {
99 | $("#failed").fadeIn('fast');
100 | //$('#failed').append(res.Message);
101 | })
102 | }
103 |
104 |
105 | Create
106 |
107 | @using (Ajax.BeginForm("AddStudent", "Enrollments", new AjaxOptions {
108 | HttpMethod = "POST",
109 | OnSuccess = "Added",
110 | OnFailure = "Failure"
111 | }))
112 | {
113 | @Html.AntiForgeryToken()
114 |
115 |
153 | }
154 |
155 |
156 |
157 |
158 | @*@Html.Action("_enrollmentPartial", "Enrollments")*@
159 |
160 |
161 |
162 | @Html.ActionLink("Back to List", "Index")
163 |
164 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | bld/
21 | [Bb]in/
22 | [Oo]bj/
23 | [Ll]og/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | project.fragment.lock.json
46 | artifacts/
47 |
48 | *_i.c
49 | *_p.c
50 | *_i.h
51 | *.ilk
52 | *.meta
53 | *.obj
54 | *.pch
55 | *.pdb
56 | *.pgc
57 | *.pgd
58 | *.rsp
59 | *.sbr
60 | *.tlb
61 | *.tli
62 | *.tlh
63 | *.tmp
64 | *.tmp_proj
65 | *.log
66 | *.vspscc
67 | *.vssscc
68 | .builds
69 | *.pidb
70 | *.svclog
71 | *.scc
72 |
73 | # Chutzpah Test files
74 | _Chutzpah*
75 |
76 | # Visual C++ cache files
77 | ipch/
78 | *.aps
79 | *.ncb
80 | *.opendb
81 | *.opensdf
82 | *.sdf
83 | *.cachefile
84 | *.VC.db
85 | *.VC.VC.opendb
86 |
87 | # Visual Studio profiler
88 | *.psess
89 | *.vsp
90 | *.vspx
91 | *.sap
92 |
93 | # TFS 2012 Local Workspace
94 | $tf/
95 |
96 | # Guidance Automation Toolkit
97 | *.gpState
98 |
99 | # ReSharper is a .NET coding add-in
100 | _ReSharper*/
101 | *.[Rr]e[Ss]harper
102 | *.DotSettings.user
103 |
104 | # JustCode is a .NET coding add-in
105 | .JustCode
106 |
107 | # TeamCity is a build add-in
108 | _TeamCity*
109 |
110 | # DotCover is a Code Coverage Tool
111 | *.dotCover
112 |
113 | # NCrunch
114 | _NCrunch_*
115 | .*crunch*.local.xml
116 | nCrunchTemp_*
117 |
118 | # MightyMoose
119 | *.mm.*
120 | AutoTest.Net/
121 |
122 | # Web workbench (sass)
123 | .sass-cache/
124 |
125 | # Installshield output folder
126 | [Ee]xpress/
127 |
128 | # DocProject is a documentation generator add-in
129 | DocProject/buildhelp/
130 | DocProject/Help/*.HxT
131 | DocProject/Help/*.HxC
132 | DocProject/Help/*.hhc
133 | DocProject/Help/*.hhk
134 | DocProject/Help/*.hhp
135 | DocProject/Help/Html2
136 | DocProject/Help/html
137 |
138 | # Click-Once directory
139 | publish/
140 |
141 | # Publish Web Output
142 | *.[Pp]ublish.xml
143 | *.azurePubxml
144 | # TODO: Comment the next line if you want to checkin your web deploy settings
145 | # but database connection strings (with potential passwords) will be unencrypted
146 | #*.pubxml
147 | *.publishproj
148 |
149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
150 | # checkin your Azure Web App publish settings, but sensitive information contained
151 | # in these scripts will be unencrypted
152 | PublishScripts/
153 |
154 | # NuGet Packages
155 | *.nupkg
156 | # The packages folder can be ignored because of Package Restore
157 | **/packages/*
158 | # except build/, which is used as an MSBuild target.
159 | !**/packages/build/
160 | # Uncomment if necessary however generally it will be regenerated when needed
161 | #!**/packages/repositories.config
162 | # NuGet v3's project.json files produces more ignoreable files
163 | *.nuget.props
164 | *.nuget.targets
165 |
166 | # Microsoft Azure Build Output
167 | csx/
168 | *.build.csdef
169 |
170 | # Microsoft Azure Emulator
171 | ecf/
172 | rcf/
173 |
174 | # Windows Store app package directories and files
175 | AppPackages/
176 | BundleArtifacts/
177 | Package.StoreAssociation.xml
178 | _pkginfo.txt
179 |
180 | # Visual Studio cache files
181 | # files ending in .cache can be ignored
182 | *.[Cc]ache
183 | # but keep track of directories ending in .cache
184 | !*.[Cc]ache/
185 |
186 | # Others
187 | ClientBin/
188 | ~$*
189 | *~
190 | *.dbmdl
191 | *.dbproj.schemaview
192 | *.jfm
193 | *.pfx
194 | *.publishsettings
195 | node_modules/
196 | orleans.codegen.cs
197 |
198 | # Since there are multiple workflows, uncomment next line to ignore bower_components
199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
200 | #bower_components/
201 |
202 | # RIA/Silverlight projects
203 | Generated_Code/
204 |
205 | # Backup & report files from converting an old project file
206 | # to a newer Visual Studio version. Backup files are not needed,
207 | # because we have git ;-)
208 | _UpgradeReport_Files/
209 | Backup*/
210 | UpgradeLog*.XML
211 | UpgradeLog*.htm
212 |
213 | # SQL Server files
214 | *.mdf
215 | *.ldf
216 |
217 | # Business Intelligence projects
218 | *.rdl.data
219 | *.bim.layout
220 | *.bim_*.settings
221 |
222 | # Microsoft Fakes
223 | FakesAssemblies/
224 |
225 | # GhostDoc plugin setting file
226 | *.GhostDoc.xml
227 |
228 | # Node.js Tools for Visual Studio
229 | .ntvs_analysis.dat
230 |
231 | # Visual Studio 6 build log
232 | *.plg
233 |
234 | # Visual Studio 6 workspace options file
235 | *.opt
236 |
237 | # Visual Studio LightSwitch build output
238 | **/*.HTMLClient/GeneratedArtifacts
239 | **/*.DesktopClient/GeneratedArtifacts
240 | **/*.DesktopClient/ModelManifest.xml
241 | **/*.Server/GeneratedArtifacts
242 | **/*.Server/ModelManifest.xml
243 | _Pvt_Extensions
244 |
245 | # Paket dependency manager
246 | .paket/paket.exe
247 | paket-files/
248 |
249 | # FAKE - F# Make
250 | .fake/
251 |
252 | # JetBrains Rider
253 | .idea/
254 | *.sln.iml
255 |
256 | # CodeRush
257 | .cr/
258 |
259 | # Python Tools for Visual Studio (PTVS)
260 | __pycache__/
261 | *.pyc
--------------------------------------------------------------------------------
/SchoolManagement/Scripts/jquery.validate.unobtrusive.min.js:
--------------------------------------------------------------------------------
1 | // Unobtrusive validation support library for jQuery and jQuery Validate
2 | // Copyright (c) .NET Foundation. All rights reserved.
3 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
4 | // @version v3.2.11
5 | !function(a){"function"==typeof define&&define.amd?define("jquery.validate.unobtrusive",["jquery-validation"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery-validation")):jQuery.validator.unobtrusive=a(jQuery)}(function(a){function e(a,e,n){a.rules[e]=n,a.message&&(a.messages[e]=a.message)}function n(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function t(a){return a.replace(/([!"#$%&'()*+,.\/:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function r(a){return a.substr(0,a.lastIndexOf(".")+1)}function i(a,e){return 0===a.indexOf("*.")&&(a=a.replace("*.",e)),a}function o(e,n){var r=a(this).find("[data-valmsg-for='"+t(n[0].name)+"']"),i=r.attr("data-valmsg-replace"),o=i?a.parseJSON(i)!==!1:null;r.removeClass("field-validation-valid").addClass("field-validation-error"),e.data("unobtrusiveContainer",r),o?(r.empty(),e.removeClass("input-validation-error").appendTo(r)):e.hide()}function d(e,n){var t=a(this).find("[data-valmsg-summary=true]"),r=t.find("ul");r&&r.length&&n.errorList.length&&(r.empty(),t.addClass("validation-summary-errors").removeClass("validation-summary-valid"),a.each(n.errorList,function(){a(" ").html(this.message).appendTo(r)}))}function s(e){var n=e.data("unobtrusiveContainer");if(n){var t=n.attr("data-valmsg-replace"),r=t?a.parseJSON(t):null;n.addClass("field-validation-valid").removeClass("field-validation-error"),e.removeData("unobtrusiveContainer"),r&&n.empty()}}function l(e){var n=a(this),t="__jquery_unobtrusive_validation_form_reset";if(!n.data(t)){n.data(t,!0);try{n.data("validator").resetForm()}finally{n.removeData(t)}n.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors"),n.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}}function u(e){var n=a(e),t=n.data(v),r=a.proxy(l,e),i=f.unobtrusive.options||{},u=function(n,t){var r=i[n];r&&a.isFunction(r)&&r.apply(e,t)};return t||(t={options:{errorClass:i.errorClass||"input-validation-error",errorElement:i.errorElement||"span",errorPlacement:function(){o.apply(e,arguments),u("errorPlacement",arguments)},invalidHandler:function(){d.apply(e,arguments),u("invalidHandler",arguments)},messages:{},rules:{},success:function(){s.apply(e,arguments),u("success",arguments)}},attachValidation:function(){n.off("reset."+v,r).on("reset."+v,r).validate(this.options)},validate:function(){return n.validate(),n.valid()}},n.data(v,t)),t}var m,f=a.validator,v="unobtrusiveValidation";return f.unobtrusive={adapters:[],parseElement:function(e,n){var t,r,i,o=a(e),d=o.parents("form")[0];d&&(t=u(d),t.options.rules[e.name]=r={},t.options.messages[e.name]=i={},a.each(this.adapters,function(){var n="data-val-"+this.name,t=o.attr(n),s={};void 0!==t&&(n+="-",a.each(this.params,function(){s[this]=o.attr(n+this)}),this.adapt({element:e,form:d,message:t,params:s,rules:r,messages:i}))}),a.extend(r,{__dummy__:!0}),n||t.attachValidation())},parse:function(e){var n=a(e),t=n.parents().addBack().filter("form").add(n.find("form")).has("[data-val=true]");n.find("[data-val=true]").each(function(){f.unobtrusive.parseElement(this,!0)}),t.each(function(){var a=u(this);a&&a.attachValidation()})}},m=f.unobtrusive.adapters,m.add=function(a,e,n){return n||(n=e,e=[]),this.push({name:a,params:e,adapt:n}),this},m.addBool=function(a,n){return this.add(a,function(t){e(t,n||a,!0)})},m.addMinMax=function(a,n,t,r,i,o){return this.add(a,[i||"min",o||"max"],function(a){var i=a.params.min,o=a.params.max;i&&o?e(a,r,[i,o]):i?e(a,n,i):o&&e(a,t,o)})},m.addSingleVal=function(a,n,t){return this.add(a,[n||"val"],function(r){e(r,t||a,r.params[n])})},f.addMethod("__dummy__",function(a,e,n){return!0}),f.addMethod("regex",function(a,e,n){var t;return!!this.optional(e)||(t=new RegExp(n).exec(a),t&&0===t.index&&t[0].length===a.length)}),f.addMethod("nonalphamin",function(a,e,n){var t;return n&&(t=a.match(/\W/g),t=t&&t.length>=n),t}),f.methods.extension?(m.addSingleVal("accept","mimtype"),m.addSingleVal("extension","extension")):m.addSingleVal("extension","extension","accept"),m.addSingleVal("regex","pattern"),m.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"),m.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range"),m.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength"),m.add("equalto",["other"],function(n){var o=r(n.element.name),d=n.params.other,s=i(d,o),l=a(n.form).find(":input").filter("[name='"+t(s)+"']")[0];e(n,"equalTo",l)}),m.add("required",function(a){"INPUT"===a.element.tagName.toUpperCase()&&"CHECKBOX"===a.element.type.toUpperCase()||e(a,"required",!0)}),m.add("remote",["url","type","additionalfields"],function(o){var d={url:o.params.url,type:o.params.type||"GET",data:{}},s=r(o.element.name);a.each(n(o.params.additionalfields||o.element.name),function(e,n){var r=i(n,s);d.data[r]=function(){var e=a(o.form).find(":input").filter("[name='"+t(r)+"']");return e.is(":checkbox")?e.filter(":checked").val()||e.filter(":hidden").val()||"":e.is(":radio")?e.filter(":checked").val()||"":e.val()}}),e(o,"remote",d)}),m.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&e(a,"minlength",a.params.min),a.params.nonalphamin&&e(a,"nonalphamin",a.params.nonalphamin),a.params.regex&&e(a,"regex",a.params.regex)}),m.add("fileextensions",["extensions"],function(a){e(a,"extension",a.params.extensions)}),a(function(){f.unobtrusive.parse(document)}),f.unobtrusive});
--------------------------------------------------------------------------------
/SchoolManagement/ApplicationInsights.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
12 | search|spider|crawl|Bot|Monitor|AlwaysOn
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
54 | System.Web.Handlers.TransferRequestHandler
55 | Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.RequestDataHttpHandler
56 | System.Web.StaticFileHandler
57 | System.Web.Handlers.AssemblyResourceLoader
58 | System.Web.Optimization.BundleHandler
59 | System.Web.Script.Services.ScriptHandlerFactory
60 | System.Web.Handlers.TraceHandler
61 | System.Web.Services.Discovery.DiscoveryRequestHandler
62 | System.Web.HttpDebugHandler
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | 5
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/SchoolManagement/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
21 | @foreach (AuthenticationDescription p in loginProviders) { 22 | 23 | } 24 |
25 |