protected void Application_Start() { //GlobalFilters.Filters.Add(new AuthorizeAttribute()); AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BootStrapper.RunConfig(); //Register the Scripts and Css files when application start BundleConfig.RegisterBundles(BundleTable.Bundles); DbInterception.Add(new EastmedInterceptorTransientErrors()); DbInterception.Add(new EastmedInterceptorLogging()); //Trigs the scheduler on applicaton start point. ScheduleWrapper scheduler = new ScheduleWrapper(); scheduler.RunJob(); MvcHandler.DisableMvcResponseHeader = true; Database.SetInitializer <EastMedDB>(null); }
/// <summary> /// Constructs a new Professor object. /// </summary> /// <param name="LastName">Surname of the Professor.</param> /// <param name="FirstName">First name of the Professor.</param> /// <param name="Department">The department of the Professor.</param> /// <param name="ID">ID Number of the Professor.</param> public Professor(string LastName, string FirstName, string Department, string ID, string Contact) { this.LastName = LastName.NormalizeWhiteSpaces(); this.FirstName = FirstName.NormalizeWhiteSpaces(); this.Department = Department.NormalizeWhiteSpaces(); this.ID = ID; this.Contact = Contact; schedules = new ScheduleWrapper(); }
/// <summary> /// Constructs a new Professor object. /// </summary> /// <param name="RawName">The name of the Professor in the format: "LastName, FirstName"</param> /// <param name="Department">The department of the Professor.</param> /// <param name="ID">ID Number of the Professor.</param> /// <param name="Contact">Contact Number of the Professor.</param> public Professor(string RawName, string Department, string ID, string Contact) { RawName = RawName.NormalizeWhiteSpaces(); int comma = RawName.IndexOf(','); if (comma == -1) { LastName = RawName; FirstName = ""; } else { LastName = RawName.Substring(0, comma).Trim(); FirstName = RawName.Substring(comma + 1).Trim(); } this.Department = Department.NormalizeWhiteSpaces(); this.ID = ID; this.Contact = Contact; schedules = new ScheduleWrapper(); }
/// <summary> /// Constructs an empty Professor object. /// </summary> public Professor() { LastName = FirstName = Department = ""; ID = Contact = ""; schedules = new ScheduleWrapper(); }
/// <summary> /// Constructs a cloned copy of another ScheduleWrapper. /// </summary> /// <param name="sw">The SchedulWrapper to copy.</param> public ScheduleWrapper(ScheduleWrapper sw) { list = (ArrayList)sw.list.Clone(); }
/// <summary> /// Constructs a new Room object. /// </summary> /// <param name="building">The building where the Room is located.</param> /// <param name="roomnumber">The number of the Room.</param> public Room(string building, string roomnumber) { Building = building.NormalizeWhiteSpaces(); RoomNumber = roomnumber.NormalizeWhiteSpaces(); schedules = new ScheduleWrapper(); }
/// <summary> /// Constructs a new Room object. /// </summary> /// <param name="name">The name of the Room. [ "Building RoomNumber" ]</param> public Room(string name) { name = name.NormalizeWhiteSpaces(); int space = name.LastIndexOf(' '); if (space < 0) { RoomNumber = ""; Building = name; } else { RoomNumber = name.Substring(space + 1); Building = name.Substring(0, space); } schedules = new ScheduleWrapper(); }
/// constructors /// <summary> /// Constructs an empty Room object. /// </summary> public Room() { schedules = new ScheduleWrapper(); }