0% found this document useful (0 votes)
15 views4 pages

Merina

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views4 pages

Merina

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

1.

Introduction
Academic institutions often face challenges in efficiently allocating classroom resources due
to manual scheduling methods, last-minute changes, and poor communication. This
assignment addresses these challenges by developing a smart classroom resource scheduler
using ASP.NET MVC and C#. The system includes emergency overrides, conflict resolution,
and visual feedback to optimize classroom usage.

2. Background Study
Traditional scheduling relies on manual inputs and spreadsheets, resulting in frequent
double bookings and lack of visibility. Digital scheduling systems automate conflict
detection, update stakeholders in real time, and improve efficiency. Institutions like
Stanford and BRAC University have implemented such solutions for resource optimization.

3. Problem Analysis
Problems identified:
- Manual double bookings
- No emergency override support
- Stakeholders unaware of changes
- No visual status indicators

Stakeholders: Admin, Faculty, Students

Design Choices:
- C# with ASP.NET MVC
- Entity Framework with SQL Server
- Role-based access and visual feedback
4. Technical Implementation
Architecture Diagram:
[Insert Architecture Diagram Here]

Technologies Used: C#, ASP.NET MVC, SQL Server, Entity Framework

Main Components:

- Models: User, Role, Classroom, Booking, Log


- Controllers: AccountController, BookingController, AdminController
- Views: Razor Views for login, dashboard, booking interface
- Color Logic: Green (Available), Yellow (Reserved), Red (Emergency)
- Database: Schedule tracking and audit logging

Code Example: Booking Logic

public IActionResult BookClassroom(int roomId, DateTime scheduleTime)


{
var isAvailable = !_context.Bookings.Any(b => b.RoomId == roomId && b.ScheduleTime
== scheduleTime);
if (isAvailable)
{
_context.Bookings.Add(new Booking { RoomId = roomId, ScheduleTime =
scheduleTime, UserId = currentUser.Id });
_context.SaveChanges();
return Json(new { success = true, message = "Room booked successfully." });
}
else
{
return Json(new { success = false, message = "Conflict: Room already booked." });
}
}
5. Role and Stakeholder Modeling
Admin:
- Full control, booking and override rights

Faculty:
- Can book and view rooms

Student:
- Can only view bookings

Conflict Handling:
- Real-time check and alert
- Override possible by Admin only

6. Source Code Appendix


BookingController.cs

[Authorize]
public class BookingController : Controller
{
public IActionResult Index()
{
var bookings = _context.Bookings.Include(b => b.Room).ToList();
return View(bookings);
}
}

7. Screenshots and Output Discussion

You might also like