├── SchoolManagement ├── Views │ ├── _ViewStart.cshtml │ ├── Home │ │ ├── TestView.cshtml │ │ ├── About.cshtml │ │ ├── Contact.cshtml │ │ └── Index.cshtml │ ├── Account │ │ ├── ExternalLoginFailure.cshtml │ │ ├── ForgotPasswordConfirmation.cshtml │ │ ├── ConfirmEmail.cshtml │ │ ├── ResetPasswordConfirmation.cshtml │ │ ├── SendCode.cshtml │ │ ├── ForgotPassword.cshtml │ │ ├── _ExternalLoginsListPartial.cshtml │ │ ├── VerifyCode.cshtml │ │ ├── ExternalLoginConfirmation.cshtml │ │ ├── ResetPassword.cshtml │ │ ├── Register.cshtml │ │ └── Login.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ ├── Lockout.cshtml │ │ ├── _LoginPartial.cshtml │ │ └── _Layout.cshtml │ ├── Courses │ │ ├── Details.cshtml │ │ ├── Delete.cshtml │ │ ├── Index.cshtml │ │ ├── Create.cshtml │ │ └── Edit.cshtml │ ├── Lecturers │ │ ├── Details.cshtml │ │ ├── Delete.cshtml │ │ ├── Index.cshtml │ │ ├── Create.cshtml │ │ └── Edit.cshtml │ ├── Manage │ │ ├── AddPhoneNumber.cshtml │ │ ├── VerifyPhoneNumber.cshtml │ │ ├── SetPassword.cshtml │ │ ├── ChangePassword.cshtml │ │ ├── ManageLogins.cshtml │ │ └── Index.cshtml │ ├── Students │ │ ├── Delete.cshtml │ │ ├── Index.cshtml │ │ ├── Details.cshtml │ │ ├── Create.cshtml │ │ └── Edit.cshtml │ ├── Enrollments │ │ ├── Details.cshtml │ │ ├── _enrollmentPartial.cshtml │ │ ├── Delete.cshtml │ │ ├── Index.cshtml │ │ ├── Edit.cshtml │ │ └── Create.cshtml │ └── Web.config ├── favicon.ico ├── Global.asax ├── Content │ ├── Images │ │ ├── slide-1.jpg │ │ ├── slide-2.jpg │ │ └── slide-3.jpg │ ├── themes │ │ └── base │ │ │ ├── images │ │ │ ├── ui-icons_222222_256x240.png │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ ├── ui-icons_444444_256x240.png │ │ │ ├── ui-icons_454545_256x240.png │ │ │ ├── ui-icons_555555_256x240.png │ │ │ ├── ui-icons_777620_256x240.png │ │ │ ├── ui-icons_777777_256x240.png │ │ │ ├── ui-icons_888888_256x240.png │ │ │ ├── ui-icons_cc0000_256x240.png │ │ │ ├── ui-icons_cd0a0a_256x240.png │ │ │ ├── ui-icons_ffffff_256x240.png │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ │ ├── sortable.css │ │ │ ├── draggable.css │ │ │ ├── all.css │ │ │ ├── autocomplete.css │ │ │ ├── selectable.css │ │ │ ├── tooltip.css │ │ │ ├── base.css │ │ │ ├── accordion.css │ │ │ ├── selectmenu.css │ │ │ ├── menu.css │ │ │ ├── tabs.css │ │ │ ├── spinner.css │ │ │ ├── resizable.css │ │ │ ├── dialog.css │ │ │ ├── slider.css │ │ │ ├── core.css │ │ │ ├── progressbar.css │ │ │ ├── button.css │ │ │ └── datepicker.css │ └── Site.css ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── App_Start │ ├── FilterConfig.cs │ ├── RouteConfig.cs │ ├── BundleConfig.cs │ ├── Startup.Auth.cs │ └── IdentityConfig.cs ├── Models │ ├── SchoolManagementDBModel.cs │ ├── MetaClasses │ │ ├── CoursesMetadata.cs │ │ ├── StudentMetadata.cs │ │ └── EnrollmentMetadata.cs │ ├── SchoolManagementDBModel.Designer.cs │ ├── Enrollment.cs │ ├── Course.cs │ ├── Lecturer.cs │ ├── SchoolManagementDBModel.Context.cs │ ├── IdentityModels.cs │ ├── SchoolManagementDBModel.edmx.diagram │ ├── Student.cs │ ├── ManageViewModels.cs │ └── AccountViewModels.cs ├── Migrations │ ├── 201904172309036_Added BirthDate.cs │ ├── 201904092248030_InitialCreate.Designer.cs │ ├── 201904172309036_Added BirthDate.Designer.cs │ ├── Configuration.cs │ └── 201904092248030_InitialCreate.cs ├── Global.asax.cs ├── Controllers │ ├── HomeController.cs │ ├── CoursesController.cs │ ├── LecturersController.cs │ └── StudentsController.cs ├── Web.Debug.config ├── Web.Release.config ├── Properties │ └── AssemblyInfo.cs ├── Startup.cs ├── packages.config ├── Scripts │ ├── jquery.unobtrusive-ajax.min.js │ ├── respond.min.js │ ├── respond.matchmedia.addListener.min.js │ └── jquery.validate.unobtrusive.min.js ├── ApplicationInsights.config └── Web.config ├── SchoolManagement.sln ├── .gitattributes └── .gitignore /SchoolManagement/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /SchoolManagement/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/favicon.ico -------------------------------------------------------------------------------- /SchoolManagement/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="SchoolManagement.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /SchoolManagement/Content/Images/slide-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/Images/slide-1.jpg -------------------------------------------------------------------------------- /SchoolManagement/Content/Images/slide-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/Images/slide-2.jpg -------------------------------------------------------------------------------- /SchoolManagement/Content/Images/slide-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/Images/slide-3.jpg -------------------------------------------------------------------------------- /SchoolManagement/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /SchoolManagement/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /SchoolManagement/Views/Home/TestView.cshtml: -------------------------------------------------------------------------------- 1 | 2 | @{ 3 | ViewBag.Title = "TestView"; 4 | } 5 | 6 |

TestView

7 | 8 |

Hello World!

9 | 10 | -------------------------------------------------------------------------------- /SchoolManagement/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /SchoolManagement/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "About"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-icons_444444_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-icons_444444_256x240.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-icons_555555_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-icons_555555_256x240.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-icons_777620_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-icons_777620_256x240.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-icons_777777_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-icons_777777_256x240.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-icons_cc0000_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-icons_cc0000_256x240.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trevoirwilliams/SchoolManagement-MVC/HEAD/SchoolManagement/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /SchoolManagement/Views/Account/ExternalLoginFailure.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Login Failure"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |

Unsuccessful login with service.

8 |
9 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Shared/Lockout.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Locked Out"; 5 | } 6 | 7 |
8 |

Locked out.

9 |

This account has been locked out, please try again later.

10 |
11 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Account/ForgotPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Forgot Password Confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |
8 |
9 |

10 | Please check your email to reset your password. 11 |

12 |
13 | 14 | -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/sortable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Sortable 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 | .ui-sortable-handle { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/draggable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Draggable 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 | .ui-draggable-handle { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Account/ConfirmEmail.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Confirm Email"; 3 | } 4 | 5 |

@ViewBag.Title.

6 |
7 |

8 | Thank you for confirming your email. Please @Html.ActionLink("Click here to Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 9 |

10 |
11 | -------------------------------------------------------------------------------- /SchoolManagement/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace SchoolManagement 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/all.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 | @import "base.css"; 12 | @import "theme.css"; 13 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Account/ResetPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Reset password confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |
8 |
9 |

10 | Your password has been reset. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 11 |

12 |
13 | -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/autocomplete.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Autocomplete 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/autocomplete/#theming 10 | */ 11 | .ui-autocomplete { 12 | position: absolute; 13 | top: 0; 14 | left: 0; 15 | cursor: default; 16 | } 17 | -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/selectable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectable 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 | .ui-selectable { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | .ui-selectable-helper { 14 | position: absolute; 15 | z-index: 100; 16 | border: 1px dotted black; 17 | } 18 | -------------------------------------------------------------------------------- /SchoolManagement/Models/SchoolManagementDBModel.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
-------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/tooltip.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Tooltip 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/tooltip/#theming 10 | */ 11 | .ui-tooltip { 12 | padding: 8px; 13 | position: absolute; 14 | z-index: 9999; 15 | max-width: 300px; 16 | -webkit-box-shadow: 0 0 5px #aaa; 17 | box-shadow: 0 0 5px #aaa; 18 | } 19 | body .ui-tooltip { 20 | border-width: 2px; 21 | } 22 | -------------------------------------------------------------------------------- /SchoolManagement/Migrations/201904172309036_Added BirthDate.cs: -------------------------------------------------------------------------------- 1 | namespace SchoolManagement.Migrations 2 | { 3 | using System; 4 | using System.Data.Entity.Migrations; 5 | 6 | public partial class AddedBirthDate : DbMigration 7 | { 8 | public override void Up() 9 | { 10 | AddColumn("dbo.AspNetUsers", "BirthDate", c => c.DateTime(nullable: false)); 11 | } 12 | 13 | public override void Down() 14 | { 15 | DropColumn("dbo.AspNetUsers", "BirthDate"); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SchoolManagement/Models/MetaClasses/CoursesMetadata.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | 8 | namespace SchoolManagement.Models 9 | { 10 | public class CoursesMetadata 11 | { 12 | [StringLength(50)] 13 | public string Title { get; set; } 14 | [Range(1,8)] 15 | public int Credits { get; set; } 16 | } 17 | 18 | [MetadataType(typeof(CoursesMetadata))] 19 | public partial class Course 20 | { 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /SchoolManagement/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Override the default bootstrap behavior where horizontal description lists 13 | will truncate terms that are too long to fit in the left column 14 | */ 15 | .dl-horizontal dt { 16 | white-space: normal; 17 | } 18 | 19 | /* Set width on the form input elements since they're 100% wide by default */ 20 | input, 21 | select, 22 | textarea { 23 | max-width: 280px; 24 | } 25 | -------------------------------------------------------------------------------- /SchoolManagement/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Optimization; 7 | using System.Web.Routing; 8 | 9 | namespace SchoolManagement 10 | { 11 | public class MvcApplication : System.Web.HttpApplication 12 | { 13 | protected void Application_Start() 14 | { 15 | AreaRegistration.RegisterAllAreas(); 16 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 17 | RouteConfig.RegisterRoutes(RouteTable.Routes); 18 | BundleConfig.RegisterBundles(BundleTable.Bundles); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SchoolManagement/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace SchoolManagement 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SchoolManagement/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace SchoolManagement.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public ActionResult Index() 12 | { 13 | return View(); 14 | } 15 | 16 | public ActionResult About() 17 | { 18 | ViewBag.Message = "Your application description page."; 19 | 20 | return View(); 21 | } 22 | 23 | public ActionResult Contact() 24 | { 25 | ViewBag.Message = "Your contact page."; 26 | 27 | return View(); 28 | } 29 | 30 | public ActionResult TestView() 31 | { 32 | return View(); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /SchoolManagement/Views/Courses/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.Course 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | Layout = "~/Views/Shared/_Layout.cshtml"; 6 | } 7 | 8 |

Details

9 | 10 |
11 |

Course

12 |
13 |
14 |
15 | @Html.DisplayNameFor(model => model.Title) 16 |
17 | 18 |
19 | @Html.DisplayFor(model => model.Title) 20 |
21 | 22 |
23 | @Html.DisplayNameFor(model => model.Credits) 24 |
25 | 26 |
27 | @Html.DisplayFor(model => model.Credits) 28 |
29 | 30 |
31 |
32 |

33 | @Html.ActionLink("Edit", "Edit", new { id = Model.CourseId }) | 34 | @Html.ActionLink("Back to List", "Index") 35 |

36 | -------------------------------------------------------------------------------- /SchoolManagement/Models/SchoolManagementDBModel.Designer.cs: -------------------------------------------------------------------------------- 1 | // T4 code generation is enabled for model 'C:\Users\USER\source\repos\SchoolManagement\SchoolManagement\Models\SchoolManagementDBModel.edmx'. 2 | // To enable legacy code generation, change the value of the 'Code Generation Strategy' designer 3 | // property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model 4 | // is open in the designer. 5 | 6 | // If no context and entity classes have been generated, it may be because you created an empty model but 7 | // have not yet chosen which version of Entity Framework to use. To generate a context class and entity 8 | // classes for your model, open the model in the designer, right-click on the designer surface, and 9 | // select 'Update Model from Database...', 'Generate Database from Model...', or 'Add Code Generation 10 | // Item...'. -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/base.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 | @import url("core.css"); 12 | 13 | @import url("accordion.css"); 14 | @import url("autocomplete.css"); 15 | @import url("button.css"); 16 | @import url("datepicker.css"); 17 | @import url("dialog.css"); 18 | @import url("draggable.css"); 19 | @import url("menu.css"); 20 | @import url("progressbar.css"); 21 | @import url("resizable.css"); 22 | @import url("selectable.css"); 23 | @import url("selectmenu.css"); 24 | @import url("sortable.css"); 25 | @import url("slider.css"); 26 | @import url("spinner.css"); 27 | @import url("tabs.css"); 28 | @import url("tooltip.css"); 29 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Lecturers/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.Lecturer 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | Layout = "~/Views/Shared/_Layout.cshtml"; 6 | } 7 | 8 |

Details

9 | 10 |
11 |

Lecturer

12 |
13 |
14 |
15 | @Html.DisplayNameFor(model => model.First_Name) 16 |
17 | 18 |
19 | @Html.DisplayFor(model => model.First_Name) 20 |
21 | 22 |
23 | @Html.DisplayNameFor(model => model.Last_Name) 24 |
25 | 26 |
27 | @Html.DisplayFor(model => model.Last_Name) 28 |
29 | 30 |
31 |
32 |

33 | @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) | 34 | @Html.ActionLink("Back to List", "Index") 35 |

36 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Account/SendCode.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.SendCodeViewModel 2 | @{ 3 | ViewBag.Title = "Send"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("SendCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { 9 | @Html.AntiForgeryToken() 10 | @Html.Hidden("rememberMe", @Model.RememberMe) 11 |

Send verification code

12 |
13 |
14 |
15 | Select Two-Factor Authentication Provider: 16 | @Html.DropDownListFor(model => model.SelectedProvider, Model.Providers) 17 | 18 |
19 |
20 | } 21 | 22 | @section Scripts { 23 | @Scripts.Render("~/bundles/jqueryval") 24 | } 25 | -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/accordion.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Accordion 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/accordion/#theming 10 | */ 11 | .ui-accordion .ui-accordion-header { 12 | display: block; 13 | cursor: pointer; 14 | position: relative; 15 | margin: 2px 0 0 0; 16 | padding: .5em .5em .5em .7em; 17 | min-height: 0; /* support: IE7 */ 18 | font-size: 100%; 19 | } 20 | .ui-accordion .ui-accordion-icons { 21 | padding-left: 2.2em; 22 | } 23 | .ui-accordion .ui-accordion-icons .ui-accordion-icons { 24 | padding-left: 2.2em; 25 | } 26 | .ui-accordion .ui-accordion-header .ui-accordion-header-icon { 27 | position: absolute; 28 | left: .5em; 29 | top: 50%; 30 | margin-top: -8px; 31 | } 32 | .ui-accordion .ui-accordion-content { 33 | padding: 1em 2.2em; 34 | border-top: 0; 35 | overflow: auto; 36 | } 37 | -------------------------------------------------------------------------------- /SchoolManagement/Migrations/201904092248030_InitialCreate.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | namespace SchoolManagement.Migrations 3 | { 4 | using System.CodeDom.Compiler; 5 | using System.Data.Entity.Migrations; 6 | using System.Data.Entity.Migrations.Infrastructure; 7 | using System.Resources; 8 | 9 | [GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")] 10 | public sealed partial class InitialCreate : IMigrationMetadata 11 | { 12 | private readonly ResourceManager Resources = new ResourceManager(typeof(InitialCreate)); 13 | 14 | string IMigrationMetadata.Id 15 | { 16 | get { return "201904092248030_InitialCreate"; } 17 | } 18 | 19 | string IMigrationMetadata.Source 20 | { 21 | get { return null; } 22 | } 23 | 24 | string IMigrationMetadata.Target 25 | { 26 | get { return Resources.GetString("Target"); } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNet.Identity 2 | @if (Request.IsAuthenticated) 3 | { 4 | using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) 5 | { 6 | @Html.AntiForgeryToken() 7 | 8 | 14 | } 15 | } 16 | else 17 | { 18 | 22 | } 23 | -------------------------------------------------------------------------------- /SchoolManagement/Migrations/201904172309036_Added BirthDate.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | namespace SchoolManagement.Migrations 3 | { 4 | using System.CodeDom.Compiler; 5 | using System.Data.Entity.Migrations; 6 | using System.Data.Entity.Migrations.Infrastructure; 7 | using System.Resources; 8 | 9 | [GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")] 10 | public sealed partial class AddedBirthDate : IMigrationMetadata 11 | { 12 | private readonly ResourceManager Resources = new ResourceManager(typeof(AddedBirthDate)); 13 | 14 | string IMigrationMetadata.Id 15 | { 16 | get { return "201904172309036_Added BirthDate"; } 17 | } 18 | 19 | string IMigrationMetadata.Source 20 | { 21 | get { return null; } 22 | } 23 | 24 | string IMigrationMetadata.Target 25 | { 26 | get { return Resources.GetString("Target"); } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Manage/AddPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.AddPhoneNumberViewModel 2 | @{ 3 | ViewBag.Title = "Phone Number"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("AddPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Add a phone number

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.Number, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => m.Number, new { @class = "form-control" }) 18 |
19 |
20 |
21 |
22 | 23 |
24 |
25 | } 26 | 27 | @section Scripts { 28 | @Scripts.Render("~/bundles/jqueryval") 29 | } 30 | -------------------------------------------------------------------------------- /SchoolManagement/Models/MetaClasses/StudentMetadata.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | namespace SchoolManagement.Models 8 | { 9 | public class StudentMetadata 10 | { 11 | [StringLength(50)] 12 | [Display(Name ="Last Name")] 13 | public string LastName { get; set; } 14 | 15 | [StringLength(50)] 16 | [Display(Name = "First Name")] 17 | public string FirstName { get; set; } 18 | 19 | [Display(Name = "Date of Enrollment")] 20 | public Nullable EnrollmentDate { get; set; } 21 | 22 | [StringLength(50)] 23 | [Display(Name = "Middle Name")] 24 | public string MiddleName { get; set; } 25 | 26 | [Display(Name = "Date of Birth")] 27 | public Nullable DateOfBirth { get; set; } 28 | } 29 | 30 | [MetadataType(typeof(StudentMetadata))] 31 | public partial class Student { } 32 | } -------------------------------------------------------------------------------- /SchoolManagement/Views/Account/ForgotPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.ForgotPasswordViewModel 2 | @{ 3 | ViewBag.Title = "Forgot your password?"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("ForgotPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Enter your email.

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 18 |
19 |
20 |
21 |
22 | 23 |
24 |
25 | } 26 | 27 | @section Scripts { 28 | @Scripts.Render("~/bundles/jqueryval") 29 | } 30 | -------------------------------------------------------------------------------- /SchoolManagement/Models/MetaClasses/EnrollmentMetadata.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | namespace SchoolManagement.Models 8 | { 9 | public class EnrollmentMetadata 10 | { 11 | [Display(Name = "Student Grade")] 12 | public Nullable Grade { get; set; } 13 | [Display(Name = "Course")] 14 | public int CourseID { get; set; } 15 | [Display(Name = "Course")] 16 | public Course Course { get; set; } 17 | [Display(Name = "Student")] 18 | public int StudentID { get; set; } 19 | [Display(Name = "Student")] 20 | public Student Student { get; set; } 21 | [Display(Name = "Lecturer")] 22 | public Nullable LecturerId { get; set; } 23 | [Display(Name = "Lecturer")] 24 | public Lecturer Lecturer { get; set; } 25 | } 26 | 27 | [MetadataType(typeof(EnrollmentMetadata))] 28 | public partial class Enrollment { } 29 | } -------------------------------------------------------------------------------- /SchoolManagement/Views/Lecturers/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.Lecturer 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | Layout = "~/Views/Shared/_Layout.cshtml"; 6 | } 7 | 8 |

Delete

9 | 10 |

Are you sure you want to delete this?

11 |
12 |

Lecturer

13 |
14 |
15 |
16 | @Html.DisplayNameFor(model => model.First_Name) 17 |
18 | 19 |
20 | @Html.DisplayFor(model => model.First_Name) 21 |
22 | 23 |
24 | @Html.DisplayNameFor(model => model.Last_Name) 25 |
26 | 27 |
28 | @Html.DisplayFor(model => model.Last_Name) 29 |
30 | 31 |
32 | 33 | @using (Html.BeginForm()) { 34 | @Html.AntiForgeryToken() 35 | 36 |
37 | | 38 | @Html.ActionLink("Back to List", "Index") 39 |
40 | } 41 |
42 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Courses/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.Course 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | Layout = "~/Views/Shared/_Layout.cshtml"; 6 | } 7 | 8 |

Delete

9 | 10 |

Are you sure you want to delete this?

11 |
12 |

Course

13 |
14 |
15 |
16 | @Html.DisplayNameFor(model => model.Title) 17 |
18 | 19 |
20 | @Html.DisplayFor(model => model.Title) 21 |
22 | 23 |
24 | @Html.DisplayNameFor(model => model.Credits) 25 |
26 | 27 |
28 | @Html.DisplayFor(model => model.Credits) 29 |
30 | 31 |
32 | 33 | @using (Html.BeginForm()) { 34 | @Html.AntiForgeryToken() 35 | 36 |
37 | | 38 | @Html.ActionLink("Back to List", "Index") 39 |
40 | } 41 |
42 | -------------------------------------------------------------------------------- /SchoolManagement/Models/Enrollment.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace SchoolManagement.Models 11 | { 12 | using System; 13 | using System.Collections.Generic; 14 | 15 | public partial class Enrollment 16 | { 17 | public int EnrollmentID { get; set; } 18 | public Nullable Grade { get; set; } 19 | public int CourseID { get; set; } 20 | public int StudentID { get; set; } 21 | public Nullable LecturerId { get; set; } 22 | 23 | public virtual Course Course { get; set; } 24 | public virtual Student Student { get; set; } 25 | public virtual Lecturer Lecturer { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Courses/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 | @{ 4 | ViewBag.Title = "Index"; 5 | Layout = "~/Views/Shared/_Layout.cshtml"; 6 | } 7 | 8 |

Index

9 | 10 |

11 | @Html.ActionLink("Create New", "Create") 12 |

13 | 14 | 15 | 18 | 21 | 22 | 23 | 24 | @foreach (var item in Model) { 25 | 26 | 29 | 32 | 37 | 38 | } 39 | 40 |
16 | @Html.DisplayNameFor(model => model.Title) 17 | 19 | @Html.DisplayNameFor(model => model.Credits) 20 |
27 | @Html.DisplayFor(modelItem => item.Title) 28 | 30 | @Html.DisplayFor(modelItem => item.Credits) 31 | 33 | @Html.ActionLink("Edit", "Edit", new { id=item.CourseId }) | 34 | @Html.ActionLink("Details", "Details", new { id=item.CourseId }) | 35 | @Html.ActionLink("Delete", "Delete", new { id=item.CourseId }) 36 |
41 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Lecturers/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 | @{ 4 | ViewBag.Title = "Index"; 5 | Layout = "~/Views/Shared/_Layout.cshtml"; 6 | } 7 | 8 |

Index

9 | 10 |

11 | @Html.ActionLink("Create New", "Create") 12 |

13 | 14 | 15 | 18 | 21 | 22 | 23 | 24 | @foreach (var item in Model) { 25 | 26 | 29 | 32 | 37 | 38 | } 39 | 40 |
16 | @Html.DisplayNameFor(model => model.First_Name) 17 | 19 | @Html.DisplayNameFor(model => model.Last_Name) 20 |
27 | @Html.DisplayFor(modelItem => item.First_Name) 28 | 30 | @Html.DisplayFor(modelItem => item.Last_Name) 31 | 33 | @Html.ActionLink("Edit", "Edit", new { id=item.Id }) | 34 | @Html.ActionLink("Details", "Details", new { id=item.Id }) | 35 | @Html.ActionLink("Delete", "Delete", new { id=item.Id }) 36 |
41 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Manage/VerifyPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.VerifyPhoneNumberViewModel 2 | @{ 3 | ViewBag.Title = "Verify Phone Number"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("VerifyPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 | @Html.Hidden("phoneNumber", @Model.PhoneNumber) 12 |

Enter verification code

13 |
@ViewBag.Status
14 |
15 | @Html.ValidationSummary("", new { @class = "text-danger" }) 16 |
17 | @Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" }) 18 |
19 | @Html.TextBoxFor(m => m.Code, new { @class = "form-control" }) 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 | } 28 | 29 | @section Scripts { 30 | @Scripts.Render("~/bundles/jqueryval") 31 | } 32 | -------------------------------------------------------------------------------- /SchoolManagement.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27428.2027 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SchoolManagement", "SchoolManagement\SchoolManagement.csproj", "{AE64B79D-3791-4BA1-AD8A-6255E284FC03}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {AE64B79D-3791-4BA1-AD8A-6255E284FC03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {AE64B79D-3791-4BA1-AD8A-6255E284FC03}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {AE64B79D-3791-4BA1-AD8A-6255E284FC03}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {AE64B79D-3791-4BA1-AD8A-6255E284FC03}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {C9F777A9-A9C8-4960-ADF7-D11CF0DE0132} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /SchoolManagement/Migrations/Configuration.cs: -------------------------------------------------------------------------------- 1 | namespace SchoolManagement.Migrations 2 | { 3 | using System; 4 | using System.Data.Entity; 5 | using System.Data.Entity.Migrations; 6 | using System.Linq; 7 | 8 | internal sealed class Configuration : DbMigrationsConfiguration 9 | { 10 | public Configuration() 11 | { 12 | AutomaticMigrationsEnabled = false; 13 | ContextKey = "SchoolManagement.Models.ApplicationDbContext"; 14 | } 15 | 16 | protected override void Seed(SchoolManagement.Models.ApplicationDbContext context) 17 | { 18 | // This method will be called after migrating to the latest version. 19 | 20 | // You can use the DbSet.AddOrUpdate() helper extension method 21 | // to avoid creating duplicate seed data. E.g. 22 | // 23 | // context.People.AddOrUpdate( 24 | // p => p.FullName, 25 | // new Person { FullName = "Andrew Peters" }, 26 | // new Person { FullName = "Brice Lambson" }, 27 | // new Person { FullName = "Rowan Miller" } 28 | // ); 29 | // 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /SchoolManagement/Models/Course.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace SchoolManagement.Models 11 | { 12 | using System; 13 | using System.Collections.Generic; 14 | 15 | public partial class Course 16 | { 17 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] 18 | public Course() 19 | { 20 | this.Enrollments = new HashSet(); 21 | } 22 | 23 | public int CourseId { get; set; } 24 | public string Title { get; set; } 25 | public int Credits { get; set; } 26 | 27 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] 28 | public virtual ICollection Enrollments { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /SchoolManagement/Models/Lecturer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace SchoolManagement.Models 11 | { 12 | using System; 13 | using System.Collections.Generic; 14 | 15 | public partial class Lecturer 16 | { 17 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] 18 | public Lecturer() 19 | { 20 | this.Enrollments = new HashSet(); 21 | } 22 | 23 | public int Id { get; set; } 24 | public string First_Name { get; set; } 25 | public string Last_Name { get; set; } 26 | 27 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] 28 | public virtual ICollection Enrollments { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Students/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.Student 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | Layout = "~/Views/Shared/_Layout.cshtml"; 6 | } 7 | 8 |

Delete

9 | 10 |

Are you sure you want to delete this?

11 |
12 |

Student

13 |
14 |
15 |
16 | @Html.DisplayNameFor(model => model.LastName) 17 |
18 | 19 |
20 | @Html.DisplayFor(model => model.LastName) 21 |
22 | 23 |
24 | @Html.DisplayNameFor(model => model.FirstName) 25 |
26 | 27 |
28 | @Html.DisplayFor(model => model.FirstName) 29 |
30 | 31 |
32 | @Html.DisplayNameFor(model => model.EnrollmentDate) 33 |
34 | 35 |
36 | @Html.DisplayFor(model => model.EnrollmentDate) 37 |
38 | 39 |
40 | 41 | @using (Html.BeginForm()) { 42 | @Html.AntiForgeryToken() 43 | 44 |
45 | | 46 | @Html.ActionLink("Back to List", "Index") 47 |
48 | } 49 |
50 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Enrollments/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.Enrollment 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | Layout = "~/Views/Shared/_Layout.cshtml"; 6 | } 7 | 8 |

Details

9 | 10 |
11 |

Enrollment

12 |
13 |
14 |
15 | @Html.DisplayNameFor(model => model.Grade) 16 |
17 | 18 |
19 | @Html.DisplayFor(model => model.Grade) 20 |
21 | 22 |
23 | @Html.DisplayNameFor(model => model.Course.Title) 24 |
25 | 26 |
27 | @Html.DisplayFor(model => model.Course.Title) 28 |
29 | 30 |
31 | @Html.DisplayNameFor(model => model.Student.LastName) 32 |
33 | 34 |
35 | @Html.DisplayFor(model => model.Student.LastName) 36 |
37 | 38 |
39 | @Html.DisplayNameFor(model => model.Lecturer.First_Name) 40 |
41 | 42 |
43 | @Html.DisplayFor(model => model.Lecturer.First_Name) 44 |
45 | 46 |
47 |
48 |

49 | @Html.ActionLink("Edit", "Edit", new { id = Model.EnrollmentID }) | 50 | @Html.ActionLink("Back to List", "Index") 51 |

52 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Students/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 | @{ 4 | ViewBag.Title = "Index"; 5 | Layout = "~/Views/Shared/_Layout.cshtml"; 6 | } 7 | 8 |

Index

9 | 10 |

11 | @Html.ActionLink("Create New", "Create") 12 |

13 | 14 | 15 | 18 | 21 | 24 | 25 | 26 | 27 | @foreach (var item in Model) { 28 | 29 | 32 | 35 | 38 | 43 | 44 | } 45 | 46 |
16 | @Html.DisplayNameFor(model => model.LastName) 17 | 19 | @Html.DisplayNameFor(model => model.FirstName) 20 | 22 | @Html.DisplayNameFor(model => model.EnrollmentDate) 23 |
30 | @Html.DisplayFor(modelItem => item.LastName) 31 | 33 | @Html.DisplayFor(modelItem => item.FirstName) 34 | 36 | @Html.DisplayFor(modelItem => item.EnrollmentDate) 37 | 39 | @Html.ActionLink("Edit", "Edit", new { id=item.StudentID }) | 40 | @Html.ActionLink("Details", "Details", new { id=item.StudentID }) | 41 | @Html.ActionLink("Delete", "Delete", new { id=item.StudentID }) 42 |
47 | -------------------------------------------------------------------------------- /SchoolManagement/Models/SchoolManagementDBModel.Context.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace SchoolManagement.Models 11 | { 12 | using System; 13 | using System.Data.Entity; 14 | using System.Data.Entity.Infrastructure; 15 | 16 | public partial class SchoolManagement_DBEntities : DbContext 17 | { 18 | public SchoolManagement_DBEntities() 19 | : base("name=SchoolManagement_DBEntities") 20 | { 21 | } 22 | 23 | protected override void OnModelCreating(DbModelBuilder modelBuilder) 24 | { 25 | throw new UnintentionalCodeFirstException(); 26 | } 27 | 28 | public virtual DbSet Courses { get; set; } 29 | public virtual DbSet Enrollments { get; set; } 30 | public virtual DbSet Students { get; set; } 31 | public virtual DbSet Lecturers { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Account/_ExternalLoginsListPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.ExternalLoginListViewModel 2 | @using Microsoft.Owin.Security 3 | 4 |

Use another service to log in.

5 |
6 | @{ 7 | var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes(); 8 | if (loginProviders.Count() == 0) { 9 |
10 |

11 | There are no external authentication services configured. See this article 12 | for details on setting up this ASP.NET application to support logging in via external services. 13 |

14 |
15 | } 16 | else { 17 | using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) { 18 | @Html.AntiForgeryToken() 19 |
20 |

21 | @foreach (AuthenticationDescription p in loginProviders) { 22 | 23 | } 24 |

25 |
26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Enrollments/_enrollmentPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 | @if (Model.Count() < 1) 4 | { 5 |

NO ENROLLMENTS IN THIS COURSE

6 | } 7 | else 8 | { 9 | 10 | 11 | 14 | 17 | 20 | 21 | 22 | 23 | @foreach (var item in Model) 24 | { 25 | 26 | 29 | 32 | 35 | 38 | 39 | } 40 | 41 |
12 | @Html.DisplayNameFor(model => model.Grade) 13 | 15 | @Html.DisplayNameFor(model => model.Course.Title) 16 | 18 | Student Name 19 | Action
27 | @Html.DisplayFor(modelItem => item.Grade) 28 | 30 | @Html.DisplayFor(modelItem => item.Course.Title) 31 | 33 | @Html.DisplayFor(modelItem => item.Student.FirstName) @Html.DisplayFor(modelItem => item.Student.LastName) 34 | 36 | @Html.ActionLink("Delete", "Delete", new { id = item.EnrollmentID }) 37 |
42 | } 43 | 44 | -------------------------------------------------------------------------------- /SchoolManagement/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/selectmenu.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectmenu 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/selectmenu/#theming 10 | */ 11 | .ui-selectmenu-menu { 12 | padding: 0; 13 | margin: 0; 14 | position: absolute; 15 | top: 0; 16 | left: 0; 17 | display: none; 18 | } 19 | .ui-selectmenu-menu .ui-menu { 20 | overflow: auto; 21 | /* Support: IE7 */ 22 | overflow-x: hidden; 23 | padding-bottom: 1px; 24 | } 25 | .ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { 26 | font-size: 1em; 27 | font-weight: bold; 28 | line-height: 1.5; 29 | padding: 2px 0.4em; 30 | margin: 0.5em 0 0 0; 31 | height: auto; 32 | border: 0; 33 | } 34 | .ui-selectmenu-open { 35 | display: block; 36 | } 37 | .ui-selectmenu-button { 38 | display: inline-block; 39 | overflow: hidden; 40 | position: relative; 41 | text-decoration: none; 42 | cursor: pointer; 43 | } 44 | .ui-selectmenu-button span.ui-icon { 45 | right: 0.5em; 46 | left: auto; 47 | margin-top: -8px; 48 | position: absolute; 49 | top: 50%; 50 | } 51 | .ui-selectmenu-button span.ui-selectmenu-text { 52 | text-align: left; 53 | padding: 0.4em 2.1em 0.4em 1em; 54 | display: block; 55 | line-height: 1.4; 56 | overflow: hidden; 57 | text-overflow: ellipsis; 58 | white-space: nowrap; 59 | } 60 | -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/menu.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Menu 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/menu/#theming 10 | */ 11 | .ui-menu { 12 | list-style: none; 13 | padding: 0; 14 | margin: 0; 15 | display: block; 16 | outline: none; 17 | } 18 | .ui-menu .ui-menu { 19 | position: absolute; 20 | } 21 | .ui-menu .ui-menu-item { 22 | position: relative; 23 | margin: 0; 24 | padding: 3px 1em 3px .4em; 25 | cursor: pointer; 26 | min-height: 0; /* support: IE7 */ 27 | /* support: IE10, see #8844 */ 28 | list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); 29 | } 30 | .ui-menu .ui-menu-divider { 31 | margin: 5px 0; 32 | height: 0; 33 | font-size: 0; 34 | line-height: 0; 35 | border-width: 1px 0 0 0; 36 | } 37 | .ui-menu .ui-state-focus, 38 | .ui-menu .ui-state-active { 39 | margin: -1px; 40 | } 41 | 42 | /* icon support */ 43 | .ui-menu-icons { 44 | position: relative; 45 | } 46 | .ui-menu-icons .ui-menu-item { 47 | padding-left: 2em; 48 | } 49 | 50 | /* left-aligned */ 51 | .ui-menu .ui-icon { 52 | position: absolute; 53 | top: 0; 54 | bottom: 0; 55 | left: .2em; 56 | margin: auto 0; 57 | } 58 | 59 | /* right-aligned */ 60 | .ui-menu .ui-menu-icon { 61 | left: auto; 62 | right: 0; 63 | } 64 | -------------------------------------------------------------------------------- /SchoolManagement/Models/IdentityModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data.Entity; 3 | using System.Security.Claims; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Identity; 6 | using Microsoft.AspNet.Identity.EntityFramework; 7 | 8 | namespace SchoolManagement.Models 9 | { 10 | // You can add profile data for the user by adding more properties to your ApplicationUser class, please visit https://go.microsoft.com/fwlink/?LinkID=317594 to learn more. 11 | public class ApplicationUser : IdentityUser 12 | { 13 | public DateTime BirthDate { get; set; } 14 | public async Task GenerateUserIdentityAsync(UserManager manager) 15 | { 16 | // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType 17 | var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie); 18 | // Add custom user claims here 19 | return userIdentity; 20 | } 21 | } 22 | 23 | public class ApplicationDbContext : IdentityDbContext 24 | { 25 | public ApplicationDbContext() 26 | : base("DefaultConnection", throwIfV1Schema: false) 27 | { 28 | } 29 | 30 | public static ApplicationDbContext Create() 31 | { 32 | return new ApplicationDbContext(); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /SchoolManagement/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Account/VerifyCode.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.VerifyCodeViewModel 2 | @{ 3 | ViewBag.Title = "Verify"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("VerifyCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { 9 | @Html.AntiForgeryToken() 10 | @Html.Hidden("provider", @Model.Provider) 11 | @Html.Hidden("rememberMe", @Model.RememberMe) 12 |

Enter verification code

13 |
14 | @Html.ValidationSummary("", new { @class = "text-danger" }) 15 |
16 | @Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" }) 17 |
18 | @Html.TextBoxFor(m => m.Code, new { @class = "form-control" }) 19 |
20 |
21 |
22 |
23 |
24 | @Html.CheckBoxFor(m => m.RememberBrowser) 25 | @Html.LabelFor(m => m.RememberBrowser) 26 |
27 |
28 |
29 |
30 |
31 | 32 |
33 |
34 | } 35 | 36 | @section Scripts { 37 | @Scripts.Render("~/bundles/jqueryval") 38 | } 39 | -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/tabs.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Tabs 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/tabs/#theming 10 | */ 11 | .ui-tabs { 12 | position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 13 | padding: .2em; 14 | } 15 | .ui-tabs .ui-tabs-nav { 16 | margin: 0; 17 | padding: .2em .2em 0; 18 | } 19 | .ui-tabs .ui-tabs-nav li { 20 | list-style: none; 21 | float: left; 22 | position: relative; 23 | top: 0; 24 | margin: 1px .2em 0 0; 25 | border-bottom-width: 0; 26 | padding: 0; 27 | white-space: nowrap; 28 | } 29 | .ui-tabs .ui-tabs-nav .ui-tabs-anchor { 30 | float: left; 31 | padding: .5em 1em; 32 | text-decoration: none; 33 | } 34 | .ui-tabs .ui-tabs-nav li.ui-tabs-active { 35 | margin-bottom: -1px; 36 | padding-bottom: 1px; 37 | } 38 | .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, 39 | .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, 40 | .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { 41 | cursor: text; 42 | } 43 | .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { 44 | cursor: pointer; 45 | } 46 | .ui-tabs .ui-tabs-panel { 47 | display: block; 48 | border-width: 0; 49 | padding: 1em 1.4em; 50 | background: none; 51 | } 52 | -------------------------------------------------------------------------------- /SchoolManagement/Models/SchoolManagementDBModel.edmx.diagram: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /SchoolManagement/Models/Student.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace SchoolManagement.Models 11 | { 12 | using System; 13 | using System.Collections.Generic; 14 | 15 | public partial class Student 16 | { 17 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] 18 | public Student() 19 | { 20 | this.Enrollments = new HashSet(); 21 | } 22 | 23 | public int StudentID { get; set; } 24 | public string LastName { get; set; } 25 | public string FirstName { get; set; } 26 | public Nullable EnrollmentDate { get; set; } 27 | public string MiddleName { get; set; } 28 | public Nullable DateOfBirth { get; set; } 29 | 30 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] 31 | public virtual ICollection Enrollments { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Manage/SetPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.SetPasswordViewModel 2 | @{ 3 | ViewBag.Title = "Create Password"; 4 | } 5 | 6 |

@ViewBag.Title.

7 |

8 | You do not have a local username/password for this site. Add a local 9 | account so you can log in without an external login. 10 |

11 | 12 | @using (Html.BeginForm("SetPassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 13 | { 14 | @Html.AntiForgeryToken() 15 | 16 |

Create Local Login

17 |
18 | @Html.ValidationSummary("", new { @class = "text-danger" }) 19 |
20 | @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) 21 |
22 | @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) 23 |
24 |
25 |
26 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 27 |
28 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 29 |
30 |
31 |
32 |
33 | 34 |
35 |
36 | } 37 | @section Scripts { 38 | @Scripts.Render("~/bundles/jqueryval") 39 | } -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/spinner.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Spinner 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/spinner/#theming 10 | */ 11 | .ui-spinner { 12 | position: relative; 13 | display: inline-block; 14 | overflow: hidden; 15 | padding: 0; 16 | vertical-align: middle; 17 | } 18 | .ui-spinner-input { 19 | border: none; 20 | background: none; 21 | color: inherit; 22 | padding: 0; 23 | margin: .2em 0; 24 | vertical-align: middle; 25 | margin-left: .4em; 26 | margin-right: 22px; 27 | } 28 | .ui-spinner-button { 29 | width: 16px; 30 | height: 50%; 31 | font-size: .5em; 32 | padding: 0; 33 | margin: 0; 34 | text-align: center; 35 | position: absolute; 36 | cursor: default; 37 | display: block; 38 | overflow: hidden; 39 | right: 0; 40 | } 41 | /* more specificity required here to override default borders */ 42 | .ui-spinner a.ui-spinner-button { 43 | border-top: none; 44 | border-bottom: none; 45 | border-right: none; 46 | } 47 | /* vertically center icon */ 48 | .ui-spinner .ui-icon { 49 | position: absolute; 50 | margin-top: -8px; 51 | top: 50%; 52 | left: 0; 53 | } 54 | .ui-spinner-up { 55 | top: 0; 56 | } 57 | .ui-spinner-down { 58 | bottom: 0; 59 | } 60 | 61 | /* TR overrides */ 62 | .ui-spinner .ui-icon-triangle-1-s { 63 | /* need to fix icons sprite */ 64 | background-position: -65px -16px; 65 | } 66 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Account/ExternalLoginConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.ExternalLoginConfirmationViewModel 2 | @{ 3 | ViewBag.Title = "Register"; 4 | } 5 |

@ViewBag.Title.

6 |

Associate your @ViewBag.LoginProvider account.

7 | 8 | @using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 | 12 |

Association Form

13 |
14 | @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 15 |

16 | You've successfully authenticated with @ViewBag.LoginProvider. 17 | Please enter a user name for this site below and click the Register button to finish 18 | logging in. 19 |

20 |
21 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 22 |
23 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 24 | @Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" }) 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 | } 33 | 34 | @section Scripts { 35 | @Scripts.Render("~/bundles/jqueryval") 36 | } 37 | -------------------------------------------------------------------------------- /SchoolManagement/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SchoolManagement")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SchoolManagement")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("0029e09e-db81-4fdf-abe2-e312d2fffbb1")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Enrollments/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.Enrollment 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | Layout = "~/Views/Shared/_Layout.cshtml"; 6 | } 7 | 8 |

Delete

9 | 10 |

Are you sure you want to delete this?

11 |
12 |

Enrollment

13 |
14 |
15 |
16 | @Html.DisplayNameFor(model => model.Grade) 17 |
18 | 19 |
20 | @Html.DisplayFor(model => model.Grade) 21 |
22 | 23 |
24 | @Html.DisplayNameFor(model => model.Course.Title) 25 |
26 | 27 |
28 | @Html.DisplayFor(model => model.Course.Title) 29 |
30 | 31 |
32 | @Html.DisplayNameFor(model => model.Student.LastName) 33 |
34 | 35 |
36 | @Html.DisplayFor(model => model.Student.LastName) 37 |
38 | 39 |
40 | @Html.DisplayNameFor(model => model.Lecturer.First_Name) 41 |
42 | 43 |
44 | @Html.DisplayFor(model => model.Lecturer.First_Name) 45 |
46 | 47 |
48 | 49 | @using (Html.BeginForm()) { 50 | @Html.AntiForgeryToken() 51 | 52 |
53 | | 54 | @Html.ActionLink("Back to List", "Index") 55 |
56 | } 57 |
58 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Enrollments/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 | @{ 4 | ViewBag.Title = "Index"; 5 | Layout = "~/Views/Shared/_Layout.cshtml"; 6 | } 7 | 8 |

Index

9 | 10 |

11 | @Html.ActionLink("Create New", "Create") 12 |

13 | 14 | 15 | 18 | 21 | 24 | 27 | 28 | 29 | 30 | @foreach (var item in Model) { 31 | 32 | 35 | 38 | 41 | 44 | 49 | 50 | } 51 | 52 |
16 | @Html.DisplayNameFor(model => model.Grade) 17 | 19 | @Html.DisplayNameFor(model => model.Course.Title) 20 | 22 | @Html.DisplayNameFor(model => model.Student.LastName) 23 | 25 | @Html.DisplayNameFor(model => model.Lecturer.First_Name) 26 |
33 | @Html.DisplayFor(modelItem => item.Grade) 34 | 36 | @Html.DisplayFor(modelItem => item.Course.Title) 37 | 39 | @Html.DisplayFor(modelItem => item.Student.LastName) 40 | 42 | @Html.DisplayFor(modelItem => item.Lecturer.First_Name) 43 | 45 | @Html.ActionLink("Edit", "Edit", new { id=item.EnrollmentID }) | 46 | @Html.ActionLink("Details", "Details", new { id=item.EnrollmentID }) | 47 | @Html.ActionLink("Delete", "Delete", new { id=item.EnrollmentID }) 48 |
53 | -------------------------------------------------------------------------------- /SchoolManagement/Content/themes/base/resizable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Resizable 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 | .ui-resizable { 10 | position: relative; 11 | } 12 | .ui-resizable-handle { 13 | position: absolute; 14 | font-size: 0.1px; 15 | display: block; 16 | -ms-touch-action: none; 17 | touch-action: none; 18 | } 19 | .ui-resizable-disabled .ui-resizable-handle, 20 | .ui-resizable-autohide .ui-resizable-handle { 21 | display: none; 22 | } 23 | .ui-resizable-n { 24 | cursor: n-resize; 25 | height: 7px; 26 | width: 100%; 27 | top: -5px; 28 | left: 0; 29 | } 30 | .ui-resizable-s { 31 | cursor: s-resize; 32 | height: 7px; 33 | width: 100%; 34 | bottom: -5px; 35 | left: 0; 36 | } 37 | .ui-resizable-e { 38 | cursor: e-resize; 39 | width: 7px; 40 | right: -5px; 41 | top: 0; 42 | height: 100%; 43 | } 44 | .ui-resizable-w { 45 | cursor: w-resize; 46 | width: 7px; 47 | left: -5px; 48 | top: 0; 49 | height: 100%; 50 | } 51 | .ui-resizable-se { 52 | cursor: se-resize; 53 | width: 12px; 54 | height: 12px; 55 | right: 1px; 56 | bottom: 1px; 57 | } 58 | .ui-resizable-sw { 59 | cursor: sw-resize; 60 | width: 9px; 61 | height: 9px; 62 | left: -5px; 63 | bottom: -5px; 64 | } 65 | .ui-resizable-nw { 66 | cursor: nw-resize; 67 | width: 9px; 68 | height: 9px; 69 | left: -5px; 70 | top: -5px; 71 | } 72 | .ui-resizable-ne { 73 | cursor: ne-resize; 74 | width: 9px; 75 | height: 9px; 76 | right: -5px; 77 | top: -5px; 78 | } 79 | -------------------------------------------------------------------------------- /SchoolManagement/Views/Manage/ChangePassword.cshtml: -------------------------------------------------------------------------------- 1 | @model SchoolManagement.Models.ChangePasswordViewModel 2 | @{ 3 | ViewBag.Title = "Change Password"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("ChangePassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Change Password Form

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.PasswordFor(m => m.OldPassword, new { @class = "form-control" }) 18 |
19 |
20 |
21 | @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) 22 |
23 | @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) 24 |
25 |
26 |
27 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 28 |
29 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 30 |
31 |
32 |
33 |
34 | 35 |
36 |
37 | } 38 | @section Scripts { 39 | @Scripts.Render("~/bundles/jqueryval") 40 | } -------------------------------------------------------------------------------- /SchoolManagement/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.Identity; 2 | using Microsoft.AspNet.Identity.EntityFramework; 3 | using Microsoft.Owin; 4 | using Owin; 5 | using SchoolManagement.Models; 6 | using System; 7 | 8 | [assembly: OwinStartupAttribute(typeof(SchoolManagement.Startup))] 9 | namespace SchoolManagement 10 | { 11 | public partial class Startup 12 | { 13 | public void Configuration(IAppBuilder app) 14 | { 15 | ConfigureAuth(app); 16 | createRolesandUsers(); 17 | } 18 | 19 | public void createRolesandUsers() 20 | { 21 | var context = new ApplicationDbContext(); 22 | 23 | var roleManager = new RoleManager(new RoleStore(context)); 24 | var userManager = new UserManager(new UserStore(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 |
16 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 17 |
18 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 19 |
20 |
21 |
22 | @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) 23 |
24 | @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) 25 |
26 |
27 |
28 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 29 |
30 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 31 |
32 |
33 |
34 |
35 | 36 |
37 |
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 |
15 |

Course

16 |
17 | @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 18 |
19 | @Html.LabelFor(model => model.Title, htmlAttributes: new { @class = "control-label col-md-2" }) 20 |
21 | @Html.EditorFor(model => model.Title, new { htmlAttributes = new { @class = "form-control" } }) 22 | @Html.ValidationMessageFor(model => model.Title, "", new { @class = "text-danger" }) 23 |
24 |
25 | 26 |
27 | @Html.LabelFor(model => model.Credits, htmlAttributes: new { @class = "control-label col-md-2" }) 28 |
29 | @Html.EditorFor(model => model.Credits, new { htmlAttributes = new { @class = "form-control" } }) 30 | @Html.ValidationMessageFor(model => model.Credits, "", new { @class = "text-danger" }) 31 |
32 |
33 | 34 |
35 |
36 | 37 |
38 |
39 |
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 |
15 |

Lecturer

16 |
17 | @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 18 |
19 | @Html.LabelFor(model => model.First_Name, htmlAttributes: new { @class = "control-label col-md-2" }) 20 |
21 | @Html.EditorFor(model => model.First_Name, new { htmlAttributes = new { @class = "form-control" } }) 22 | @Html.ValidationMessageFor(model => model.First_Name, "", new { @class = "text-danger" }) 23 |
24 |
25 | 26 |
27 | @Html.LabelFor(model => model.Last_Name, htmlAttributes: new { @class = "control-label col-md-2" }) 28 |
29 | @Html.EditorFor(model => model.Last_Name, new { htmlAttributes = new { @class = "form-control" } }) 30 | @Html.ValidationMessageFor(model => model.Last_Name, "", new { @class = "text-danger" }) 31 |
32 |
33 | 34 |
35 |
36 | 37 |
38 |
39 |
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 |
15 |

Course

16 |
17 | @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 18 | @Html.HiddenFor(model => model.CourseId) 19 | 20 |
21 | @Html.LabelFor(model => model.Title, htmlAttributes: new { @class = "control-label col-md-2" }) 22 |
23 | @Html.EditorFor(model => model.Title, new { htmlAttributes = new { @class = "form-control" } }) 24 | @Html.ValidationMessageFor(model => model.Title, "", new { @class = "text-danger" }) 25 |
26 |
27 | 28 |
29 | @Html.LabelFor(model => model.Credits, htmlAttributes: new { @class = "control-label col-md-2" }) 30 |
31 | @Html.EditorFor(model => model.Credits, new { htmlAttributes = new { @class = "form-control" } }) 32 | @Html.ValidationMessageFor(model => model.Credits, "", new { @class = "text-danger" }) 33 |
34 |
35 | 36 |
37 |
38 | 39 |
40 |
41 |
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 |
15 |

Lecturer

16 |
17 | @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 18 | @Html.HiddenFor(model => model.Id) 19 | 20 |
21 | @Html.LabelFor(model => model.First_Name, htmlAttributes: new { @class = "control-label col-md-2" }) 22 |
23 | @Html.EditorFor(model => model.First_Name, new { htmlAttributes = new { @class = "form-control" } }) 24 | @Html.ValidationMessageFor(model => model.First_Name, "", new { @class = "text-danger" }) 25 |
26 |
27 | 28 |
29 | @Html.LabelFor(model => model.Last_Name, htmlAttributes: new { @class = "control-label col-md-2" }) 30 |
31 | @Html.EditorFor(model => model.Last_Name, new { htmlAttributes = new { @class = "form-control" } }) 32 | @Html.ValidationMessageFor(model => model.Last_Name, "", new { @class = "text-danger" }) 33 |
34 |
35 | 36 |
37 |
38 | 39 |
40 |
41 |
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 | 51 | 52 | 53 | 54 | @foreach(var enrollment in Model.Enrollments) 55 | { 56 | 57 | 62 | 67 | 72 | 73 | } 74 |
Course TitleCreditsGrade
58 |

59 | @enrollment.Course.Title 60 |

61 |
63 |

64 | @enrollment.Course.Credits 65 |

66 |
68 |

69 | @enrollment.Grade 70 |

71 |
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 | 41 |
42 | @RenderBody() 43 |
44 |
45 |

© @DateTime.Now.Year - School Management System

46 |
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 |
15 | @Html.LabelFor(m => m.Username, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => m.Username, new { @class = "form-control" }) 18 |
19 |
20 |
21 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 22 |
23 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 24 |
25 |
26 |
27 | @Html.LabelFor(m => m.BirthDate, new { @class = "col-md-2 control-label" }) 28 |
29 | @Html.TextBoxFor(m => m.BirthDate, new { @class = "form-control" }) 30 |
31 |
32 |
33 | @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) 34 |
35 | @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) 36 |
37 |
38 |
39 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 40 |
41 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 42 |
43 |
44 | 45 |
46 | @Html.LabelFor(m => m.UserRole, new { @class = "col-md-2 control-label" }) 47 |
48 | @Html.DropDownList("UserRole", (SelectList)ViewBag.Roles, " ") 49 |
50 |
51 |
52 |
53 | 54 |
55 |
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 | 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 |
15 |

Student

16 |
17 | @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 18 |
19 | @Html.LabelFor(model => model.LastName, htmlAttributes: new { @class = "control-label col-md-2" }) 20 |
21 | @Html.EditorFor(model => model.LastName, new { htmlAttributes = new { @class = "form-control" } }) 22 | @Html.ValidationMessageFor(model => model.LastName, "", new { @class = "text-danger" }) 23 |
24 |
25 | 26 |
27 | @Html.LabelFor(model => model.FirstName, htmlAttributes: new { @class = "control-label col-md-2" }) 28 |
29 | @Html.EditorFor(model => model.FirstName, new { htmlAttributes = new { @class = "form-control" } }) 30 | @Html.ValidationMessageFor(model => model.FirstName, "", new { @class = "text-danger" }) 31 |
32 |
33 | 34 |
35 | @Html.LabelFor(model => model.MiddleName, htmlAttributes: new { @class = "control-label col-md-2" }) 36 |
37 | @Html.EditorFor(model => model.MiddleName, new { htmlAttributes = new { @class = "form-control" } }) 38 | @Html.ValidationMessageFor(model => model.MiddleName, "", new { @class = "text-danger" }) 39 |
40 |
41 | 42 |
43 | @Html.LabelFor(model => model.EnrollmentDate, htmlAttributes: new { @class = "control-label col-md-2" }) 44 |
45 | @Html.EditorFor(model => model.EnrollmentDate, new { htmlAttributes = new { @class = "form-control" } }) 46 | @Html.ValidationMessageFor(model => model.EnrollmentDate, "", new { @class = "text-danger" }) 47 |
48 |
49 | 50 |
51 |
52 | 53 |
54 |
55 |
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 |
15 |

Student

16 |
17 | @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 18 | @Html.HiddenFor(model => model.StudentID) 19 | 20 |
21 | @Html.LabelFor(model => model.LastName, htmlAttributes: new { @class = "control-label col-md-2" }) 22 |
23 | @Html.EditorFor(model => model.LastName, new { htmlAttributes = new { @class = "form-control" } }) 24 | @Html.ValidationMessageFor(model => model.LastName, "", new { @class = "text-danger" }) 25 |
26 |
27 | 28 |
29 | @Html.LabelFor(model => model.FirstName, htmlAttributes: new { @class = "control-label col-md-2" }) 30 |
31 | @Html.EditorFor(model => model.FirstName, new { htmlAttributes = new { @class = "form-control" } }) 32 | @Html.ValidationMessageFor(model => model.FirstName, "", new { @class = "text-danger" }) 33 |
34 |
35 | 36 |
37 | @Html.LabelFor(model => model.MiddleName, htmlAttributes: new { @class = "control-label col-md-2" }) 38 |
39 | @Html.EditorFor(model => model.MiddleName, new { htmlAttributes = new { @class = "form-control" } }) 40 | @Html.ValidationMessageFor(model => model.MiddleName, "", new { @class = "text-danger" }) 41 |
42 |
43 | 44 |
45 | @Html.LabelFor(model => model.EnrollmentDate, htmlAttributes: new { @class = "control-label col-md-2" }) 46 |
47 | @Html.EditorFor(model => model.EnrollmentDate, new { htmlAttributes = new { @class = "form-control" } }) 48 | @Html.ValidationMessageFor(model => model.EnrollmentDate, "", new { @class = "text-danger" }) 49 |
50 |
51 | 52 |
53 |
54 | 55 |
56 |
57 |
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 |
15 |

Enrollment

16 |
17 | @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 18 | @Html.HiddenFor(model => model.EnrollmentID) 19 | 20 |
21 | @Html.LabelFor(model => model.Grade, htmlAttributes: new { @class = "control-label col-md-2" }) 22 |
23 | @Html.EditorFor(model => model.Grade, new { htmlAttributes = new { @class = "form-control" } }) 24 | @Html.ValidationMessageFor(model => model.Grade, "", new { @class = "text-danger" }) 25 |
26 |
27 | 28 |
29 | @Html.LabelFor(model => model.CourseID, "CourseID", htmlAttributes: new { @class = "control-label col-md-2" }) 30 |
31 | @Html.DropDownList("CourseID", null, htmlAttributes: new { @class = "form-control" }) 32 | @Html.ValidationMessageFor(model => model.CourseID, "", new { @class = "text-danger" }) 33 |
34 |
35 | 36 |
37 | @Html.LabelFor(model => model.StudentID, "StudentID", htmlAttributes: new { @class = "control-label col-md-2" }) 38 |
39 | @Html.DropDownList("StudentID", null, htmlAttributes: new { @class = "form-control" }) 40 | @Html.ValidationMessageFor(model => model.StudentID, "", new { @class = "text-danger" }) 41 |
42 |
43 | 44 |
45 | @Html.LabelFor(model => model.LecturerId, "LecturerId", htmlAttributes: new { @class = "control-label col-md-2" }) 46 |
47 | @Html.DropDownList("LecturerId", null, htmlAttributes: new { @class = "form-control" }) 48 | @Html.ValidationMessageFor(model => model.LecturerId, "", new { @class = "text-danger" }) 49 |
50 |
51 | 52 |
53 |
54 | 55 |
56 |
57 |
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 |
9 |
10 |
11 | @using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 12 | { 13 | @Html.AntiForgeryToken() 14 |

Use a local account to log in.

15 |
16 | @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 17 |
18 | @Html.LabelFor(m => m.Username, new { @class = "col-md-2 control-label" }) 19 |
20 | @Html.TextBoxFor(m => m.Username, new { @class = "form-control" }) 21 | @Html.ValidationMessageFor(m => m.Username, "", new { @class = "text-danger" }) 22 |
23 |
24 |
25 | @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) 26 |
27 | @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) 28 | @Html.ValidationMessageFor(m => m.Password, "", new { @class = "text-danger" }) 29 |
30 |
31 |
32 |
33 |
34 | @Html.CheckBoxFor(m => m.RememberMe) 35 | @Html.LabelFor(m => m.RememberMe) 36 |
37 |
38 |
39 |
40 |
41 | 42 |
43 |
44 |

45 | @Html.ActionLink("Register as a new user", "Register") 46 |

47 | @* Enable this once you have account confirmation enabled for password reset functionality 48 |

49 | @Html.ActionLink("Forgot your password?", "ForgotPassword") 50 |

*@ 51 | } 52 |
53 |
54 |
55 |
56 | @Html.Partial("_ExternalLoginsListPartial", new ExternalLoginListViewModel { ReturnUrl = ViewBag.ReturnUrl }) 57 |
58 |
59 |
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 | 26 | 27 | @foreach (var account in Model.CurrentLogins) 28 | { 29 | 30 | 31 | 49 | 50 | } 51 | 52 |
@account.LoginProvider 32 | @if (ViewBag.ShowRemoveButton) 33 | { 34 | using (Html.BeginForm("RemoveLogin", "Manage")) 35 | { 36 | @Html.AntiForgeryToken() 37 |
38 | @Html.Hidden("loginProvider", account.LoginProvider) 39 | @Html.Hidden("providerKey", account.ProviderKey) 40 | 41 |
42 | } 43 | } 44 | else 45 | { 46 | @:   47 | } 48 |
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 | 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 |
116 |

Enrollment

117 |
118 | @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 119 | 120 | 123 | 126 | 127 |
128 | 129 |
130 | @Html.DropDownList("CourseID", null, htmlAttributes: new { @class = "form-control" }) 131 | @Html.ValidationMessageFor(model => model.CourseID, "", new { @class = "text-danger" }) 132 |
133 |
134 | 135 |
136 | 137 |
138 | @**@ 139 | @Html.EditorFor(model => model.Student.FirstName, new { htmlAttributes = new { @class = "form-control" } }) 140 | @Html.HiddenFor(model => model.StudentID) 141 | @Html.ValidationMessageFor(model => model.StudentID, "", new { @class = "text-danger" }) 142 |
143 |
144 | 145 | 146 | 147 |
148 |
149 | 150 |
151 |
152 |
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 | --------------------------------------------------------------------------------