private void PrintReference() { human _human = _fe.humans.FirstOrDefault(id => id.idh == _humanid); if (_reference != EnumPReferences.NoReference) { ReferenceFactory refsfactory = new ReferenceFactory(_human, _ge, _fe); try { refsfactory.GetReference(new List <int> { _testresult.idtr }, _reference).Print(true); } catch (Exception ex) { MessageBox.Show(ex.Message); } } else { try{ ReportFactory.CreateReport(_test, _human, _testresult, _ge, _fe, false).Print(true); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
private void btn_printchar_Click(object sender, EventArgs e) { if (_currenthumanid != 0) { List <int> checkedtestids = new List <int>(); foreach (DataGridViewRow row in dg_testresults.Rows) { if ((bool)row.Cells[2].Value == true) { checkedtestids.Add(Convert.ToInt16(row.Cells[0].Value)); } } IReference reference = _referfactory.GetReference(checkedtestids, (EnumPReferences)_currentref); if (reference != null) { reference.Print(); } } }