protected override void OnInit(EventArgs e) { AddressEdit_Billing1.SetFormFieldValidationGroup(this.ValidationGroup); CreditCardEdit1.SetFormFieldValidationGroup(this.ValidationGroup); base.OnInit(e); chkUpdateCard.CheckedChanged += chkUpdateCard_CheckedChanged; btnSave.Click += base.SubmitButtonClick; AddressEdit_Billing1.ControlSaved += AddressEdit_Billing_ControlSaved; }
protected override void SaveForm() { hccUserProfile userProfile = hccUserProfile.GetById(this.PrimaryKeyIndex); if (userProfile != null) { // Save Address AddressEdit_Billing1.Save(); if (chkUpdateCard.Checked) { CreditCardEdit1.Save(); } } }
protected override void LoadForm() { hccUserProfile userProfile = hccUserProfile.GetById(this.PrimaryKeyIndex); //load address CreditCardEdit1.CurrentUserProfileID = this.PrimaryKeyIndex; if (userProfile != null && userProfile.BillingAddressID.HasValue && userProfile.BillingAddressID.Value > 0) { AddressEdit_Billing1.PrimaryKeyIndex = userProfile.BillingAddressID.Value; AddressEdit_Billing1.Bind(); chkUpdateCard.Enabled = true; } // load CardInfo CreditCardEdit1.CurrentUserProfileID = this.PrimaryKeyIndex; CreditCardEdit1.Bind(); }