예제 #1
0
        public ActionResult UserDashboard(string id)
        {
            ProjectHelper projectHelper = new ProjectHelper();
            TicketHelper  ticketHelper  = new TicketHelper();

            var UserDashboard = new UserDashboardVM()
            {
                User            = db.Users.Find(id),
                NotUserProjects = projectHelper.ListNotUserProjects(id),
                NotUserTickets  = ticketHelper.ListNotUserTickets(id)
            };

            return(View(UserDashboard));
        }
        //Window childWindow;

        public UserDashboard(string uname)
        {
            InitializeComponent();
            currentUser = Database.GetUserData(uname);
            UserDashboardVM vm = new UserDashboardVM(this, currentUser);

            lblGreeting.Content = $"Welcome back, {currentUser.FirstName}";

            DataContext = vm;

            var temp = ExtractUserDashboardData.GetExpenseReport(currentUser);

            pieChart.DataContext = this;
            UpdateChart();

            ucDashData.AttachCurrentUser(ref currentUser);
            ucDashData.UpdateDashboardUserData();

            //RunIntroductionSequence();
        }