2016-02-09 07:31:14 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
|
using System.Data;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Windows.Forms;
|
2016-05-28 11:40:58 +00:00
|
|
|
|
using TBF.Resources;
|
2016-02-09 07:31:14 +00:00
|
|
|
|
|
|
|
|
|
|
namespace TBF.Forms
|
|
|
|
|
|
{
|
|
|
|
|
|
public partial class PreviousResultCtrl : UserControl
|
|
|
|
|
|
{
|
|
|
|
|
|
PreviousResultsDlg parent;
|
|
|
|
|
|
|
|
|
|
|
|
public int BatchNr;
|
|
|
|
|
|
public DateTime StarTime;
|
|
|
|
|
|
public DateTime EndTime;
|
|
|
|
|
|
public string ProcedureName;
|
|
|
|
|
|
public string PurchaseOrder;
|
|
|
|
|
|
public int PassedCount;
|
|
|
|
|
|
public int FailedCount;
|
|
|
|
|
|
public bool Sent;
|
|
|
|
|
|
|
|
|
|
|
|
protected PreviousResultCtrl()
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public PreviousResultCtrl(PreviousResultsDlg parent, int bnr, DateTime s, DateTime e, string proc, string pOrd, int passCnt, int failCnt, bool sent)
|
|
|
|
|
|
: this()
|
|
|
|
|
|
{
|
|
|
|
|
|
this.parent = parent;
|
|
|
|
|
|
BatchNr = bnr;
|
|
|
|
|
|
StarTime = s;
|
|
|
|
|
|
EndTime = e;
|
|
|
|
|
|
ProcedureName = proc;
|
|
|
|
|
|
PurchaseOrder = pOrd;
|
|
|
|
|
|
PassedCount = passCnt;
|
|
|
|
|
|
FailedCount = failCnt;
|
|
|
|
|
|
Sent = sent;
|
|
|
|
|
|
|
|
|
|
|
|
batchNrLabel.Text = BatchNr.ToString();
|
|
|
|
|
|
startTimeLabel.Text = string.Format("{0} {1}", StarTime.ToShortDateString(), StarTime.ToShortTimeString());
|
|
|
|
|
|
endTimeLabel.Text = string.Format("{0} {1}", EndTime.ToShortDateString(), EndTime.ToShortTimeString());
|
|
|
|
|
|
procedureLabel.Text = ProcedureName;
|
|
|
|
|
|
purchaseOrderLabel.Text = string.Format("Obj.: {0}", PurchaseOrder);
|
|
|
|
|
|
passedCountLabel.Text = string.Format("Dobrých: {0}", PassedCount);
|
|
|
|
|
|
failedCountLabel.Text = string.Format("Zlých: {0}", FailedCount);
|
2016-05-28 11:40:58 +00:00
|
|
|
|
|
|
|
|
|
|
sentCheckBox.Text = Strings.Sent;
|
2016-02-09 07:31:14 +00:00
|
|
|
|
sentCheckBox.Checked = Sent;
|
|
|
|
|
|
sendButton.Enabled = !Sent;
|
2016-05-28 11:40:58 +00:00
|
|
|
|
sendButton.Text = Strings.Again;
|
2016-02-09 07:31:14 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void UpdateSentState(bool sent)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.Sent = sent;
|
|
|
|
|
|
sentCheckBox.Checked = sent;
|
|
|
|
|
|
sendButton.Enabled = !sent;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void sendButton_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
parent.OnSendAgain(this, new PreviousResultIdEventArgs(BatchNr));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|