using System;
using System.Data;

namespace QC.CorpTest.Libraries.QsprSchemaLibrary;

public static class QDMDataTableFactory
{
	public static class ParamtericDataTableColumns
	{
		public const string SessionDataRID = "SessionDataRID";

		public const string NodeDataRID = "NodeDataRID";

		public const string ParamDataRID = "ParamDataRID";

		public const string UUT_SN = "UUT_SN";

		public const string MCN = "MCN";

		public const string TreeID = "TreeID";

		public const string TreeFileName = "TreeFileName";

		public const string TesterID = "TesterID";

		public const string TestName = "TestName";

		public const string RealTestName = "RealName";

		public const string TestPath = "TestPath";

		public const string ParameterName = "ParameterName";

		public const string LowerLimit = "LowerLimit";

		public const string NumValue = "NumValue";

		public const string UpperLimit = "UpperLimit";

		public const string CharValue = "CharValue";

		public const string ExtHyperLink = "Link";

		public const string UOM = "UOM";

		public const string TestResult = "TestResult";

		public const string StartTime = "StartTime";

		public const string StopTime = "StopTime";

		public const string VisitNum = "VisitNum";

		public const string GlobalResult = "GlobalResult";

		public const string DvtFlag = "DvtFlag";

		public const string ScnValue = "ScnValue";

		public const string ArrayParamIndex = "ArrayParamIndex";

		public const string ArrayParamColumnIndex = "ArrayParamColumnIndex";

		public const string ArrayLowerLimit = "ArrayLowerLimit";

		public const string ArrayResult = "ArrayResult";

		public const string ArrayUpperLimit = "ArrayUpperLimit";

		public const string ArrayParamCharResult = "ArrayParamCharResult";

		public const string RunTitle = "RunTitle";

		public const string PassFail = "PassFail";

		public const string LastVisit = "LastVisit";

		public const string WorkStation = "WorkStation";

		public const string TestStartTime = "TestStartTime";

		public const string TestStopTime = "TestStopTime";

		public const string TestDuration = "TestDuration";

		public const string Comments = "Comments";

		public const string MachineName = "MachineName";
	}

	public static DataTable GetDataTable(ViewType viewType)
	{
		if (viewType == ViewType.ViewParametricResults)
		{
			return GetViewParameterResultTable();
		}
		return null;
	}

	private static DataTable GetViewParameterResultTable()
	{
		DataTable dataTable = new DataTable();
		dataTable.Columns.Add("SessionDataRID", typeof(long));
		dataTable.Columns.Add("UUT_SN", typeof(string));
		dataTable.Columns.Add("MCN", typeof(string));
		dataTable.Columns.Add("TreeID", typeof(string));
		dataTable.Columns.Add("TesterID", typeof(string));
		dataTable.Columns.Add("TestName", typeof(string));
		dataTable.Columns.Add("TestStartTime", typeof(DateTime));
		dataTable.Columns.Add("TestStopTime", typeof(DateTime));
		dataTable.Columns.Add("TestDuration");
		dataTable.Columns.Add("ParameterName", typeof(string));
		dataTable.Columns.Add("LowerLimit", typeof(double));
		dataTable.Columns.Add("NumValue", typeof(double));
		dataTable.Columns.Add("UpperLimit", typeof(double));
		dataTable.Columns.Add("CharValue", typeof(string));
		dataTable.Columns.Add("Link", typeof(string));
		dataTable.Columns.Add("UOM", typeof(string));
		dataTable.Columns.Add("TestResult", typeof(string));
		dataTable.Columns.Add("StartTime", typeof(DateTime));
		dataTable.Columns.Add("StopTime", typeof(DateTime));
		dataTable.Columns.Add("VisitNum", typeof(int));
		dataTable.Columns.Add("GlobalResult", typeof(string));
		dataTable.Columns.Add("DvtFlag", typeof(string));
		dataTable.Columns.Add("ScnValue", typeof(string));
		dataTable.Columns.Add("ArrayParamIndex", typeof(int));
		dataTable.Columns.Add("ArrayParamColumnIndex", typeof(int));
		dataTable.Columns.Add("ArrayLowerLimit", typeof(double));
		dataTable.Columns.Add("ArrayResult", typeof(double));
		dataTable.Columns.Add("ArrayUpperLimit", typeof(double));
		dataTable.Columns.Add("ArrayParamCharResult", typeof(string));
		dataTable.Columns.Add("RunTitle", typeof(string));
		dataTable.Columns.Add("PassFail", typeof(int));
		dataTable.Columns.Add("LastVisit", typeof(int));
		dataTable.Columns.Add("WorkStation", typeof(string));
		return dataTable;
	}
}
