internal List <DUNSregistrationEntity> GetAllDUNSregistration() { List <DUNSregistrationEntity> results = new List <DUNSregistrationEntity>(); try { StoredProcedureEntity sproc = new StoredProcedureEntity(); sproc.StoredProcedureName = "dnb.GetAllDUNSregistration"; DataTable dt; dt = sql.ExecuteDataTable(CommandType.StoredProcedure, sproc, "", DBIntent.Read.ToString()); if (dt != null && dt.Rows.Count > 0) { DUNSregistrationAdapter ta = new DUNSregistrationAdapter(); foreach (DataRow rw in dt.Rows) { results = ta.Adapt(dt); } } } catch (Exception) { throw; } return(results); }
internal DUNSregistrationEntity GetDUNSregistrationById(int id) { DUNSregistrationEntity results = new DUNSregistrationEntity(); try { StoredProcedureEntity sproc = new StoredProcedureEntity(); sproc.StoredProcedureName = "dnb.GetDUNSregistrationById"; sproc.StoredProceduresParameter.Add(GetParam("@MonitoringRegistrationId", id.ToString(), SQLServerDatatype.IntDataType)); DataTable dt; dt = sql.ExecuteDataTable(CommandType.StoredProcedure, sproc, "", DBIntent.Read.ToString()); if (dt != null && dt.Rows.Count > 0) { DUNSregistrationAdapter ta = new DUNSregistrationAdapter(); foreach (DataRow rw in dt.Rows) { results = ta.AdaptItem(rw, dt); } } } catch (Exception) { throw; } return(results); }
internal List <DUNSregistrationEntity> GetDUNSregistration(int CredentialId) { List <DUNSregistrationEntity> results = new List <DUNSregistrationEntity>(); try { StoredProcedureEntity sproc = new StoredProcedureEntity(); sproc.StoredProcedureName = "dnb.GetDUNSregistration"; sproc.StoredProceduresParameter.Add(GetParam("@CredentialId", CredentialId.ToString(), SQLServerDatatype.IntDataType)); DataTable dt; dt = sql.ExecuteDataTable(CommandType.StoredProcedure, sproc, "", DBIntent.ReadWrite.ToString()); if (dt != null && dt.Rows.Count > 0) { results = new DUNSregistrationAdapter().Adapt(dt); } } catch (Exception) { throw; } return(results); }