public OutDetail(OutViewModel outViewModel) { InitializeComponent(); _outDetailViewModel = new OutDetailViewModel(outViewModel); this.DataContext = _outDetailViewModel; }
public OutDetailViewModel(OutViewModel viewModel) { this.CarNo = viewModel.CarNo; this.OutPic = viewModel.OutPic; using (var context = new FZWD20150818Context()) { var oInPark = context.in_park.Find(new object[] { viewModel.OutParkRecord.card_no, viewModel.OutParkRecord.in_seq }); this.InPic = oInPark.in_pic; } }