using System;
using System.Data;
using System.Data.AccessClient;
using System.Collections.Generic;
using System.Text;
using Medivators.Common;
using Medivators.Common.Enums;
using Medivators.Common.Logging;

namespace Medivators.Data.Queries
{
	public class InsertCycleReportLogRecord  : SynchronousExecute
	{
		private string _logKey = string.Empty;
		private string _rptKey = string.Empty;

		public InsertCycleReportLogRecord(string CycleReportKey, string LogRecordKey)
		{
			_rptKey = CycleReportKey;
			_logKey = LogRecordKey;
		}
		public int Insert()
		{
			int rtnVal = 0;
			string sql = "insert into CycleReportLogRecords (CycleReportKey, LogRecordKey) values (" + 
						  Constants.DoubleQuote + _rptKey + Constants.DoubleQuote + ", " + 
						  Constants.DoubleQuote + _logKey + Constants.DoubleQuote + ")";
			try
			{
				rtnVal = base.Insert(sql);
			}
			catch (Exception ex)
			{
				ErrorHandler.GetInstance().LogException("InsertCycleReportLogRecord", ex);
			}
			return rtnVal;
		}
	}
}
