Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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;
                }
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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;
         }
     }
 }