private void btnSubmit_Click(object sender, RoutedEventArgs e) { if (txtPurchase.Text == "") { MessageBox.Show("Invalid input!"); return; } PurchaseInformationController.getInstance().add(employee.Id, txtPurchase.Text); MessageBox.Show("Success add data!"); load(); }
private dynamic getPurInfList() { List <PurchaseInformation> purchases = PurchaseInformationController.getInstance().getAll(); var filtered = purchases.Select(p => new { p.Id, p.EmployeeId, EmployeeName = p.Employee.Name, p.Information, p.Date }); return(filtered); }