adding onto the testimonial system

expanding on framework
net6.0
Don Oerkfitz 3 years ago
parent a7cde4a539
commit 4652305d91

@ -30,7 +30,6 @@ namespace Common.Library.DataLayer.DAO.Websites.DMCDynamics.LLC
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);

@ -8,10 +8,9 @@ namespace Common.Library.DataLayer.DAO.Websites.DMCDynamics.LLC
{
public class TestimonialImagesDAO : MySQL
{
public TestimonialImagesDAO(string server, string database, string username, string password) : base(server, database, username, password)
{
public TestimonialImagesDAO(string server, string database, string username, string password) : base(server, database, username, password) { }
}
public TestimonialImagesDAO(DBConnectionInformation dBConnectionInformation) : base(dBConnectionInformation) { }
public TestimonialImagesDTO SelectOne(int testimonialID)
{

@ -9,10 +9,9 @@ namespace Common.Library.DataLayer.DAO.Websites.DMCDynamics.LLC
{
public class TestimonialsDAO : MySQL
{
public TestimonialsDAO(string server, string database, string username, string password) : base(server, database, username, password)
{
public TestimonialsDAO(string server, string database, string username, string password) : base(server, database, username, password) { }
}
public TestimonialsDAO(DBConnectionInformation dBConnectionInformation) : base(dBConnectionInformation) { }
public TestimonialsDTOCollection SelectAll()
{
@ -65,7 +64,13 @@ namespace Common.Library.DataLayer.DAO.Websites.DMCDynamics.LLC
DBCommand.CommandText = "Testimonials_Insert";
//> Add parameters
DBCommand.Parameters.Add(GetParameter("companyName", MySqlDbType.VarChar, 255, ParameterDirection.Input, testimonial.CompanyName));
DBCommand.Parameters.Add(GetParameter("companySpokesPerson", MySqlDbType.VarChar, 255, ParameterDirection.Input, testimonial.CompanySpokesPerson));
DBCommand.Parameters.Add(GetParameter("companyTitle", MySqlDbType.VarChar, 255, ParameterDirection.Input, testimonial.CompanyTitle));
DBCommand.Parameters.Add(GetParameter("testimonialText", MySqlDbType.Text, 65535, ParameterDirection.Input, testimonial.Testimonial));
DBCommand.Parameters.Add(GetParameter("companyWebsite", MySqlDbType.VarChar, 255, ParameterDirection.Input, testimonial.CompanyWebsite));
DBCommand.Parameters.Add(GetParameter("testimonialGUID", MySqlDbType.VarChar, 255, ParameterDirection.Input, testimonial.TestimonialGUID));
DBCommand.Parameters.Add(GetParameter("testimonialID", MySqlDbType.Int32, 0, ParameterDirection.Output, testimonial.TestimonialID));
DBCommand.ExecuteNonQuery();

@ -216,5 +216,17 @@ namespace Common.Library.SQL.MySQL
{
return GetDateTime(GetOrdinal(columnName));
}
//new MySqlParameter("GUID", MySqlDbType.VarChar, 255, ParameterDirection.Input, false, 0, 0, string.Empty, DataRowVersion.Proposed, guid)
protected MySqlParameter GetParameter(string columnName, MySqlDbType dataType, ParameterDirection direction, object data)
{
return null;
}
protected MySqlParameter GetParameter(string columnName, MySqlDbType dataType, int size, ParameterDirection direction, object data)
{
return new MySqlParameter(columnName, dataType, size, direction, false, 0, 0, string.Empty, DataRowVersion.Proposed, data);
}
}
}

Loading…
Cancel
Save