You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
2.3 KiB
79 lines
2.3 KiB
using PEIS.Entity;
|
|
using PEIS.Utils;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace PEIS.View.Enrollment
|
|
{
|
|
public partial class BatchForm : Form
|
|
{
|
|
// 指引单、报告单
|
|
private FastReport.Report _pReport;
|
|
private List<EnrollmentPatient> _lstEnrollmentPatient = null;
|
|
private List<Int64> _lstId = null;
|
|
|
|
public BatchForm(List<EnrollmentPatient> items)
|
|
{
|
|
InitializeComponent();
|
|
_lstEnrollmentPatient = items;
|
|
DgcEnrollment.DataSource = _lstEnrollmentPatient;
|
|
|
|
DgvEnrollment.SelectionChanged += DgvEnrollment_SelectionChanged;
|
|
TsmiPrintGuide.Click += TsmiPrintGuide_Click;
|
|
TsmiPrintCost.Click += TsmiPrintCost_Click;
|
|
}
|
|
|
|
private void TsmiPrintCost_Click(object sender, EventArgs e)
|
|
{
|
|
if (_lstId == null || _lstId.Count() == 0) return;
|
|
|
|
try
|
|
{
|
|
_pReport = ReportHelper.BatchPrintCheckCost(_lstId);
|
|
_pReport.Preview = ReportPreview;
|
|
_pReport.ShowPrepared(); //显示
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Global.Msg("info", ex.Message);
|
|
}
|
|
}
|
|
|
|
private void TsmiPrintGuide_Click(object sender, EventArgs e)
|
|
{
|
|
if(_lstId == null || _lstId.Count() == 0) return;
|
|
|
|
try
|
|
{
|
|
_pReport = ReportHelper.BatchPrintGuide(_lstId);
|
|
_pReport.Preview = ReportPreview;
|
|
_pReport.ShowPrepared(); //显示
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Global.Msg("info", ex.Message);
|
|
}
|
|
|
|
}
|
|
|
|
private void DgvEnrollment_SelectionChanged(object sender, DevExpress.Data.SelectionChangedEventArgs e)
|
|
{
|
|
//DgvGroup.GetRowCellValue(DgvGroup.GetSelectedRows()[0], "ID").ToString()
|
|
var selectRowws = DgvEnrollment.GetSelectedRows();
|
|
var idList = new List<Int64>();
|
|
|
|
foreach(int row in selectRowws)
|
|
{
|
|
idList.Add(Convert.ToInt64(DgvEnrollment.GetRowCellValue(row, "ID").ToString()));
|
|
}
|
|
|
|
_lstId = idList;
|
|
}
|
|
}
|
|
}
|
|
|