private void btnUpdate_Click(object sender, EventArgs e)
        {
            if (validatePropertyData())
            {
                ControlProperty controlProperty = new ControlProperty();
                controlProperty.Name               = txtPropertyName.Text;
                controlProperty.DisplayNameKey     = txtDisplayNameKey.Text;
                controlProperty.DescriptionNameKey = txtDescriptionKey.Text;
                controlProperty.Usage              = (Enum.UsageType)ddUsage.SelectedItem;
                controlProperty.IsRequired         = chkRequired.Checked;
                controlProperty.IsUsingTypeGroup   = chkUseTypeGroup.Checked;
                controlProperty.TypeOrTypeGroup    = ddOfType.SelectedValue.ToString();

                ControlManifestHelper manifestHelper = new ControlManifestHelper();

                if (newProperty)
                {
                    manifestHelper.CreateNewProperty(manifestDetails, controlProperty);
                    Routine_EditControl();
                }
                else
                {
                    manifestDetails = manifestHelper.UpdatePropertyDetails(persistedPropertyName, manifestDetails, controlProperty);
                }

                persistedPropertyName = controlProperty.Name;
                ParentControl.RefreshControlManifestDetails();
            }
            else
            {
                MessageBox.Show("The property entry is invalid. Please populate all required fields.", "Invalid Propert State", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            ControlManifestHelper manifestHelper = new ControlManifestHelper();

            if (newType)
            {
                manifestHelper.AddNewTypeInTypeGroup(manifestDetails, lblParent.Text, ddType.SelectedValue.ToString());
            }
            else
            {
                manifestHelper.UpdateTypeInTypeGroup(lblParent.Text, persistedTypeName, ddType.SelectedValue.ToString(), manifestDetails);
            }

            persistedTypeName = ddType.SelectedValue.ToString();
            ParentControl.RefreshControlManifestDetails();
        }
示例#3
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            ControlManifestHelper manifestHelper = new ControlManifestHelper();

            if (newTypeGroup)
            {
                manifestHelper.CreateNewTypeGroup(manifestDetails, txtTypeGroupName.Text, ddType.SelectedValue.ToString());
                Routine_EditControl();
            }
            else
            {
                manifestHelper.UpdateTypeGroupName(persistedTypeGroupName, txtTypeGroupName.Text, manifestDetails);
            }

            persistedTypeGroupName = txtTypeGroupName.Text;
            ParentControl.RefreshControlManifestDetails();
        }