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

#ifndef InspectionResultInsert_FormH
#define InspectionResultInsert_FormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>
#include <ComCtrls.hpp>

#include "Common_PC.h"
#include "TntButtons.hpp"
#include "TntComCtrls.hpp"
#include "TntExtCtrls.hpp"
#include "TntStdCtrls.hpp"
#include "TntForms.hpp"
//---------------------------------------------------------------------------
class TInspectionResultInsertForm : public TTntForm
{
__published:	// IDE-managed Components
	TTntPanel * Panel3;
	TTntBitBtn *CancelBitBtn;
	TTntBitBtn *OkBitBtn;
	TTntPanel *Panel1;
	TTntLabel *Label1;
	TTntEdit *LotNameEdit;
	TTntLabel *Label2;
	TTntEdit *TotalTabletCountEdit;
	TTntLabel *Label3;
	TTntEdit *DefectTabletCountEdit;
	TTntLabel *Label4;
	TTntEdit *InspectionStartTimeEdit;
	TTntLabel *Label5;
	TTntEdit *InspectionEndTimeEdit;
	TTntMonthCalendar *MonthCalendar;
	TTntPanel *TimeEditPanel;
	TTntEdit *HourEdit;
	TTntEdit *MinEdit;
	TTntEdit *SecEdit;
	TTntLabel *Label6;
	TTntLabel *Label7;
	TTntLabel *Label8;
	TTntLabel *Label9;
	TTntEdit *ProductionCountEdit;
	TTntLabel *Label22;
	TEdit *OperatorNameEdit;
	TTntButton *SetToCurrentUserButton;
	TTntLabel *Label23;
	TTntEdit *UnInsTabletCountEdit;
	TTntLabel *Label24;
	TTntLabel *Label25;
	TTntLabel *Label26;
	TTntLabel *Label27;
	TTntEdit *LastInspectionTimeEdit;
	TTntButton *LastInspectionTimeEraseButton;
	TTntLabel *Label54;
  TButton *Button1;
	void __fastcall LotNameEditClick(TObject *Sender);
	void __fastcall NumberEditClick(TObject *Sender);
	void __fastcall MonthCalendarClick(TObject *Sender);
	void __fastcall InspectionStartTimeEditClick(TObject *Sender);
	void __fastcall InspectionEndTimeEditClick(TObject *Sender);
	void __fastcall TimeEditChange(TObject *Sender);
	void __fastcall OkBitBtnClick(TObject *Sender);
	void __fastcall TotalTabletCountEditClick(TObject *Sender);
	void __fastcall DefectTabletCountEditClick(TObject *Sender);
	void __fastcall SetToCurrentUserButtonClick(TObject *Sender);
	void __fastcall LastInspectionTimeEditClick(TObject *Sender);
	void __fastcall LastInspectionTimeEraseButtonClick(TObject *Sender);
  void __fastcall Button1Click(TObject *Sender);
private:	// User declarations
	TDateTime InspectionStartDate;
	TDateTime InspectionStartTime;
	TDateTime InspectionEndDate;
	TDateTime InspectionEndTime;
	TDateTime LastInspectionDate;
	TDateTime LastInspectionTime;
	int InspectionTimeIndex;
	void __fastcall GetDefaultString();
  void __fastcall SetGradeInfo(TTabletGradeData *pTabletGradeData);
  void __fastcall GetGradeInfo(TTabletGradeData *pTabletGradeData);
  
public:		// User declarations
	AnsiString LOTName;

	/*TTabletInspectReport TabletInspectReport;
	TTabletInspectGradeData TabletInspectGradeData;*/
  // report
  NFA_DATA_REPORT TabletInspectReport;
  NFA_DATA_REPORT_GRADE TabletInspectGradeData;

  // .grd
  TTabletGradeData tempTabletGradeData;



	void __fastcall SetReportEdit(AnsiString lotName, NFA_DATA_REPORT tabletInspectReport,
		NFA_DATA_REPORT_GRADE tabletInspectGradeData);

	__fastcall TInspectionResultInsertForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TInspectionResultInsertForm *InspectionResultInsertForm;
//---------------------------------------------------------------------------
#endif
