//Action _act; public XMainWindowVM() { _exam = new XExamVM(); _dAL = new XDAL("DBSinoptik"); _paramTypeNamesCollection = new List<String> { "ЧСС", "СисАД", "ДиастАД", "ЧД" }; _paramTypeNamesCVSView = new CollectionViewSource(); _paramTypeNamesCVSView.Source = _paramTypeNamesCollection; _paramTypeNamesCVSView.View.CurrentChanged += ParamTypeNameView_CurrentChanged; IEnumerable<XExam> exams = _dAL.GetEntityCollection<XExam>("Weather", "ObjParams"); IEnumerable<XClient> clients = _dAL.GetEntityCollection<XClient>("ExamsCollection"); if (clients.Count() > 0) _client = new XClientVM(clients.First(cl => cl.Id == 2)); // _client.AddExam(_exam); //_act = new Action(SaveChanges); }
internal void AddExam(XExamVM ex) { this.ExamCollection.Add(ex); Client.ExamsCollection.Add(ex.Exam); }