예제 #1
0
        public UserForm(User user, UserActivity activity)
        {
            InitializeComponent();
            FontsProjects();
            Fonts();

            CurrentUser = user;
            activities  = dbProcessor.GetUserActivities();
            Activity    = activity;

            welcomeTextLabel.Text           = $"Hi, {CurrentUser.Name}, welcome to AMONIC Airlines";
            timeSpentLabel.Text             = $"time spent on system: {CurrentUser.TimeSpentOnSystem.ToString(@"hh\:mm\:ss")}";
            numberOfCrashesLabel.Text       = $"number of crashes: {CurrentUser.NumberOfCrashes}";
            userFormDataGridView.DataSource = activities.Where(x => x.UserId == CurrentUser.Id).ToList();
        }