protected override void OnNavigatedTo(NavigationEventArgs e) { if (e.Parameter != null) { int id = (int)e.Parameter; using (MobileContext db = new MobileContext()) { worker = db.Workers.FirstOrDefault(c => c.Id == id); } } if (worker != null) { headerBlock.Text = worker.name + " " + worker.family; nameBox.Text = worker.name + " " + worker.family; hoursBox.Text = (worker.hours).ToString() + " часов"; tarifBox.Text = Convert.ToString(worker.Tariff) + " рублей в час"; okladboxw.Text = Convert.ToString(worker.salary) + " рублей"; okladbox.Text = Convert.ToString(worker.salaryw) + " рублей"; nds.Text = Convert.ToString(worker.salary - worker.salaryw) + " рублей"; } }