public IActionResult Index() { string userEmail = User.Identity.Name; ProfileViewModel model = new ProfileViewModel() { User = userDAL.GetUser(userEmail, null), History = historyDAL.GetHistory(userEmail).ToList() }; return(View("User", model)); }
public void PopulateListView(object sender, EventArgs e) { listViewHistory.GridLines = true; listViewHistory.View = View.Details; HistoryDataAccess db = new HistoryDataAccess(); history = db.GetHistory(); foreach (HistoryModel data in history) { ListViewItem item = new ListViewItem(data.CoatQuantity.ToString()); item.SubItems.Add(data.CoatTime); item.SubItems.Add(data.User); item.SubItems.Add(data.CoatType); item.SubItems.Add(data.CoatDate); listViewHistory.Items.Add(item); } }