diff --git a/Common.Library.DataLayer/Common.Library.DataLayer.csproj b/Common.Library.DataLayer/Common.Library.DataLayer.csproj new file mode 100644 index 0000000..236e904 --- /dev/null +++ b/Common.Library.DataLayer/Common.Library.DataLayer.csproj @@ -0,0 +1,15 @@ + + + + net5.0 + common-library-data-layer + 1.0.0 + Don Oerkfitz + DMC Dynamics LLC + + + + + + + diff --git a/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/AboutCompanyDAO.cs b/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/AboutCompanyDAO.cs new file mode 100644 index 0000000..bdc7465 --- /dev/null +++ b/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/AboutCompanyDAO.cs @@ -0,0 +1,54 @@ +using Common.Library.SQL.MySQL; +using System; +using System.Data; +using Common.Library.DataLayer.DTO.Websites.DMCDynamics.LLC; + +namespace Common.Library.DataLayer.DAO.Websites.DMCDynamics.LLC +{ + public class AboutCompanyDAO : MySQL + { + public AboutCompanyDAO(string server, string database, string username, string password) : base(server, database, username, password) + { + + } + + public AboutCompanyDTOCollection SelectAll() + { + InitConnection(); + try + { + AboutCompanyDTOCollection items = new(); + + DBCommand.CommandType = CommandType.StoredProcedure; + DBCommand.CommandText = "About_Company_SelectAll"; + DBReader = DBCommand.ExecuteReader(); + + while(DBReader.Read()) + { + AboutCompanyDTO item = new AboutCompanyDTO() + { + AboutCompanyID = GetInt("AboutCompanyID").Value, + AboutHeader = GetString("AboutHeader"), + AboutDescription = GetString("AboutDescription"), + IsVisible = GetBool("IsVisible").Value, + CSS = GetString("CSS"), + ImagePath = GetString("ImagePath") + }; + + items.Add(item); + } + + return items.Count == 0 ? null : items; + } + catch(Exception) + { + throw; + } + finally + { + DisposeConnection(); + } + + } + } +} \ No newline at end of file diff --git a/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/CompanyInfoDAO.cs b/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/CompanyInfoDAO.cs new file mode 100644 index 0000000..db30649 --- /dev/null +++ b/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/CompanyInfoDAO.cs @@ -0,0 +1,51 @@ +using Common.Library.SQL.MySQL; +using System; +using System.Data; +using Common.Library.DataLayer.DTO.Websites.DMCDynamics.LLC; + +namespace Common.Library.DataLayer.DAO.Websites.DMCDynamics.LLC +{ + public class CompanyInfoDAO : MySQL + { + public CompanyInfoDAO(string server, string database, string username, string password) : base(server, database, username, password) + { + + } + + public CompanyInfoDTO Select() + { + InitConnection(); + try + { + CompanyInfoDTO item = null; + + DBCommand.CommandType = CommandType.StoredProcedure; + DBCommand.CommandText = "GetCompanyInfo"; + DBReader = DBCommand.ExecuteReader(); + + if(DBReader.Read()) + { + item = new CompanyInfoDTO() + { + CompanyName = GetString("CompanyName"), + Address = GetString("Address"), + PhoneNumber = GetString("PhoneNumber"), + EmailAddress = GetString("EmailAddress"), + CompanySlogan = GetString("CompanySlogan") + }; + } + + return item; + } + catch(Exception) + { + throw; + } + finally + { + DisposeConnection(); + } + + } + } +} \ No newline at end of file diff --git a/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/ServiceInformationDAO.cs b/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/ServiceInformationDAO.cs new file mode 100644 index 0000000..4d6647a --- /dev/null +++ b/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/ServiceInformationDAO.cs @@ -0,0 +1,51 @@ +using Common.Library.SQL.MySQL; +using System; +using System.Data; +using Common.Library.DataLayer.DTO.Websites.DMCDynamics.LLC; + +namespace Common.Library.DataLayer.DAO.Websites.DMCDynamics.LLC +{ + public class ServiceInformationDAO : MySQL + { + public ServiceInformationDAO(string server, string database, string username, string password) : base(server, database, username, password) + { + + } + + public ServiceInformationDTO SelectOne(int serviceID) + { + InitConnection(); + try + { + ServiceInformationDTO item = null; + + DBCommand.CommandType = CommandType.StoredProcedure; + DBCommand.CommandText = "ServiceInformation_SelectOne"; + DBCommand.Parameters.AddWithValue("@ID", serviceID); + DBReader = DBCommand.ExecuteReader(); + + if (DBReader.Read()) + { + + item = new ServiceInformationDTO() + { + ServiceInformationID = GetInt("ServiceInformationID").Value, + ServiceID = GetInt("ServiceID").Value, + ServiceDescription = GetString("ServiceDescription") + }; + + } + + return item; + } + catch (Exception) + { + throw; + } + finally + { + DisposeConnection(); + } + } + } +} \ No newline at end of file diff --git a/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/ServicesDAO.cs b/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/ServicesDAO.cs new file mode 100644 index 0000000..c383898 --- /dev/null +++ b/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/ServicesDAO.cs @@ -0,0 +1,53 @@ +using Common.Library.SQL.MySQL; +using System; +using System.Data; +using Common.Library.DataLayer.DTO.Websites.DMCDynamics.LLC; + +namespace Common.Library.DataLayer.DAO.Websites.DMCDynamics.LLC +{ + public class ServicesDAO : MySQL + { + public ServicesDAO(string server, string database, string username, string password) : base(server, database, username, password) + { + + } + + public ServicesDTOCollection SelectAll() + { + InitConnection(); + try + { + ServicesDTOCollection items = new ServicesDTOCollection(); + + DBCommand.CommandType = CommandType.StoredProcedure; + DBCommand.CommandText = "GetServices"; + DBReader = DBCommand.ExecuteReader(); + + while (DBReader.Read()) + { + + ServicesDTO item = new ServicesDTO() + { + ServiceID = GetInt("ServiceID").Value, + ServiceName = GetString("ServiceName"), + ServiceTags = GetString("ServiceTags"), + FontAwesomeIcon = GetString("FontAwesomeIcon"), + IsEnabled = GetBool("IsEnabled").Value + }; + + items.Add(item); + } + + return (ServicesDTOCollection)(items.Count == 0 ? null : items); + } + catch (Exception) + { + throw; + } + finally + { + DisposeConnection(); + } + } + } +} \ No newline at end of file diff --git a/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/TestimonialGuidsDAO.cs b/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/TestimonialGuidsDAO.cs new file mode 100644 index 0000000..0f4f567 --- /dev/null +++ b/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/TestimonialGuidsDAO.cs @@ -0,0 +1,55 @@ +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) + { + + } + } +} diff --git a/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/TestimonialImagesDAO.cs b/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/TestimonialImagesDAO.cs new file mode 100644 index 0000000..6fba3a4 --- /dev/null +++ b/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/TestimonialImagesDAO.cs @@ -0,0 +1,79 @@ +using Common.Library.SQL.MySQL; +using System; +using System.Data; +using Common.Library.DataLayer.DTO.Websites.DMCDynamics.LLC; +using System.Collections.Generic; + +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 TestimonialImagesDTO SelectOne(int testimonialID) + { + InitConnection(); + try + { + TestimonialImagesDTO item = null; + + DBCommand.CommandType = CommandType.StoredProcedure; + DBCommand.CommandText = "Testimonial_Images_SelectOne"; + DBCommand.Parameters.AddWithValue("tID", testimonialID); + DBReader = DBCommand.ExecuteReader(); + + if (DBReader.Read()) + { + + item = new TestimonialImagesDTO() + { + TestimonialImageID = GetInt("TestimonialImageID").Value, + TestimonialID = GetInt("TestimonialID").Value, + ImageType = GetString("ImageType"), + ImageData = GetBytes("ImageData") + }; + + } + + return item; + } + catch (Exception) + { + throw; + } + finally + { + DisposeConnection(); + } + } + + public void InsertImage(int testimonialID, KeyValuePair imageData) + { + InitConnection(); + try + { + + DBCommand.CommandType = CommandType.StoredProcedure; + DBCommand.CommandText = "Testimonial_Images_Insert"; + + DBCommand.Parameters.AddWithValue("@testimonialID", testimonialID); + DBCommand.Parameters.AddWithValue("@imageType", imageData.Key); + DBCommand.Parameters.AddWithValue("@imageData", imageData.Value); + + DBCommand.ExecuteNonQuery(); + + } + catch (Exception) + { + throw; + } + finally + { + DisposeConnection(); + } + } + } +} \ No newline at end of file diff --git a/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/TestimonialsDAO.cs b/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/TestimonialsDAO.cs new file mode 100644 index 0000000..2dcbbb2 --- /dev/null +++ b/Common.Library.DataLayer/DAO/Websites/DMCDynamics.LLC/TestimonialsDAO.cs @@ -0,0 +1,110 @@ +using Common.Library.SQL.MySQL; +using System; +using System.Data; +using Common.Library.DataLayer.DTO.Websites.DMCDynamics.LLC; +using System.Collections.Generic; +using MySql.Data.MySqlClient; + +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 TestimonialsDTOCollection SelectAll() + { + InitConnection(); + try + { + TestimonialsDTOCollection items = new(); + + DBCommand.CommandType = CommandType.StoredProcedure; + DBCommand.CommandText = "Testimonials_SelectAll"; + + DBReader = DBCommand.ExecuteReader(); + + while (DBReader.Read()) + { + + TestimonialsDTO item = new() + { + TestimonialID = GetInt("TestimonialID").Value, + CompanyName = GetString("CompanyName"), + CompanySpokesPerson = GetString("CompanySpokesPerson"), + CompanyTitle = GetString("CompanyTitle"), + CompanyWebsite = GetString("CompanyWebsite"), + Testimonial = GetString("Testimonial") + }; + + items.Add(item); + + } + + return (items.Count == 0 ? null : items); + } + catch (Exception) + { + throw; + } + finally + { + DisposeConnection(); + } + } + + public int Insert(TestimonialsDTO testimonial) + { + InitConnection(); + + try + { + DBCommand.CommandType = CommandType.StoredProcedure; + DBCommand.CommandText = "Testimonials_Insert"; + + //> Add parameters + + + DBCommand.ExecuteNonQuery(); + + return (int)DBCommand.Parameters["TestimonialID"].Value; + } + catch(Exception) + { + throw; + } + finally + { + DisposeConnection(); + } + } + + //public void InsertImage(int testimonialID, KeyValuePair imageData) + //{ + // InitConnection(); + // try + // { + + // DBCommand.CommandType = CommandType.StoredProcedure; + // DBCommand.CommandText = "Testimonial_Images_Insert"; + + // DBCommand.Parameters.AddWithValue("@testimonialID", testimonialID); + // DBCommand.Parameters.AddWithValue("@imageType", imageData.Key); + // DBCommand.Parameters.AddWithValue("@imageData", imageData.Value); + + // DBCommand.ExecuteNonQuery(); + + // } + // catch (Exception) + // { + // throw; + // } + // finally + // { + // DisposeConnection(); + // } + //} + } +} \ No newline at end of file diff --git a/Common.Library.DataLayer/DAO/Websites/JasonNeumannAudio.com/AboutPageDAO.cs b/Common.Library.DataLayer/DAO/Websites/JasonNeumannAudio.com/AboutPageDAO.cs new file mode 100644 index 0000000..af7fb89 --- /dev/null +++ b/Common.Library.DataLayer/DAO/Websites/JasonNeumannAudio.com/AboutPageDAO.cs @@ -0,0 +1,45 @@ +using Common.Library.SQL.MySQL; +using System; +using System.Data; +using Common.Library.DataLayer.DTO.Websites.JasonNeumannAudio.com; + + +namespace Common.Library.DataLayer.DAO.Websites.JasonNeumannAudio.com +{ + public class AboutPageDAO : MySQL + { + public AboutPageDAO(DBConnectionInformation connectionInformation) : base(connectionInformation){ } + + public AboutPageDTO SelectAboutPageText() + { + InitConnection(); + AboutPageDTO item = null; + + try + { + DBCommand.CommandType = CommandType.StoredProcedure; + DBCommand.CommandText = "about_page_select_text"; + DBReader = DBCommand.ExecuteReader(); + + if(DBReader.Read()) + { + item = new() + { + AboutPageID = GetInt("AboutPageID").Value, + AboutPageText = FormatNewLineForHTML(GetString("AboutPageText"), 2) + }; + } + + return item; + } + catch(Exception) + { + throw; + } + finally + { + DisposeConnection(); + } + } + } +} \ No newline at end of file diff --git a/Common.Library.DataLayer/DAO/Websites/JasonNeumannAudio.com/ServicesDAO.cs b/Common.Library.DataLayer/DAO/Websites/JasonNeumannAudio.com/ServicesDAO.cs new file mode 100644 index 0000000..12086a8 --- /dev/null +++ b/Common.Library.DataLayer/DAO/Websites/JasonNeumannAudio.com/ServicesDAO.cs @@ -0,0 +1,47 @@ +using Common.Library.SQL.MySQL; +using System; +using System.Data; +using Common.Library.DataLayer.DTO.Websites.JasonNeumannAudio.com; + + +namespace Common.Library.DataLayer.DAO.Websites.JasonNeumannAudio.com +{ + public class ServicesDAO : MySQL + { + public ServicesDAO(DBConnectionInformation connectionInformation) : base(connectionInformation){ } + + public ServicesDTOCollection GetServices() + { + InitConnection(); + ServicesDTOCollection items = new(); + + try + { + DBCommand.CommandType = CommandType.StoredProcedure; + DBCommand.CommandText = "services_page_select_all"; + DBReader = DBCommand.ExecuteReader(); + + while(DBReader.Read()) + { + ServicesDTO item = new() + { + ServicePageID = GetInt("ServicePageID").Value, + ServiceText = GetString("ServiceText") + }; + + items.Add(item); + } + + return items.Count == 0 ? null : items; + } + catch(Exception) + { + throw; + } + finally + { + DisposeConnection(); + } + } + } +} \ No newline at end of file diff --git a/Common.Library.DataLayer/DAO/Websites/JasonNeumannAudio.com/WorkPageDAO.cs b/Common.Library.DataLayer/DAO/Websites/JasonNeumannAudio.com/WorkPageDAO.cs new file mode 100644 index 0000000..7eccae0 --- /dev/null +++ b/Common.Library.DataLayer/DAO/Websites/JasonNeumannAudio.com/WorkPageDAO.cs @@ -0,0 +1,112 @@ +using Common.Library.SQL.MySQL; +using System; +using System.Data; +using Common.Library.DataLayer.DTO.Websites.JasonNeumannAudio.com; + + +namespace Common.Library.DataLayer.DAO.Websites.JasonNeumannAudio.com +{ + public class WorkPageDAO : MySQL + { + public WorkPageDAO(DBConnectionInformation connectionInformation) : base(connectionInformation){ } + + public WorkPageDTO SelectOne(WorkPageDTO.WorkPageType workPageType) + { + InitConnection(); + WorkPageDTO item = null; + + try + { + DBCommand.CommandType = CommandType.StoredProcedure; + DBCommand.CommandText = "work_page_select_one"; + DBCommand.Parameters.AddWithValue("@TypeID", (int)workPageType); + DBReader = DBCommand.ExecuteReader(); + + if(DBReader.Read()) + { + item = new() + { + WorkPageID = GetInt("WorkPageID").Value, + WorkPageTypeID = (WorkPageDTO.WorkPageType)GetInt("WorkPageTypeID").Value, + WorkPageName = GetString("WorkPageName"), + WorkPageLink = GetString("WorkPageLink"), + WorkPageValue = FormatBoldForHTML(GetString("WorkPageValue")) + }; + } + + return item; + } + catch(Exception) + { + throw; + } + finally + { + DisposeConnection(); + } + } + + public WorkPageDTOCollection SelectAllByWorkPageType(WorkPageDTO.WorkPageType workPageType) + { + InitConnection(); + WorkPageDTOCollection items = new(); + + try + { + DBCommand.CommandType = CommandType.StoredProcedure; + DBCommand.CommandText = "work_page_select_all_by_work_page_type"; + DBCommand.Parameters.AddWithValue("@TypeID", (int)workPageType); + DBReader = DBCommand.ExecuteReader(); + + while (DBReader.Read()) + { + WorkPageDTO item = new() + { + // WorkPageID = GetInt("WorkPageID").Value, + WorkPageTypeID = (WorkPageDTO.WorkPageType)GetInt("WorkPageTypeID").Value, + WorkPageName = GetString("WorkPageName"), + WorkPageLink = GetString("WorkPageLink"), + WorkPageValue = FormatBoldForHTML(GetString("WorkPageValue")) + }; + + items.Add(item); + } + + return items.Count == 0 ? null : items; + } + catch (Exception) + { + throw; + } + finally + { + DisposeConnection(); + } + } + + // public void InsertWorkPageItem(WorkPageDTO item) + // { + // InitConnection(); + // WorkPageDTOCollection items = new(); + + // try + // { + // DBCommand.CommandType = CommandType.StoredProcedure; + // DBCommand.CommandText = "work_page_insert_work_page_item"; + + // // DBCommand.Parameters.AddWithValue("@TypeID", (int)workPageType); + + + // DBCommand.ExecuteNonQuery(); + // } + // catch (Exception) + // { + // throw; + // } + // finally + // { + // DisposeConnection(); + // } + // } + } +} \ No newline at end of file diff --git a/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/AboutCompanyDTO.cs b/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/AboutCompanyDTO.cs new file mode 100644 index 0000000..217fc39 --- /dev/null +++ b/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/AboutCompanyDTO.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Common.Library.DataLayer.DTO.Websites.DMCDynamics.LLC +{ + public class AboutCompanyDTO + { + public int AboutCompanyID { get; set; } + public string AboutHeader { get; set; } + public string AboutDescription { get; set; } + public bool IsVisible { get; set; } + public string CSS { get; set; } + public string ImagePath { get; set; } + } + + public class AboutCompanyDTOCollection : List { } +} diff --git a/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/CompanyInfoDTO.cs b/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/CompanyInfoDTO.cs new file mode 100644 index 0000000..c813bf2 --- /dev/null +++ b/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/CompanyInfoDTO.cs @@ -0,0 +1,49 @@ +using System.Collections.Generic; +using Common.Library.CustomObjects; +using System.Linq; + +namespace Common.Library.DataLayer.DTO.Websites.DMCDynamics.LLC +{ + public class CompanyInfoDTO + { + public string CompanyName { get; set; } + public string PhoneNumber { get; set; } + public string EmailAddress { get; set; } + public string Address { get; set; } + public string CompanySlogan { get; set; } + + public PhoneNumberContainer FormattedPhoneNumber + { + get + { + List phoneNumber = PhoneNumber.Split(" ").Select(val => val.Trim()).ToList(); + return new PhoneNumberContainer { AreaCode = phoneNumber[0], PhoneNumber = phoneNumber[1] }; + } + } + + public AddressContainer FormattedAddress + { + get + { + List address = Address.Split(",").Select(val => val.Trim()).ToList(); + + string houseNumber = address[0].Substring(0, address[0].IndexOf(" ")).Trim(); + string streetName = address[0].Substring(address[0].IndexOf(" ")).Trim(); + string city = address[1].Trim(); + string state = address[2].Substring(0, address[2].IndexOf(" ")).Trim(); + string zip = address[2].Substring(address[2].IndexOf(" ")).Trim(); + + return new AddressContainer + { + HouseNumber = houseNumber, + StreetName = streetName, + City = city, + State = state, + Zip = zip + }; + } + } + } + + public class CompanyInfoDTOCollection : List { } +} \ No newline at end of file diff --git a/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/ServiceInformationDTO.cs b/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/ServiceInformationDTO.cs new file mode 100644 index 0000000..f9917da --- /dev/null +++ b/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/ServiceInformationDTO.cs @@ -0,0 +1,15 @@ +using System.Collections.Generic; + +namespace Common.Library.DataLayer.DTO.Websites.DMCDynamics.LLC +{ + public class ServiceInformationDTO + { + public int ServiceInformationID { get; set; } + public int ServiceID { get; set; } + public string ServiceDescription { get; set; } + + } + + + public class ServiceInformationDTOCollection : List {} +} \ No newline at end of file diff --git a/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/ServicesDTO.cs b/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/ServicesDTO.cs new file mode 100644 index 0000000..85fdbbe --- /dev/null +++ b/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/ServicesDTO.cs @@ -0,0 +1,15 @@ +using System.Collections.Generic; + +namespace Common.Library.DataLayer.DTO.Websites.DMCDynamics.LLC +{ + public class ServicesDTO + { + public int ServiceID { get; set; } + public string ServiceName { get; set; } + public string ServiceTags { get; set; } + public string FontAwesomeIcon { get; set; } + public bool IsEnabled { get; set; } + } + + public class ServicesDTOCollection : List {} +} \ No newline at end of file diff --git a/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/TestimonialImagesDTO.cs b/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/TestimonialImagesDTO.cs new file mode 100644 index 0000000..d32faa3 --- /dev/null +++ b/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/TestimonialImagesDTO.cs @@ -0,0 +1,28 @@ +using Org.BouncyCastle.Crypto.Paddings; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Common.Library.DataLayer.DTO.Websites.DMCDynamics.LLC +{ + public class TestimonialImagesDTO + { + public int TestimonialImageID { get; set; } + public int TestimonialID { get; set; } + public string ImageType { get; set; } + public byte[] ImageData { get; set; } + + public string ImageDataForWeb => GetImageDataForWeb(); + + + private string GetImageDataForWeb() + { + string imageData = ImageData == null ? string.Empty : Convert.ToBase64String(ImageData); + + return $"data:{ImageType ?? string.Empty};base64,{imageData}"; + } + } + + public class TestimonialImagesDTOCollection : List { } +} diff --git a/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/TestimonialsDTO.cs b/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/TestimonialsDTO.cs new file mode 100644 index 0000000..e999edd --- /dev/null +++ b/Common.Library.DataLayer/DTO/Websites/DMCDynamics.LLC/TestimonialsDTO.cs @@ -0,0 +1,23 @@ +using Org.BouncyCastle.Crypto.Paddings; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Common.Library.DataLayer.DTO.Websites.DMCDynamics.LLC +{ + public class TestimonialsDTO + { + public int TestimonialID { get; set; } + public string CompanyName { get; set; } + public string CompanySpokesPerson { get; set; } + public string CompanyTitle { get; set; } + public string CompanyWebsite { get; set; } + public string Testimonial { get; set; } + + public TestimonialImagesDTO TestimonialImage { get; set; } + public string TestimonialGUID { get; set; } + } + + public class TestimonialsDTOCollection : List { } +} diff --git a/Common.Library.DataLayer/DTO/Websites/JasonNeumannAudio.com/AboutPageDTO.cs b/Common.Library.DataLayer/DTO/Websites/JasonNeumannAudio.com/AboutPageDTO.cs new file mode 100644 index 0000000..7aad297 --- /dev/null +++ b/Common.Library.DataLayer/DTO/Websites/JasonNeumannAudio.com/AboutPageDTO.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; + +namespace Common.Library.DataLayer.DTO.Websites.JasonNeumannAudio.com +{ + public class AboutPageDTO + { + public int AboutPageID { get; set;} + public string AboutPageText { get; set; } + } + + public class AboutPageDTOCollection : List{ } +} \ No newline at end of file diff --git a/Common.Library.DataLayer/DTO/Websites/JasonNeumannAudio.com/ServicesDTO.cs b/Common.Library.DataLayer/DTO/Websites/JasonNeumannAudio.com/ServicesDTO.cs new file mode 100644 index 0000000..67aa02c --- /dev/null +++ b/Common.Library.DataLayer/DTO/Websites/JasonNeumannAudio.com/ServicesDTO.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; + +namespace Common.Library.DataLayer.DTO.Websites.JasonNeumannAudio.com +{ + public class ServicesDTO + { + public int ServicePageID { get; set; } + public string ServiceText { get; set; } + } + + public class ServicesDTOCollection : List{ } +} \ No newline at end of file diff --git a/Common.Library.DataLayer/DTO/Websites/JasonNeumannAudio.com/WorkPageDTO.cs b/Common.Library.DataLayer/DTO/Websites/JasonNeumannAudio.com/WorkPageDTO.cs new file mode 100644 index 0000000..5f018d6 --- /dev/null +++ b/Common.Library.DataLayer/DTO/Websites/JasonNeumannAudio.com/WorkPageDTO.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; + +namespace Common.Library.DataLayer.DTO.Websites.JasonNeumannAudio.com +{ + public class WorkPageDTO + { + public int WorkPageID { get; set; } + public WorkPageType WorkPageTypeID { get; set; } + public string WorkPageName { get; set; } + public string WorkPageValue { get; set; } + public string WorkPageLink { get; set; } + + public enum WorkPageType + { + CopyText = 1, + Links = 2, + Poster = 3 + } + } + + public class WorkPageDTOCollection : List{ } +} \ No newline at end of file diff --git a/Common.Library.System.sln b/Common.Library.System.sln index f0b3fea..cc3f3f3 100644 --- a/Common.Library.System.sln +++ b/Common.Library.System.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 15.0.26124.0 MinimumVisualStudioVersion = 15.0.26124.0 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Library", "Common.Library\Common.Library.csproj", "{0D9719C9-8A12-4549-8AFA-A85FF8E16C3A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Library.DataLayer", "Common.Library.DataLayer\Common.Library.DataLayer.csproj", "{29741C82-C18E-499C-8B7E-360227FD5A68}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -30,5 +32,17 @@ Global {0D9719C9-8A12-4549-8AFA-A85FF8E16C3A}.Release|x64.Build.0 = Release|Any CPU {0D9719C9-8A12-4549-8AFA-A85FF8E16C3A}.Release|x86.ActiveCfg = Release|Any CPU {0D9719C9-8A12-4549-8AFA-A85FF8E16C3A}.Release|x86.Build.0 = Release|Any CPU + {29741C82-C18E-499C-8B7E-360227FD5A68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {29741C82-C18E-499C-8B7E-360227FD5A68}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29741C82-C18E-499C-8B7E-360227FD5A68}.Debug|x64.ActiveCfg = Debug|Any CPU + {29741C82-C18E-499C-8B7E-360227FD5A68}.Debug|x64.Build.0 = Debug|Any CPU + {29741C82-C18E-499C-8B7E-360227FD5A68}.Debug|x86.ActiveCfg = Debug|Any CPU + {29741C82-C18E-499C-8B7E-360227FD5A68}.Debug|x86.Build.0 = Debug|Any CPU + {29741C82-C18E-499C-8B7E-360227FD5A68}.Release|Any CPU.ActiveCfg = Release|Any CPU + {29741C82-C18E-499C-8B7E-360227FD5A68}.Release|Any CPU.Build.0 = Release|Any CPU + {29741C82-C18E-499C-8B7E-360227FD5A68}.Release|x64.ActiveCfg = Release|Any CPU + {29741C82-C18E-499C-8B7E-360227FD5A68}.Release|x64.Build.0 = Release|Any CPU + {29741C82-C18E-499C-8B7E-360227FD5A68}.Release|x86.ActiveCfg = Release|Any CPU + {29741C82-C18E-499C-8B7E-360227FD5A68}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection EndGlobal