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.
51 lines
1.5 KiB
C#
51 lines
1.5 KiB
C#
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();
|
|
}
|
|
}
|
|
}
|
|
} |