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

namespace Medivators.Data.Queries
{
	public class UpdateAdmin : SynchronousExecute
	{
		private string _admin = string.Empty;

		public UpdateAdmin(string Admin)
		{
			_admin = Admin;
		}
		public int Update()
		{
			int rtnVal = 0;
			string sql = "Update Admin set AdminKey = "  +
							Constants.DoubleQuote + _admin + Constants.DoubleQuote;
			try
			{
				rtnVal = base.Insert(sql);
			}
			catch (Exception ex)
			{
				ErrorHandler.GetInstance().LogException("UpdateAdmin", ex);
			}
			return rtnVal;
		}
	}
}
