public void PrintCard(tblPatientInfo patient) { var xCardSource = new List <tblPatientInfo>(1); xCardSource.Add(patient); PrintCards(xCardSource); }
private async Task PrintaCard(tblPatientInfo currentPatient) { await FViewDataContext.SaveAllCangesAsync(); // получить все номер аи ID // печатаем currentPatient.Printed = true; await FViewDataContext.SaveAllCangesAsync(); }
private void cmdAddPatientAndCadr(object sender, ExecutedRoutedEventArgs e) { tblPatientInfo xNewPatient = new tblPatientInfo() { Location = CardLocation.Receptopn }; ObservableCollection <tblPatientInfo> xPatientsSource = FViewDataContext.PatientInfos; xPatientsSource.Add(xNewPatient); FViewDataContext.PatientInfoViewSource.View.MoveCurrentTo(xNewPatient); }
private async void pnlMainPanient_DateTimeLostEvent(string f, string i, string o, DateTime birthDate) { tblPatientInfo xCurrent = FViewDataContext.CurrentPatient; if (xCurrent == null) { return; } if (!Guid.Empty.Equals(xCurrent.ID)) { return; } List <tblPatientInfo> xPatients = await FDataHelper.FindPatientIDByFIOData(f, i, o, birthDate); if (xPatients.Count == 0) { return; } StringBuilder xMsg = new StringBuilder(); xMsg.AppendFormat("Такие данные уже есть. {0} {1} {2}, дата рождения {3: dd MMMM yyyy}", f, i, o, birthDate); xMsg.AppendLine(); xMsg.AppendLine(); xMsg.Append(xPatients.Count > 1 ? "№ карточек:\r\n" : "№ карточки: "); xMsg.Append(string.Join(";\r\n", xPatients.Select(ptnt => string.Format("{0}, зарегистрирована {1: dd MMMM yyyy}", ptnt.Number, ptnt.DateCreate)).ToArray())); xMsg.AppendLine("."); xMsg.AppendLine(); xMsg.AppendLine("Да - Все равно ввести новые данные"); xMsg.AppendLine("Нет - Отменить ввод и просмотреть существующие данные"); MessageBoxResult xRes = System.Windows.MessageBox.Show(xMsg.ToString(), "Внимание", MessageBoxButton.YesNo, MessageBoxImage.Stop); if (xRes == MessageBoxResult.Yes) { return; } xCurrent.ForceRemove = true; FViewDataContext.PatientInfos.Remove(xCurrent); await SaveAllChanges(); await FViewDataContext.SetCardsByFIOViewSource(f, i, o, birthDate); }
private void cmdDeleteCurrentPatient(object sender, ExecutedRoutedEventArgs e) { tblPatientInfo xCurrent = FViewDataContext.CurrentPatient; if (xCurrent == null) { return; } MessageBoxResult xRes = System.Windows.MessageBox.Show(string.Format("Удалить карточку № {0}", xCurrent.Number), "Удаление", MessageBoxButton.YesNo, MessageBoxImage.Stop, MessageBoxResult.No); if (xRes != MessageBoxResult.Yes) { return; } FViewDataContext.PatientInfos.Remove(xCurrent); }
private bool CheckBeforeAddDoc() { tblPatientInfo xPatient = FViewDataContext.CurrentPatient; if (xPatient == null) { MessageBox.Show("Не выбран пациент", "Предупреждение", MessageBoxButton.OK); return(false); } if (!dtpDate.SelectedDate.HasValue) { MessageBox.Show("Выберите дату", "Предупреждение", MessageBoxButton.OK); return(false); } return(true); }
private void AddManipulation(tblOffer offer, tblEmployee employee = null) { tblPatientInfo xPatientInfo = FViewDataContext.CurrentPatient; if (xPatientInfo == null) { System.Windows.MessageBox.Show("Не выбран пациент"); return; } tblManipulation xManipulation = new tblManipulation() { tblPatient = xPatientInfo, tblOffer = offer, Price = offer.DefaultPrice, DateRealization = DateTime.Now, Eye = Eye.OU, tblEmployee = employee }; xPatientInfo.tblManipulationsObs.Add(xManipulation); }
private async void btnPrintDefaultCard(object sender, RoutedEventArgs e) { tblPatientInfo xCurrentPatient = FViewDataContext.CurrentPatient; await PrintaCard(xCurrentPatient); }
public CardFormN_025uAdapter(tblPatientInfo patient) { FPatient = patient; }
public CardDataAdapter(tblPatientInfo patient) { FPatient = patient; }