using Aitex.Core.RT.DBCore;

namespace MECF.Framework.Common.DBCore
{
	public class ThinknessDataRecorder
	{
		public static void InsertTrayThinkness(string waferGuid, string trayNumber, int trayCoating, int trayMax, string trayInnerNumber, int trayInnerCoating, int trayInnerMax, string ringInnerNumber, int ringInnerCoating, int ringInnerMax, string ringOuterNumber, int ringOuterCoating, int ringOuterMax)
		{
			string sql = $"INSERT INTO \"tray_thickness_data\"(\"wafer_guid\", \"tray_number\", \"tray_coating\", \"tray_max\", \"tray_inner_number\", \"tray_inner_coating\", \"tray_inner_max\", \"ring_inner_number\", \"ring_inner_coating\", \"ring_inner_max\", \"ring_outer_number\", \"ring_outer_coating\", \"ring_outer_max\") VALUES ('{waferGuid}', '{trayNumber}', '{trayCoating}', '{trayMax}', '{trayInnerNumber}', '{trayInnerCoating}','{trayInnerMax}', '{ringInnerNumber}', '{ringInnerCoating}', '{ringInnerMax}', '{ringOuterNumber}', '{ringOuterCoating}', '{ringOuterMax}');";
			DB.InsertSql(sql);
		}

		public static void InsertPMThinkness(string startdate, string pmName, double thickness)
		{
			string sql = $"INSERT INTO \"pm_thickness_data2\"(\"startdate\", \"pm_name\", \"thickness\") VALUES ('{startdate}', '{pmName}', '{thickness}');";
			DB.ExecuteNonQuery(sql);

        }
	}
}
