public Venue(string name, string address, string description, User owner) { this.Name = name; this.Address = address; this.Description = description; this.Owner = owner; this.Rooms = new HashSet<Room>(); }
public Booking(User client, DateTime startBookDate, DateTime endBookDate, decimal totalPrice, string comments) { if (endBookDate < startBookDate) { throw new ArgumentException("The date range is invalid."); } this.Client = client; this.availableDate = new AvailableDate(startBookDate, endBookDate); this.TotalPrice = totalPrice; this.Comments = comments; }
public IView Register(string username, string password, string confirmPassword, string role) { if (password != confirmPassword) { throw new ArgumentException(Constants.NotMatchingPasswords); } this.EnsureNoLoggedInUser(); var existingUser = this.Data.Users.GetByUsername(username); if (existingUser != null) { throw new ArgumentException(string.Format(Constants.UserWithGivenUsernameExists, username)); } Roles userRole = (Roles)Enum.Parse(typeof(Roles), role, true); var user = new User(username, password, userRole); this.Data.Users.Add(user); return this.View(user); }
public RoomsController(IHotelBookingSystemData data, User user) : base(data, user) { }
public MyProfile(User user) : base(user) { }
/// <summary> /// Controller class /// </summary> internal Controller(IHotelBookingSystemData data, User user) { this.Data = data; this.CurrentUser = user; }
public Logout(User user) : base(user) { }
public AuthorizationFailedException(string message, User user) : base(message) { this.User = user; }
public Register(User user) : base(user) { }
public Login(User user) : base(user) { }