Example #1
0
        /// <summary>
        /// Handles the LinkClicked event of the lnkAddGroup control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
        private void lnkAddGroup_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            frmContactGroup groupForm = new frmContactGroup();

            if (groupForm.ShowDialog(this) == DialogResult.OK)
            {
                RefreshView();
            }
        }
Example #2
0
        /// <summary>
        /// Edits the group.
        /// </summary>
        private void EditGroup()
        {
            Role selectedRole = lvwGroups.SelectedObject as Role;

            if (selectedRole == null)
            {
                return;
            }

            //if (selectedRole.Name.Equals(GuiHelper.AdministratorGroupName, StringComparison.OrdinalIgnoreCase))
            //{
            //    FormHelper.ShowInfo(Resources.MsgGroupNameCannotEdit);
            //    return;
            //}

            frmContactGroup groupForm = new frmContactGroup();

            groupForm.Group = selectedRole;
            if (groupForm.ShowDialog(this) == DialogResult.OK)
            {
                RefreshView();
            }
        }
        /// <summary>
        /// Edits the group.
        /// </summary>
        private void EditGroup()
        {
            Role selectedRole = lvwGroups.SelectedObject as Role;
            if (selectedRole == null) return;

            //if (selectedRole.Name.Equals(GuiHelper.AdministratorGroupName, StringComparison.OrdinalIgnoreCase))
            //{
            //    FormHelper.ShowInfo(Resources.MsgGroupNameCannotEdit);
            //    return;
            //}

            frmContactGroup groupForm = new frmContactGroup();
            groupForm.Group = selectedRole;
            if (groupForm.ShowDialog(this) == DialogResult.OK)
            {
                RefreshView();
            }
        }
 /// <summary>
 /// Handles the LinkClicked event of the lnkAddGroup control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
 private void lnkAddGroup_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     frmContactGroup groupForm = new frmContactGroup();
     if (groupForm.ShowDialog(this) == DialogResult.OK)
     {
         RefreshView();
     }
 }