private void saveAndPrintA3(int weeks, int copies) { NewOperationStoreEventArgs saveVal = this.save(); if (saveVal.StoredOk) { SPDPrint print = new SPDPrint(this.patComp); IList<PatientData> patients = new List<PatientData>(); patients.Add(currentPatient); if (saveVal.TakeFromDB) { print.PrintA3TemperaturCurve(patients, weeks, copies, SPDPrint.PrintFormat.A3, null); } else { print.PrintA3TemperaturCurve(patients, weeks, copies, SPDPrint.PrintFormat.A3, saveVal.Operation); } } }
private void buttonPrintFinalReport_Click(object sender, EventArgs e) { if (patComp.GetLastOperationByPatientID(currentPatient.Id) == null) { MessageBox.Show("This Patient hasn't got a Operation\r\nNo Final Report can be printed!"); return; } SPDPrint print = new SPDPrint(this.patComp); IList<PatientData> patients = new List<PatientData>(); patients.Add(currentPatient); print.PrintFinalReport(patients); }
private void buttonPrint_Click(object sender, EventArgs e) { if (!PatientSelected()) { MessageBox.Show("Please select a patient"); return; } SPDPrint print = new SPDPrint(this.patComp); IList<PatientData> patients = new List<PatientData>(); patients.Add(getSelectedPatient()); PrintSelectionForm psf = new PrintSelectionForm(); psf.ShowDialog(); if (!psf.Ok) { return; } SPD.Print.SPDPrint.PatientPrintDetails patientPrintDetails = 0; if (psf.Visits) patientPrintDetails = patientPrintDetails | SPDPrint.PatientPrintDetails.Visits; if (psf.FurtherTreatment) patientPrintDetails = patientPrintDetails | SPDPrint.PatientPrintDetails.FinalReport; if (psf.PhotoLinks) patientPrintDetails = patientPrintDetails | SPDPrint.PatientPrintDetails.Fotolinks; if (psf.Operations) patientPrintDetails = patientPrintDetails | SPDPrint.PatientPrintDetails.Operations; print.PrintPatients(patients, patientPrintDetails); }
private void buttonPrintIdCard_Click(object sender, EventArgs e) { if (currentPatient == null) { return; } SPDPrint print = new SPDPrint(this.patComp); IList<PatientData> patients = new List<PatientData>(); patients.Add(currentPatient); print.PrintIdCard(patients); }
private void printA3TemperaturCurves(int weeks, int copies) { IList<PatientData> toPrintPatients = getSelectedPatients(); if (toPrintPatients.Count <= 0) { MessageBox.Show("No patients selected!\nPlease select one or more Patients to print"); return; } SPDPrint print = new SPDPrint(this.patComp); print.PrintA3TemperaturCurve(toPrintPatients, weeks, copies, SPDPrint.PrintFormat.A3, null); }
private void buttonIdCardPrint_Click(object sender, EventArgs e) { if (!PatientSelected()) { MessageBox.Show("Please select a patient"); return; } SPDPrint print = new SPDPrint(this.patComp); IList<PatientData> patients = new List<PatientData>(); patients.Add(getSelectedPatient()); print.PrintIdCard(patients); }
private void buttonPrintWaitList_Click(object sender, EventArgs e) { SPDPrint print = new SPDPrint(this.patComp); print.PrintWaitList(patComp.FindPatientByWaitList()); }
private void buttonPrint_Click(object sender, EventArgs e) { IList<PatientData> toPrintPatients = getSelectedPatients(); if(toPrintPatients.Count <= 0) { MessageBox.Show("No patients selected!\nPleas select one or more Patients to print"); return; } SPD.Print.SPDPrint.PatientPrintDetails patientPrintDetails = 0; if(this.checkBoxVisits.Checked) patientPrintDetails = patientPrintDetails | SPDPrint.PatientPrintDetails.Visits; if(this.checkBoxFurtherTreatment.Checked) patientPrintDetails = patientPrintDetails | SPDPrint.PatientPrintDetails.FinalReport; if(this.checkBoxPhotoLinks.Checked) patientPrintDetails = patientPrintDetails | SPDPrint.PatientPrintDetails.Fotolinks; if(this.checkBoxOperations.Checked) patientPrintDetails = patientPrintDetails | SPDPrint.PatientPrintDetails.Operations; SPDPrint print = new SPDPrint(this.patComp); print.PrintPatients(toPrintPatients, patientPrintDetails); }
private void buttonPrintPatientList_Click(object sender, EventArgs e) { SPDPrint print = new SPDPrint(this.patComp); IList<PatientData> selectedPatients = getSelectedPatients(); if (selectedPatients.Count == 0) { MessageBox.Show("No Patients Selected!"); return; } print.PrintPatientList(selectedPatients, determineHeadline(listBoxHeadline.SelectedIndex), checkBoxUseOPDataIfAvailable.Checked); }
private void buttonPrintNextActionList_Click(object sender, EventArgs e) { SPDPrint print = new SPDPrint(this.patComp); long year; try { year = Int64.Parse(this.comboBoxNextActionYear.Text); } catch (Exception) { MessageBox.Show("The Year of the Next Action is not defined."); return; } long halfYear = Int64.Parse(this.listBoxHalfYear.Text); ActionKind actionKind = (ActionKind)Enum.Parse(new ActionKind().GetType(), this.listBoxAction.SelectedItem.ToString()); print.PrintNextActionList(this.patComp.FindPatientsWithNextAction(year, halfYear, actionKind), year, halfYear, actionKind); }
private void buttonPrintLabels_Click(object sender, EventArgs e) { IList<PatientData> toPrintPatients = new List<PatientData>(); int topBorder; int leftBorder; int noOfColumns; int noOfRows; int startingRow; int labelFontSize; try { topBorder = Int32.Parse(textBoxTopBorder.Text); } catch(FormatException) { MessageBox.Show("TopBorder has a wrong Format!"); return; } try { leftBorder = Int32.Parse(textBoxLeftBorder.Text); } catch(FormatException) { MessageBox.Show("LeftBorder has a wrong Format!"); return; } try { noOfColumns = Int32.Parse(textBoxNumberOfColumns.Text); } catch(FormatException) { MessageBox.Show("Number Of Columns has a wrong Format!"); return; } try { noOfRows = Int32.Parse(textBoxNumberOfRows.Text); } catch(FormatException) { MessageBox.Show("Number Of Rows has a wrong Format!"); return; } try { startingRow = Int32.Parse(textBoxStartingRow.Text); } catch(FormatException) { MessageBox.Show("Starting Row has a wrong Format!"); return; } try { labelFontSize = Int32.Parse(textBoxLabelFontSize.Text); } catch(FormatException) { MessageBox.Show("Label Font Size has a wrong Format!"); return; } if(topBorder < 0) { MessageBox.Show("Top Border has to be positive"); return; } if(leftBorder < 0) { MessageBox.Show("Left Border has to be positive"); return; } if(noOfColumns < 1 || noOfColumns > 8) { MessageBox.Show("The number of Columns has to be between 1 and 8"); return; } if(noOfRows < 1 || noOfColumns > 30) { MessageBox.Show("The number of Rows has to be between 1 and 30"); return; } if(startingRow < 1 || startingRow >= noOfRows) { MessageBox.Show("The Starting Row has to be between 1 and the number of Rows -1"); return; } if(labelFontSize < 4 || labelFontSize > 30) { MessageBox.Show("The Label Font Size has to be between 4 and 30"); return; } List<long> pIds = new List<long>(); foreach(ListViewItem item in listViewAllPatients.SelectedItems) { pIds.Add(Int64.Parse(item.Text)); } toPrintPatients = this.patComp.FindPatientByIds(pIds); if(toPrintPatients.Count <= 0) { MessageBox.Show("No patients selected!\nPlease select one or more Patients to print"); return; } SPD.GUI.Properties.Settings.Default.TopBorder = topBorder; SPD.GUI.Properties.Settings.Default.LeftBorder = leftBorder; SPD.GUI.Properties.Settings.Default.NoOfColumns = noOfColumns; SPD.GUI.Properties.Settings.Default.NoOfRows = noOfRows; SPD.GUI.Properties.Settings.Default.LabelFontSize = labelFontSize; SPD.GUI.Properties.Settings.Default.Save(); SPDPrint print = new SPDPrint(this.patComp); print.PrintLabels(topBorder, leftBorder, noOfColumns, noOfRows, startingRow, labelFontSize, toPrintPatients); }
private void buttonPrint2NextAppointment_Click(object sender, EventArgs e) { SPDPrint print = new SPDPrint(this.patComp); print.PrintNextAppointment(patient, this.textBoxDiagnoses.Text, this.textBoxTodo.Text, this.textBoxDate.Text, this.textBoxTime.Text, 2); this.Close(); }
private void buttonprintA3TemperatureCurve_Click(object sender, EventArgs e) { int weeks = Int32.Parse(listBoxDays.SelectedItem.ToString()) / 12; int copies = Int32.Parse(listBoxCopys.SelectedItem.ToString()); SPDPrint print = new SPDPrint(this.patComp); IList<PatientData> patients = new List<PatientData>(); patients.Add(currentPatient); print.PrintA3TemperaturCurve(patients, weeks, copies, SPDPrint.PrintFormat.A3, null); }