private void btnPrintEJReport_Click(object sender, EventArgs e)
{
txtResult.Text = "";
int copy = GetPrintTarget();
CPResponse response;
try
{
if (rbtnEJDetail.Checked)
{
response = new CPResponse(bridge.Printer.PrintEJDetail(copy));
}
else if (rbtnZCopy.Checked)
{
response = new CPResponse(bridge.Printer.PrintEJPeriodic((int)nmrEJZCopyZNo.Value, 0, (int)nmrEJZCopyZNo.Value, 0, copy));
}
else if (rbtnEJDocCopyZandDocId.Checked)
{
response = new CPResponse(bridge.Printer.PrintEJPeriodic((int)nmrEJSingDocZNo.Value,
(int)nmrEJSingDocNo.Value,
(int)nmrEJSingDocZNo.Value,
(int)nmrEJSingDocNo.Value,
copy));
}
else if (rbtnEJDocCopyDate.Checked)
{
//Receipt Date
DateTime date = dtEJSingDocDate.Value;
DateTime time = dtEJSingDocTime.Value;
DateTime comp = new DateTime(date.Year, date.Month, date.Day, time.Hour, time.Minute, 0, 0);
response = new CPResponse(bridge.Printer.PrintEJPeriodic(comp, copy));
}
}
catch (Exception ex)
{
bridge.Log(FormMessage.OPERATION_FAILS);
}
}