public SearchByTag(User user, Event ev) { InitializeComponent(); _user = user; _event = ev; _logic = new PostLogic(); }
public TimeLine(User user, Event ev) { InitializeComponent(); _user = user; _event = ev; _logic = new PostLogic(); }
/// <summary> /// Constructor of the material system /// </summary> /// <param name="ev"></param> public MaterialSystem(Event ev, User user) { InitializeComponent(); _event = ev; _user = user; _rfidScanned = true; }
private MakePost(Event ev) { InitializeComponent(); _event = ev; _logicMedia = new MediaOracleContext(); _logicPost = new PostLogic(new PostOracleContext()); }
public SocialMediaSystemForm(User user, Event ev) { InitializeComponent(); _user = user; _event = ev; Text = $"Tijdlijn {ev.Name}"; }
public Form1(User user) { InitializeComponent(); _logicGuest = new GuestOracleContext(); _ev = new Event(1, "ICT4Events", new DateTime(2015, 10, 09), new DateTime(2015, 10, 15), "IdontKnowYet", "IdontKnowYet", 100); _user = user; _guest = _logicGuest.GetById(user.ID); }
public bool Delete(Event entity) { var ev = _events.FirstOrDefault(e => e.ID == entity.ID); if (ev == null) return false; _events.Remove(ev); return true; }
public TimeLine(User user, Event ev) { InitializeComponent(); _admin = user; _event = ev; _logic = new PostLogic(); _reportContext = new ReportOracleContext(); }
public ReportSection(User admin, Event ev) { InitializeComponent(); _admin = admin; _event = ev; _logicPost = new PostLogic(); _getAllPostByEvent = _logicPost.GetAllByEvent(_event); lblWelkom.Text = $"Welkom bij de rapporten overzicht, {_admin.Name} {_admin.Surname}"; }
public PostFeedExtended(Post post, Event ev, User admin) { InitializeComponent(); _logicPost = new PostLogic(); _reportContext = new ReportOracleContext(); _post = post; _event = ev; _admin = admin; }
public Event Insert(Event entity) { if (GetById(entity.ID) != null) return null; var id = _events.Max(e => e.ID); var ev = new Event(id, entity.Name, entity.StartDate, entity.EndDate, entity.Location, entity.MapPath, entity.MaxCapacity); _events.Add(ev); return ev; }
/// <summary> /// Constructor used for the post form for users /// </summary> /// <param name="user">The user who is placing this post</param> /// <param name="ev">The event this post belongs to</param> public MakePost(User user, Event ev) { _user = user; InitializeComponent(); _event = ev; _logicPost = new PostLogic(new PostOracleContext()); _uploadedMedia = new UcUpload(_user, _event); tbpLoadUcUpload.Controls.Add(_uploadedMedia); LoadMediaList(); }
public Guest RegisterNewUserForEvent(string username, Event ev, Location location, DateTime start, DateTime end, int leaderID) { var password = Membership.GeneratePassword(10, 2); var user = new User(0, username, LogicCollection.UserLogic.GetHashedPassword(password), "new user"); user = LogicCollection.UserLogic.RegisterUser(user, true, password); SendConfirmationEmail(user, ev, location, start, end); return RegisterUserForEvent(user, ev, location, start, end, leaderID); }
public PostFeedExtended(Post post, Event ev, User user) { InitializeComponent(); _logicPost = new PostLogic(); _reportContext = new ReportOracleContext(); _post = post; _event = ev; _activeUser = user; }
public PostFeedExtended(Post post, Event ev, Guest active) { InitializeComponent(); _logicPost = new PostLogic(); _reportContext = new ReportOracleContext(); _post = post; _event = ev; // Currently signed in guest _activeUser = active; }
public ucLocationEdit(Event ev) { InitializeComponent(); _event = ev; var locations = LogicCollection.LocationLogic.GetLocationsByEvent(_event); lsbLocations.Items.AddRange(locations.ToArray()); if (string.IsNullOrWhiteSpace(_event.MapPath)) return; picMap.ImageLocation = $"{FtpHelper.ServerHardLogin}/{_event.ID}/{_event.MapPath}"; picMap.SizeMode = PictureBoxSizeMode.Zoom; }
public GuestRegistrationForm(User user, Event ev) { InitializeComponent(); _user = user; _event = ev; cmbLocations.DataSource = LogicCollection.LocationLogic.GetLocationsByEvent(ev); calEventDate.MinDate = _event.StartDate; calEventDate.MaxDate = _event.EndDate; calEventDate.SetSelectionRange(_event.StartDate, _event.EndDate); calEventDate.MaxSelectionCount = (int)(_event.EndDate.Subtract(_event.StartDate).TotalDays) + 1; }
protected void Page_Load(object sender, EventArgs e) { CurEvent = LogicCollection.EventLogic.GetByID(2); StartDate.TodaysDate = CurEvent.StartDate; EndDate.TodaysDate = CurEvent.StartDate; var user = SiteMaster.CurrentUser(); if (user != null) { lblLoggedIn.Visible = true; lblLoggedIn.Text = "Je bent al ingelogd."; fromRegister.Visible = false; } }
public PostFeed(Post post, Event ev, User user, bool reply) { InitializeComponent(); Post = post; _event = ev; lbReaction.Visible = !reply; // Currently signed in user _activeUser = user; // Guest of the post _postUser = LogicCollection.UserLogic.GetById(Post.GuestID); }
public ucEventEdit(Event ev = null) { InitializeComponent(); _ev = ev; btnUpdateEvent.Text = _ev == null ? "Evenement toevoegen" : "Evenement wijzigen"; if (_ev == null) return; txtName.Text = _ev.Name; txtLocation.Text = _ev.Location; numCapacity.Value = _ev.MaxCapacity; dtpStartDate.Value = _ev.StartDate; dtpEndDate.Value = _ev.EndDate; }
public Guest RegisterUserForEvent(User user, Event ev, Location location, DateTime start, DateTime end, int leaderID = 0) { var existingGuest = _context.GetGuestByEvent(ev, user.ID); // Checks if user is already registered for an event if (existingGuest != null) return existingGuest; var guest = new Guest(user.ID, user.Username, user.Password, user.Name, "", false, ev.ID, false, start, end, location.ID, user.RegistrationDate, user.Permission, user.Surname, user.Country, user.City, user.Postal, user.Address, user.Telephone, leaderID); SendConfirmationEmail(user, ev, location, start, end); FtpHelper.CreateDirectory($"{ev.ID}/{guest.ID}"); return _context.Insert(guest); }
private static bool SendConfirmationEmail(User user, Event ev, Place location, DateTime start, DateTime end) { var fromAddress = new MailAddress(Properties.Settings.Default.Email, "ICT4Events"); var toAddress = new MailAddress(user.Email, user.Username); var fromPassword = Properties.Settings.Default.EmailPassword; var message = new MailMessage(fromAddress, toAddress) { Subject = "Confirmation of your new reservation for "+ ev.Name, Body = "Hello " + user.Username + ",\r\n\r\n" + $"Your have been registered to participate in event {ev.Name}!\r\n" + $"The location you entered is {location.Name}.\r\n" + $"We will be expecting to see you on {start.Date.ToShortDateString()} until {end.Date.ToShortDateString()}.\r\n" + $"Your user ID is: {user.ID}. Make sure to remember this for your check-in!" + "\r\n\r\nHave a nice day!" }; var smtp = new SmtpClient { Host = "smtp.gmail.com", Port = 587, EnableSsl = true, DeliveryMethod = SmtpDeliveryMethod.Network, UseDefaultCredentials = false, Credentials = new NetworkCredential(fromAddress.Address, fromPassword) }; try { smtp.Send(message); return true; } catch (SmtpException e) { throw new Exception(e.Message); } }
public Guest GetGuestByEvent(Event ev, int userID) { return _context.GetGuestByEvent(ev, userID); }
/// <summary> /// Initialize a new instance of the <see cref="EntranceControl"/> class. /// </summary> public EntranceControl(Event ev) { InitializeComponent(); _event = ev; _guests = LogicCollection.GuestLogic.GetGuestsByEvent(_event); }
public List<Guest> RegisterUsersForEvent(List<string> usernames, Event ev, Location location, DateTime start, DateTime end, int leaderID) { var res = new List<Guest>(); foreach (var username in usernames) { var user = LogicCollection.UserLogic.GetByUsername(username); var guest = (user != null ? RegisterUserForEvent(user, ev, location, start, end) : RegisterNewUserForEvent(username, ev, location, start, end, leaderID)); res.Add(guest); } return res; }
public List<Guest> GetGuestsByGroup(Event ev, int leaderID) { return _context.GetGuestsByGroup(ev, leaderID); }
public Catalogue(Event ev,User user) { InitializeComponent(); _user = user; _event = ev; }
public int GetGuestCountByEvent(Event ev) { return _context.GetGuestCountByEvent(ev); }
public MaterialReservationSystem(Event ev, Guest guest) { InitializeComponent(); _event = ev; _guest = guest; }
public List<Guest> GetGuestsByEvent(Event ev) { return _context.GetAllByEvent(ev); }