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) { } } }