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#
4 years ago
|
using Common.Library.SQL.MySQL;
|
||
|
using System;
|
||
|
using System.Data;
|
||
4 years ago
|
using Common.Library.DataLayer.DTO.Websites.DMCDynamics.LLC;
|
||
4 years ago
|
|
||
4 years ago
|
namespace Common.Library.DataLayer.DAO.Websites.DMCDynamics.LLC
|
||
4 years ago
|
{
|
||
|
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();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|