You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.6 KiB
C#

4 years ago
using Common.Library.SQL.MySQL;
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Library.DataLayer.DAO.Websites.DMCDynamics.LLC
{
public class TestimonialGuidsDAO : MySQL
{
public TestimonialGuidsDAO(string server, string database, string username, string password) : base(server, database, username, password)
{
}
public bool IsTestimonialGUIDValid(string guid)
{
InitConnection();
try
{
bool isValid = false;
DBCommand.CommandType = CommandType.StoredProcedure;
DBCommand.CommandText = "Testimonials_ValidateGUID";
DBCommand.Parameters.Add(new MySqlParameter("GUID", MySqlDbType.VarChar, 255, ParameterDirection.Input, false, 0, 0, string.Empty, DataRowVersion.Proposed, guid));
DBCommand.Parameters.Add(new MySqlParameter("IsValid", MySqlDbType.Bit, 1, ParameterDirection.InputOutput, false, 0, 0, string.Empty, DataRowVersion.Proposed, isValid));
DBCommand.ExecuteNonQuery();
isValid = Convert.ToBoolean(DBCommand.Parameters["IsValid"].Value);
return isValid;
}
catch (Exception)
{
throw;
}
finally
{
DisposeConnection();
}
}
public void MarkGUIDAsUsed(string guid)
{
}
}
}