예제 #1
0
        public override bool Validate()
        {
            bool isValid = base.Validate();

            isValid &= FormGridManager.Validate();
            return(isValid);
        }
        private void SaveButton_Click(object sender, EventArgs e)
        {
            bool isValid = FormGridManager.Validate();

            if (isValid)
            {
                CurrentObject.SaveValues(false);
                Person person = (Person)CurrentObject.BusinessObject;
                person.SaveObject();
            }
        }
        private void ValidateButton_Click(object sender, EventArgs e)
        {
            MultiView.EnsureAllLazyLoadedViews();

            foreach (UserControl control in _dataEditControls)
            {
                FormGridManager formGridManager = control.FindControl("FormGridManager") as FormGridManager;
                if (formGridManager != null)
                {
                    formGridManager.PrepareValidation();
                    formGridManager.Validate();
                }
            }
        }
        private void SaveButton_Click(object sender, EventArgs e)
        {
            bool isValid = FormGridManager.Validate();

            if (isValid)
            {
                CurrentObject.SaveValues(false);
                Person person = (Person)CurrentObject.BusinessObject;
                person.SaveObject();
                if (person.Partner != null)
                {
                    person.Partner.SaveObject();
                }
            }
            XmlReflectionBusinessObjectStorageProvider.Current.Reset();
        }