The da is maintained by Visual Studio. The TableMapping exists in the
InitializeComponent call for the DataProvider class. I have included it
below:
//
// daPARTY_CREDIT_GROUP_MAP
//
this.daPARTY_CREDIT_GROUP_MAP.SelectCommand =
this.PARTY_CREDIT_GROUP_MAPSelect;
this.daPARTY_CREDIT_GROUP_MAP.TableMappings.AddRange( new
System.Data.Common.DataTableMapping[]
{
new System.Data.Common.DataTableMapping( "Table",
"PARTY_CREDIT_GROUP_MAP", new System.Data.Common.DataColumnMapping[]
{
new System.Data.Common.DataColumnMapping( "GDR_PARTY_ID",
"GDR_PARTY_ID" ),
new System.Data.Common.DataColumnMapping( "CRM_CREDIT_GROUP_ID",
"CRM_CREDIT_GROUP_ID" ),
new System.Data.Common.DataColumnMapping(
"CRM_CRED_GRP_APPROVAL_STATUS", "CRM_CRED_GRP_APPROVAL_STATUS" ),
new System.Data.Common.DataColumnMapping(
"CRM_CRED_GRP_APPROVAL_DATE", "CRM_CRED_GRP_APPROVAL_DATE" ),
new System.Data.Common.DataColumnMapping( "CRM_CRED_GRP_APPROVER",
"CRM_CRED_GRP_APPROVER" ),
new System.Data.Common.DataColumnMapping( "UPD_USER", "UPD_USER" ),
new System.Data.Common.DataColumnMapping( "UPD_TIMESTAMP",
"UPD_TIMESTAMP" ),
new System.Data.Common.DataColumnMapping(
"SOURCE_SYSTEM_DATA_SOURCE", "SOURCE_SYSTEM_DATA_SOURCE" ),
new System.Data.Common.DataColumnMapping( "SOURCE_SYS_PARTY_NAME",
"SOURCE_SYS_PARTY_NAME" ),
new System.Data.Common.DataColumnMapping( "CRM_CREDIT_GROUP_NAME",
"CRM_CREDIT_GROUP_NAME" ),
new System.Data.Common.DataColumnMapping( "RU_NAME", "RU_NAME" ),
new System.Data.Common.DataColumnMapping( "PARTY_LEGAL_NAME",
"PARTY_LEGAL_NAME" ),
new System.Data.Common.DataColumnMapping( "PARTY_CUSIP",
"PARTY_CUSIP" ),
new System.Data.Common.DataColumnMapping( "PARTY_ISIN", "PARTY_ISIN" ),
new System.Data.Common.DataColumnMapping( "PARTY_SEDOL",
"PARTY_SEDOL" )
} )
} );
this.daPARTY_CREDIT_GROUP_MAP.UpdateCommand =
this.PARTY_CREDIT_GROUP_MAPUpdate;
//
// PARTY_CREDIT_GROUP_MAPSelect
//
this.PARTY_CREDIT_GROUP_MAPSelect.CommandText =
"SELECT pssi.SOURCE_SYSTEM_DATA_SOURCE, CASE WHEN rpu.RU_NAME IS NULL
THEN pssi.SOURCE_SYSTEM_DATA_SOURCE ELSE rpu.RU_NAME END AS RU_NAME, " +
"pssi.SOURCE_SYS_PARTY_NAME, p.PARTY_LEGAL_NAME, p.PARTY_CUSIP,
p.PARTY_ISIN, p.PARTY_SEDOL, cgr.CRM_CREDIT_GROUP_NAME, pcgm.GDR_PARTY_ID, " +
"pcgm.CRM_CREDIT_GROUP_ID, pcgm.CRM_CRED_GRP_APPROVAL_STATUS,
pcgm.CRM_CRED_GRP_APPROVAL_DATE, pcgm.CRM_CRED_GRP_APPROVER, pcgm.UPD_USER, "
+
"pcgm.UPD_TIMESTAMP " +
"FROM (((GDR_DATA.PARTY_CREDIT_GROUP_MAP pcgm INNER JOIN
GDR_DATA.PARTY_SOURCE_SYSTEM_INFO pssi ON pcgm.GDR_PARTY_ID =
pssi.GDR_PARTY_ID) " +
"INNER JOIN GDR_DATA.CRM_CREDIT_GROUP_REF cgr ON
pcgm.CRM_CREDIT_GROUP_ID = cgr.CRM_CREDIT_GROUP_ID) " +
"LEFT JOIN GDR_DATA.PARTY p ON pcgm.GDR_PARTY_ID = p.GDR_PARTY_ID) " +
"LEFT JOIN GXPSTG.RPU_REF rpu ON pssi.SOURCE_SYSTEM_DATA_SOURCE =
rpu.RU_ID " +
"WHERE UPPER( pssi.SOURCE_SYS_PARTY_NAME ) LIKE UPPER( :SEARCH_PATTERN )
ESCAPE '!'";
this.PARTY_CREDIT_GROUP_MAPSelect.Connection = this._conn;
this.PARTY_CREDIT_GROUP_MAPSelect.Parameters.Add( new
System.Data.OracleClient.OracleParameter( ":SEARCH_PATTERN",
System.Data.OracleClient.OracleType.VarChar, 255, "SEARCH_PATTERN" ) );
//
// PARTY_CREDIT_GROUP_MAPUpdate
//
this.PARTY_CREDIT_GROUP_MAPUpdate.CommandText = @"UPDATE
GDR_DATA.PARTY_CREDIT_GROUP_MAP SET CRM_CREDIT_GROUP_ID =
:CRM_CREDIT_GROUP_ID, CRM_CRED_GRP_APPROVAL_STATUS =
:CRM_CRED_GRP_APPROVAL_STATUS, CRM_CRED_GRP_APPROVAL_DATE =
:CRM_CRED_GRP_APPROVAL_DATE, CRM_CRED_GRP_APPROVER = :CRM_CRED_GRP_APPROVER,
UPD_USER = :UPD_USER, UPD_TIMESTAMP = :UPD_TIMESTAMP WHERE (GDR_PARTY_ID =
:Original_GDR_PARTY_ID)";
this.PARTY_CREDIT_GROUP_MAPUpdate.Connection = this._conn;
this.PARTY_CREDIT_GROUP_MAPUpdate.Parameters.Add( new
System.Data.OracleClient.OracleParameter( ":CRM_CREDIT_GROUP_ID",
System.Data.OracleClient.OracleType.Number, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(38)),
((System.Byte)(0)), "CRM_CREDIT_GROUP_ID",
System.Data.DataRowVersion.Current, null ) );
this.PARTY_CREDIT_GROUP_MAPUpdate.Parameters.Add( new
System.Data.OracleClient.OracleParameter( ":CRM_CRED_GRP_APPROVAL_STATUS",
System.Data.OracleClient.OracleType.VarChar, 20,
"CRM_CRED_GRP_APPROVAL_STATUS" ) );
this.PARTY_CREDIT_GROUP_MAPUpdate.Parameters.Add( new
System.Data.OracleClient.OracleParameter( ":CRM_CRED_GRP_APPROVAL_DATE",
System.Data.OracleClient.OracleType.DateTime, 0, "CRM_CRED_GRP_APPROVAL_DATE"
) );
this.PARTY_CREDIT_GROUP_MAPUpdate.Parameters.Add( new
System.Data.OracleClient.OracleParameter( ":CRM_CRED_GRP_APPROVER",
System.Data.OracleClient.OracleType.VarChar, 255, "CRM_CRED_GRP_APPROVER" ) );
this.PARTY_CREDIT_GROUP_MAPUpdate.Parameters.Add( new
System.Data.OracleClient.OracleParameter( ":UPD_USER",
System.Data.OracleClient.OracleType.VarChar, 20, "UPD_USER" ) );
this.PARTY_CREDIT_GROUP_MAPUpdate.Parameters.Add( new
System.Data.OracleClient.OracleParameter( ":UPD_TIMESTAMP",
System.Data.OracleClient.OracleType.DateTime, 0, "UPD_TIMESTAMP" ) );
this.PARTY_CREDIT_GROUP_MAPUpdate.Parameters.Add( new
System.Data.OracleClient.OracleParameter( ":Original_GDR_PARTY_ID",
System.Data.OracleClient.OracleType.VarChar, 20,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "GDR_PARTY_ID", System.Data.DataRowVersion.Original, null
) );
--
Thanks,
Steven Perry