Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetAllEntities and Saving Changes at one time
Message
De
17/12/2007 13:49:07
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
GetAllEntities and Saving Changes at one time
Divers
Thread ID:
01276286
Message ID:
01276286
Vues:
69
Hi there,

I have a business object that retrives information using Businessobject.GetAllEntities. I want to make changes to the list retrived and update the database at the sametime. The following piece of code doesnt work for me.
  Private Function Save() As Boolean

        Me.oOSPBusinessRules.GetAllEntities()

        Me.oOSPBusinessRules.Entity.SettingName = "DisplayCCSiteTermsToCustomerUponCheckout"
        Me.oOSPBusinessRules.Entity.SettingValue = IIf(Me.DisplayCCSiteTermsToCustomerUponCheckoutCheckBox.Checked, 1, 0)


        Me.oOSPBusinessRules.Entity.SettingName = "DisplayeCheckSiteTermsToCustomerUponCheckout"
        Me.oOSPBusinessRules.Entity.SettingValue = IIf(Me.DisplayeCheckSiteTermsToCustomerUponCheckout.Checked, 1, 0)

        Me.oOSPBusinessRules.Entity.SettingName = "StudentProfileRules.ValidateStudentInformation"
        Me.oOSPBusinessRules.Entity.SettingValue = IIf(Me.DisplayStudentProfileRulesValidateStudentInformationCheckBox.Checked, 1, 0)

        Me.oOSPBusinessRules.Entity.SettingName = "DisplayeCheckSiteTermsToCustomerUponCheckout"
        Me.oOSPBusinessRules.Entity.SettingValue = IIf(Me.DisplayeCheckSiteTermsToCustomerUponCheckout.Checked, 1, 0)

        Me.oOSPBusinessRules.Entity.SettingName = "OSPProductBV.SendEmail"
        Me.oOSPBusinessRules.Entity.SettingValue = IIf(Me.DisplayStudentProfileRulesOSPProductBVSendEmailCheckBox.Checked, 1, 0)

        Dim Result As OakLeaf.MM.Main.Business.mmSaveDataResult = Me.oOSPBusinessRules.SaveEntityList()
        If Result = OakLeaf.MM.Main.Business.mmSaveDataResult.RulesBroken Then
            Dim BrokenRules As String = oOSPBusinessRules.Rules.GetAllBrokenRules()
            MessageBox1.ShowError(BrokenRules)
            Return False
        Else
            Return True
        End If

    End Function
Thanks
Yassin
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform