Пример #1
0
        void page_SetCustomProperties(object sender, CustomPropertiesEventArgs args)
        {
            this.ClearErrors();

            try
            {
                this.DesigntimeComponent.SetComponentProperty("ContainerID", args.ContainerID);
                this.DesigntimeComponent.SetComponentProperty("EntityKind", args.EntityKind);
                this.DesigntimeComponent.SetComponentProperty("CreateNewID", args.CreateNewID);
                this.DesigntimeComponent.SetComponentProperty("IDColumn", args.IDColumn);
            }
            catch (Exception ex)
            {
                this.ReportErrors(ex);
            }
        }
Пример #2
0
        void page_GetCustomProperties(object sender, CustomPropertiesEventArgs args)
        {
            this.ClearErrors();

            try
            {
                args.ContainerID = (string)GetCustomPropertyValue("ContainerID", this.ComponentMetadata.CustomPropertyCollection);
                args.EntityKind  = (string)GetCustomPropertyValue("EntityKind", this.ComponentMetadata.CustomPropertyCollection);
                args.CreateNewID = (bool)GetCustomPropertyValue("CreateNewID", this.ComponentMetadata.CustomPropertyCollection);
                args.IDColumn    = (string)GetCustomPropertyValue("IDColumn", this.ComponentMetadata.CustomPropertyCollection);
            }
            catch (Exception ex)
            {
                this.ReportErrors(ex);
            }
        }
Пример #3
0
        private void SaveCustomProperties()
        {
            if (this.isLoading)
            {
                return;
            }

            if (this.SetCustomProperties != null)
            {
                CustomPropertiesEventArgs args = new CustomPropertiesEventArgs();
                args.ContainerID = this.ContainerId;
                args.EntityKind  = this.EntityKind;
                args.CreateNewID = this.IsCreateNewId;
                args.IDColumn    = this.IdColumn;

                this.SetCustomProperties(this, args);
            }
        }
Пример #4
0
        private void LoadCustomProperties()
        {
            if (this.GetCustomProperties != null)
            {
                CustomPropertiesEventArgs args = new CustomPropertiesEventArgs();
                this.GetCustomProperties(this, args);

                this.ContainerId = args.ContainerID;
                this.EntityKind  = args.EntityKind;
                if (!args.CreateNewID)
                {
                    this.rdoCreateNewID.Checked   = false;
                    this.rdoUseExistingID.Checked = true;
                    this.txtIDColumn.Text         = args.IDColumn;
                }
                else
                {
                    this.rdoCreateNewID.Checked   = true;
                    this.rdoUseExistingID.Checked = false;
                }
            }
        }
Пример #5
0
        void page_SetCustomProperties(object sender, CustomPropertiesEventArgs args)
        {
            this.ClearErrors();

            try
            {
                this.DesigntimeComponent.SetComponentProperty("ContainerID", args.ContainerID);
                this.DesigntimeComponent.SetComponentProperty("EntityKind", args.EntityKind);
                this.DesigntimeComponent.SetComponentProperty("CreateNewID", args.CreateNewID);
                this.DesigntimeComponent.SetComponentProperty("IDColumn", args.IDColumn);
            }
            catch (Exception ex)
            {
                this.ReportErrors(ex);
            }
        }
Пример #6
0
        void page_GetCustomProperties(object sender, CustomPropertiesEventArgs args)
        {
            this.ClearErrors();

            try
            {
                args.ContainerID = (string)GetCustomPropertyValue("ContainerID", this.ComponentMetadata.CustomPropertyCollection);
                args.EntityKind = (string)GetCustomPropertyValue("EntityKind", this.ComponentMetadata.CustomPropertyCollection);
                args.CreateNewID = (bool)GetCustomPropertyValue("CreateNewID", this.ComponentMetadata.CustomPropertyCollection);
                args.IDColumn = (string)GetCustomPropertyValue("IDColumn", this.ComponentMetadata.CustomPropertyCollection);
            }
            catch (Exception ex)
            {
                this.ReportErrors(ex);
            }
        }
Пример #7
0
        private void SaveCustomProperties()
        {
            if (this.isLoading)
            {
                return ;
            }

            if (this.SetCustomProperties != null)
            {
                CustomPropertiesEventArgs args = new CustomPropertiesEventArgs();
                args.ContainerID = this.ContainerId;
                args.EntityKind = this.EntityKind;
                args.CreateNewID = this.IsCreateNewId;
                args.IDColumn = this.IdColumn;

                this.SetCustomProperties(this, args);
            }
        }
Пример #8
0
 private void LoadCustomProperties()
 {
     if (this.GetCustomProperties != null)
     {
         CustomPropertiesEventArgs args = new CustomPropertiesEventArgs();
         this.GetCustomProperties(this, args);
         
         this.ContainerId = args.ContainerID;
         this.EntityKind = args.EntityKind;
         if (!args.CreateNewID)
         {
             this.rdoCreateNewID.Checked = false;
             this.rdoUseExistingID.Checked = true;
             this.txtIDColumn.Text = args.IDColumn;
         }
         else 
         {
             this.rdoCreateNewID.Checked = true;
             this.rdoUseExistingID.Checked = false;
         }
     }
 }