//---------------------------------------------------------------------------

#ifndef InspectionRecover_FormH
#define InspectionRecover_FormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>

#include "Environment.h"
#include "TntStdCtrls.hpp"
#include "TntForms.hpp"
//---------------------------------------------------------------------------
class TInspectionRecoverForm : public TTntForm
{
__published:	// IDE-managed Components
	TTntButton *OkButton;
	TTntButton *CancelButton;
	TTntLabel *Label1;
	TTntGroupBox *GroupBox1;
	TTntGroupBox *GroupBox2;
	TTntGroupBox *GroupBox3;
	TTntLabel *Label2;
	TTntLabel *Label3;
	TTntLabel *Label4;
	TTntLabel *Label5;
	TTntLabel *Label6;
	TTntLabel *UserNameLabel;
	TTntLabel *InspectionTimeLabel;
	TTntLabel *ProductNameLabel;
	TTntLabel *LotNameLabel;
	TTntLabel *Label11;
	TTntLabel *Label12;
	TTntLabel *Label13;
	TTntLabel *Label14;
	TTntLabel *SavedTotalTabletCountLabel;
	TTntLabel *SavedGoodTabletCountLabel;
	TTntLabel *SavedDefectTabletCountLabel;
	TTntLabel *SavedUnInsTabletCountLabel;
	TTntLabel *Label19;
	TTntLabel *Label20;
	TTntLabel *Label21;
	TTntLabel *Label22;
	TTntLabel *Label23;
	TTntLabel *HCBTotalTabletCountLabel;
	TTntLabel *HCBGoodTabletCountLabel;
	TTntLabel *HCBDefectTabletCountLabel;
	TTntLabel *HCBUnInsTabletCountLabel;
	void __fastcall OkButtonClick(TObject *Sender);
	void __fastcall CancelButtonClick(TObject *Sender);
private:	// User declarations
	AnsiString RecentUserName, RecentProductName, RecentLot;
	TDateTime RecentInspectionTime;

	/*TTabletInspectReport RecentTabletInspectReport;
  TTabletInspectReportSub RecentTabletInspectReportSub;
  TTabletInspectGradeData tabletInspectGradeData;*/
  NFA_INSPECTION_REPORT_STRUCT Report;
  int DefectSeriesCount[MAX_DEFECT_SERIES_COUNT + 1];
  
	TTerminationInfo HCBTerminationInfo;
  void __fastcall GetDefaultString();
public:		// User declarations
	__fastcall TInspectionRecoverForm(TComponent* Owner);
	void __fastcall SetProcessingReport(AnsiString userName, double inspectionTime, AnsiString recentProductName,
		AnsiString recentLot, TTerminationInfo *terminationInfo);
	void __fastcall ExecuteRecover(void);
};
//---------------------------------------------------------------------------
extern PACKAGE TInspectionRecoverForm *InspectionRecoverForm;
//---------------------------------------------------------------------------
#endif
