public ReportList() { InitializeComponent(); foreach (var report in (Abstract.model.Report[])GetReportsBO.GetInstance().DoRead()) { var user = GetEmployeeBO.GetUserById(report.UserId); var currency = GetCurrencyBO.GetCurrencyById(report.CurrencyId); var person = GetCustomerBO.GetPersonById(report.PersonId); Reports.Children.Add(new TextBlock { Text = " - " + person.FirstName + " " + person.LastName + ", " + person.BirthDate.Value.ToShortDateString() + " birth, passport id: " + person.PassportId + " has exchanged " + report.IncomAmount + " " + currency.CurrencyName + " to " + report.OutcomeAmount + " units. \nResponsible for the operation is " + user.FirstName + " " + user.LastName + ". Date: " + report.Date.ToShortDateString() + ".\n\n" }); } }
protected override object LoadContent(Uri uri) { var userId = Convert.ToInt32(uri.OriginalString.Replace("/", string.Empty)); var user = GetEmployeeBO.GetUserById(userId); var employeePage = new Employee { EmployeeList = EmployeeList, Email = { Text = user.EMail }, TextFirstName = { Text = user.FirstName }, TextLastName = { Text = user.LastName }, NameSurname = { Text = user.FirstName + " " + user.LastName }, User = user }; switch (user.Gender) { case "Male": employeePage.RadioMale.IsChecked = true; break; case "Female": employeePage.RadioFemale.IsChecked = true; break; } employeePage.ComboState.Text = user.State; if (user.BirthDate != null) { employeePage.DateBirth.SelectedDate = user.BirthDate.Value; } employeePage.TextAddress.Text = user.Address; employeePage.TextCity.Text = user.City; employeePage.TextZipCode.Text = user.ZipCode; return(employeePage); }