Example #1
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Centralised Event that is raised whenever a check box is changed.
 /// </summary>
 /// <history>
 ///     [cnurse]	02/17/2006	created
 /// </history>
 /// -----------------------------------------------------------------------------
 private void OnItemCheckedChanged(object sender, DNNDataGridCheckChangedEventArgs e)
 {
     if (ItemCheckedChanged != null)
     {
         ItemCheckedChanged(sender, e);
     }
 }
Example #2
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Centralised Event that is raised whenever a check box is changed.
 /// </summary>
 /// <history>
 ///     [cnurse]	02/17/2006	created
 /// </history>
 /// -----------------------------------------------------------------------------
 private void OnItemCheckedChanged(object sender, DNNDataGridCheckChangedEventArgs e)
 {
     if (ItemCheckedChanged != null)
     {
         ItemCheckedChanged(sender, e);
     }
 }
Example #3
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Centralised Event that is raised whenever a check box is changed.
 /// </summary>
 /// <history>
 ///     [cnurse]	02/16/2006	created
 /// </history>
 /// -----------------------------------------------------------------------------
 private void OnCheckedChanged(object sender, DNNDataGridCheckChangedEventArgs e)
 {
     //Add the column to the Event Args
     e.Column = this;
     if (CheckedChanged != null)
     {
         CheckedChanged(sender, e);
     }
 }
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Centralised Event that is raised whenever a check box's state is modified
        /// </summary>
        /// <history>
        ///     [cnurse]	02/14/2006	created
        /// </history>
        /// -----------------------------------------------------------------------------
        private void OnCheckChanged(object sender, EventArgs e)
        {
            var box       = (CheckBox)sender;
            var container = (DataGridItem)box.NamingContainer;
            DNNDataGridCheckChangedEventArgs evntArgs;

            if (container.ItemIndex == Null.NullInteger)
            {
                evntArgs = new DNNDataGridCheckChangedEventArgs(container, box.Checked, DataField, true);
            }
            else
            {
                evntArgs = new DNNDataGridCheckChangedEventArgs(container, box.Checked, DataField, false);
            }
            if (CheckedChanged != null)
            {
                CheckedChanged(sender, evntArgs);
            }
        }
        protected void OnDashboardControlsItemChecked(object sender, DNNDataGridCheckChangedEventArgs e)
        {
            var propertyName = e.Field;
            var propertyValue = e.Checked;
            var isAll = e.IsAll;
            var index = e.Item.ItemIndex;

            DashboardControl dashboardControl;

            if (isAll)
            {
                //Update All the properties
                foreach (DashboardControl dashboard in DashboardControlList)
                {
                    switch (propertyName)
                    {
                        case "IsEnabled":
                            dashboard.IsEnabled = propertyValue;
                            break;
                    }
                }
            }
            else
            {
                //Update the indexed property
                dashboardControl = DashboardControlList[index];
                switch (propertyName)
                {
                    case "IsEnabled":
                        dashboardControl.IsEnabled = propertyValue;
                        break;
                }
            }
            BindGrid();
        }
        /// <summary>
        /// grdProfileProperties_ItemCheckedChanged runs when a checkbox in the grid
        /// is clicked
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        /// 	[cnurse]	02/23/2006  Created
        /// </history>
        private void grdProfileProperties_ItemCheckedChanged( object sender, DNNDataGridCheckChangedEventArgs e )
        {
            string propertyName = e.Field;
            bool propertyValue = e.Checked;
            bool isAll = e.IsAll;
            int index = e.Item.ItemIndex;

            ProfilePropertyDefinitionCollection properties = GetProperties();
            ProfilePropertyDefinition profProperty;

            if( isAll )
            {
                //Update All the properties
                foreach( ProfilePropertyDefinition tempLoopVar_profProperty in properties )
                {
                    profProperty = tempLoopVar_profProperty;
                    switch( propertyName )
                    {
                        case "Required":

                            profProperty.Required = propertyValue;
                            break;
                        case "Visible":

                            profProperty.Visible = propertyValue;
                            break;
                    }
                }
            }
            else
            {
                //Update the indexed property
                profProperty = properties[index];
                switch( propertyName )
                {
                    case "Required":

                        profProperty.Required = propertyValue;
                        break;
                    case "Visible":

                        profProperty.Visible = propertyValue;
                        break;
                }
            }

            BindGrid();
        }
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// grdProfileProperties_ItemCheckedChanged runs when a checkbox in the grid
        /// is clicked
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        /// 	[cnurse]	02/23/2006  Created
        /// </history>
        /// -----------------------------------------------------------------------------
        private void grdProfileProperties_ItemCheckedChanged(object sender, DNNDataGridCheckChangedEventArgs e)
        {
            string propertyName = e.Field;
            bool propertyValue = e.Checked;

            if (e.IsAll)
            {
                //Update All the properties
                foreach (ProfilePropertyDefinition profProperty in ProfileProperties)
                {
                    switch (propertyName)
                    {
                        case "Required":
                            profProperty.Required = propertyValue;
                            break;
                        case "Visible":
                            profProperty.Visible = propertyValue;
                            break;
                    }
                }
            }
            else
            {
                //Update the indexed property
                ProfilePropertyDefinition profileProperty = ProfileProperties[e.Item.ItemIndex];
                switch (propertyName)
                {
                    case "Required":
                        profileProperty.Required = propertyValue;
                        break;
                    case "Visible":
                        profileProperty.Visible = propertyValue;
                        break;
                }
            }
            BindGrid();
        }
Example #8
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Centralised Event that is raised whenever a check box is changed.
 /// </summary>
 /// <history>
 ///     [cnurse]	02/16/2006	created
 /// </history>
 /// -----------------------------------------------------------------------------
 private void OnCheckedChanged(object sender, DNNDataGridCheckChangedEventArgs e)
 {
     //Add the column to the Event Args
     e.Column = this;
     if (CheckedChanged != null)
     {
         CheckedChanged(sender, e);
     }
 }
Example #9
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Centralised Event that is raised whenever a check box's state is modified
 /// </summary>
 /// <history>
 ///     [cnurse]	02/14/2006	created
 /// </history>
 /// -----------------------------------------------------------------------------
 private void OnCheckChanged(object sender, EventArgs e)
 {
     var box = (CheckBox) sender;
     var container = (DataGridItem) box.NamingContainer;
     DNNDataGridCheckChangedEventArgs evntArgs;
     if (container.ItemIndex == Null.NullInteger)
     {
         evntArgs = new DNNDataGridCheckChangedEventArgs(container, box.Checked, DataField, true);
     }
     else
     {
         evntArgs = new DNNDataGridCheckChangedEventArgs(container, box.Checked, DataField, false);
     }
     if (CheckedChanged != null)
     {
         CheckedChanged(sender, evntArgs);
     }
 }
        protected void grdLocationTypeAttributes_ItemCheckedChanged(object sender, DNNDataGridCheckChangedEventArgs e)
        {
            string propertyName = e.Field;
            bool propertyValue = e.Checked;
            bool isAll = e.IsAll;
            int index = e.Item.ItemIndex;

            AttributeDefinitionCollection attributes = GetAttributes();
            AttributeDefinition loctypeAttribute;

            if (isAll)
            {
                //Update All the attributes
                foreach (AttributeDefinition loctypeAttributeX in attributes)
                {
                    switch (propertyName)
                    {
                        case "Required":
                            loctypeAttributeX.Required = propertyValue;
                            break;
                        case "Visible":
                            loctypeAttributeX.Visible = propertyValue;
                            break;
                    }
                }
            }
            else
            {
                //Update the indexed property
                loctypeAttribute = attributes[index];
                switch (propertyName)
                {
                    case "Required":
                        loctypeAttribute.Required = propertyValue;
                        break;
                    case "Visible":
                        loctypeAttribute.Visible = propertyValue;
                        break;
                }
            }

            //BindGrid();
        }