using DbAPI.Connections;
using DTS.Common.Interface.Database;
using System;
using DTS.Common.Classes.CustomerDetails;
using DTS.Common.Interface.TestMetaData;
namespace DbAPI.CustomerDetails
{
///
/// CustomerDetails related functions (GetCustomerDetails, )
///
public interface ICustomerDetails
{
///
/// Inserts a new record in the CustomerDetails table
///
///
///
///
/// The Id of the new record in the CustomerDetails table
/// Error string returned, possibly from sp_CustomerDetailsUpdate
/// 0 (ERROR_SUCCESS) on success, all other values are error codes
ulong CustomerDetailsInsert(IUserDbRecord user,
IConnectionDetails connection,
CustomerDetailsDbRecord customerDetailsDbRecord,
out int newId,
out string errorString);
///
/// Updates an existing record in the CustomerDetails table
///
///
///
///
/// Error string returned, possibly from sp_CustomerDetailsUpdate
/// 0 (ERROR_SUCCESS) on success, all other values are error codes
ulong CustomerDetailsUpdate(IUserDbRecord user,
IConnectionDetails connection,
CustomerDetailsDbRecord customerDetailsDbRecord,
out string errorString);
///
/// retrieves all customer details matching search criteria
///
///
///
/// Name in the CustomerDetails table
/// null, or records found
/// 0 (ERROR_SUCCESS) on success, all other values are error codes
ulong CustomerDetailsGet(IUserDbRecord user,
IConnectionDetails connection,
string name,
out ICustomerDetailsDbRecord[] customerDetailsDbRecords);
///
/// Deletes an entry in the CustomerDetails table
///
///
///
/// Name in the CustomerDetails table
/// Error string returned, possibly from sp_CustomerDetailsDelete
/// 0 (ERROR_SUCCESS) on success, all other values are error codes
ulong CustomerDetailsDelete(IUserDbRecord user,
IConnectionDetails connection,
string name,
out string errorString);
}
}