public RepairEdit(int id) { InitializeComponent(); // Insert code required on object creation below this point. _repair = _repairMapper.Find(id); FillExistParams(_repair); }
private void FillExistParams(UnitRepair repair) { if (repair.Id > 0) { var model = repair.UnitAccount.ModelInfo; Inventory.Text = repair.UnitAccount.Inventory; Model.Text = model.ModelMaker.Name + " " + model.Name; Defect.Text = repair.Defect; RepairPlace.Text = repair.RepairPlace; Send.SelectedDate = repair.SendDate; Received.SelectedDate = repair.ReceivedDate; CompletedCb.IsChecked = repair.Completed; } }