protected void addTitleIdentifierButton_Click(object sender, EventArgs e)
        {
            //int titleAssociationId = (int)Session["TitleAssociation"];
            int titleAssociationId = Convert.ToInt32(hidTitleAssociationID.Value);
            TitleAssociation association = this.FindTitleAssociation(titleAssociationId);

            TitleAssociation_TitleIdentifier ti = new TitleAssociation_TitleIdentifier();
            ti.TitleAssociationID = association.TitleAssociationID;
            association.TitleAssociationIdentifiers.Add(ti);
            identifiersList.EditIndex = identifiersList.Rows.Count;
            bindTitleIdentifierData();
        }
 /// <summary>
 /// Update values in TitleAssociation_TitleIdentifier. Returns an object of type TitleAssociation_TitleIdentifier.
 /// </summary>
 /// <param name="sqlConnection">Sql connection or null.</param>
 /// <param name="sqlTransaction">Sql transaction or null.</param>
 /// <param name="connectionKeyName">Connection key name located in config file.</param>
 /// <param name="value">Object of type TitleAssociation_TitleIdentifier.</param>
 /// <returns>Object of type TitleAssociation_TitleIdentifier.</returns>
 public TitleAssociation_TitleIdentifier TitleAssociation_TitleIdentifierUpdateAuto(
     SqlConnection sqlConnection,
     SqlTransaction sqlTransaction,
     string connectionKeyName,
     TitleAssociation_TitleIdentifier value)
 {
     return TitleAssociation_TitleIdentifierUpdateAuto(sqlConnection, sqlTransaction, connectionKeyName,
         value.TitleAssociation_TitleIdentifierID,
         value.TitleAssociationID,
         value.TitleIdentifierID,
         value.IdentifierValue);
 }
        /// <summary>
        /// Manage TitleAssociation_TitleIdentifier object.
        /// If the object is of type CustomObjectBase, 
        /// then either insert values into, delete values from, or update values in TitleAssociation_TitleIdentifier.
        /// </summary>
        /// <param name="sqlConnection">Sql connection or null.</param>
        /// <param name="sqlTransaction">Sql transaction or null.</param>
        /// <param name="connectionKeyName">Connection key name located in config file.</param>
        /// <param name="value">Object of type TitleAssociation_TitleIdentifier.</param>
        /// <returns>Object of type CustomDataAccessStatus<TitleAssociation_TitleIdentifier>.</returns>
        public CustomDataAccessStatus<TitleAssociation_TitleIdentifier> TitleAssociation_TitleIdentifierManageAuto(
            SqlConnection sqlConnection,
            SqlTransaction sqlTransaction,
            string connectionKeyName,
            TitleAssociation_TitleIdentifier value)
        {
            if (value.IsNew && !value.IsDeleted)
            {

                TitleAssociation_TitleIdentifier returnValue = TitleAssociation_TitleIdentifierInsertAuto(sqlConnection, sqlTransaction, connectionKeyName,
                    value.TitleAssociationID,
                        value.TitleIdentifierID,
                        value.IdentifierValue);

                return new CustomDataAccessStatus<TitleAssociation_TitleIdentifier>(
                    CustomDataAccessContext.Insert,
                    true, returnValue);
            }
            else if (!value.IsNew && value.IsDeleted)
            {
                if (TitleAssociation_TitleIdentifierDeleteAuto(sqlConnection, sqlTransaction, connectionKeyName,
                    value.TitleAssociation_TitleIdentifierID))
                {
                return new CustomDataAccessStatus<TitleAssociation_TitleIdentifier>(
                    CustomDataAccessContext.Delete,
                    true, value);
                }
                else
                {
                return new CustomDataAccessStatus<TitleAssociation_TitleIdentifier>(
                    CustomDataAccessContext.Delete,
                    false, value);
                }
            }
            else if (value.IsDirty && !value.IsDeleted)
            {

                TitleAssociation_TitleIdentifier returnValue = TitleAssociation_TitleIdentifierUpdateAuto(sqlConnection, sqlTransaction, connectionKeyName,
                    value.TitleAssociation_TitleIdentifierID,
                        value.TitleAssociationID,
                        value.TitleIdentifierID,
                        value.IdentifierValue);

                return new CustomDataAccessStatus<TitleAssociation_TitleIdentifier>(
                    CustomDataAccessContext.Update,
                    true, returnValue);
            }
            else
            {
                return new CustomDataAccessStatus<TitleAssociation_TitleIdentifier>(
                    CustomDataAccessContext.NA,
                    false, value);
            }
        }
 /// <summary>
 /// Update values in TitleAssociation_TitleIdentifier. Returns an object of type TitleAssociation_TitleIdentifier.
 /// </summary>
 /// <param name="sqlConnection">Sql connection or null.</param>
 /// <param name="sqlTransaction">Sql transaction or null.</param>
 /// <param name="value">Object of type TitleAssociation_TitleIdentifier.</param>
 /// <returns>Object of type TitleAssociation_TitleIdentifier.</returns>
 public TitleAssociation_TitleIdentifier TitleAssociation_TitleIdentifierUpdateAuto(
     SqlConnection sqlConnection,
     SqlTransaction sqlTransaction,
     TitleAssociation_TitleIdentifier value)
 {
     return TitleAssociation_TitleIdentifierUpdateAuto(sqlConnection, sqlTransaction, "BHL", value );
 }
 /// <summary>
 /// Manage TitleAssociation_TitleIdentifier object.
 /// If the object is of type CustomObjectBase, 
 /// then either insert values into, delete values from, or update values in TitleAssociation_TitleIdentifier.
 /// </summary>
 /// <param name="sqlConnection">Sql connection or null.</param>
 /// <param name="sqlTransaction">Sql transaction or null.</param>
 /// <param name="value">Object of type TitleAssociation_TitleIdentifier.</param>
 /// <returns>Object of type CustomDataAccessStatus<TitleAssociation_TitleIdentifier>.</returns>
 public CustomDataAccessStatus<TitleAssociation_TitleIdentifier> TitleAssociation_TitleIdentifierManageAuto(
     SqlConnection sqlConnection,
     SqlTransaction sqlTransaction,
     TitleAssociation_TitleIdentifier value)
 {
     return TitleAssociation_TitleIdentifierManageAuto( sqlConnection, sqlTransaction, "BHL", value  );
 }