Esempio n. 1
0
		private void userControlSecurityTabs_EditUserGroupClick(object sender,SecurityEventArgs e) {
			FormUserGroupEdit FormU = new FormUserGroupEdit(e.Group);
			FormU.ShowDialog();
			if(FormU.DialogResult == DialogResult.OK) {
				userControlSecurityTabs.FillListUserGroupTabUserGroups();
			}
		}
Esempio n. 2
0
		private void userControlSecurityTabs_AddUserGroupClick(object sender,SecurityEventArgs e) {
			UserGroup group = new UserGroup();
			FormUserGroupEdit FormU = new FormUserGroupEdit(group);
			FormU.IsNew=true;
			FormU.ShowDialog();
			if(FormU.DialogResult == DialogResult.OK) {
				userControlSecurityTabs.FillListUserGroupTabUserGroups();//update to reflect changes that were made in FormUserGroupEdit.
				userControlSecurityTabs.SelectedUserGroup=group;
			}
		}
Esempio n. 3
0
 private void butAddGroup_Click(object sender,EventArgs e)
 {
     UserGroup group=new UserGroup();
     FormUserGroupEdit FormU=new FormUserGroupEdit(group);
     FormU.IsNew=true;
     FormU.ShowDialog();
     if(FormU.DialogResult==DialogResult.Cancel) {
         return;
     }
     FillList();
 }
Esempio n. 4
0
 private void treeUsers_DoubleClick(object sender, System.EventArgs e)
 {
     if (treeUsers.SelectedNode == null)
     {
         return;
     }
     treeUsers.ExpandAll();
     if (treeUsers.SelectedNode.Parent == null)          //group
     {
         UserGroup         group = UserGroups.List[treeUsers.SelectedNode.Index];
         FormUserGroupEdit FormU = new FormUserGroupEdit(group);
         FormU.ShowDialog();
         if (FormU.DialogResult == DialogResult.Cancel)
         {
             return;
         }
         FillTreeUsers();
         //reselect group
         for (int i = 0; i < treeUsers.Nodes.Count; i++)
         {
             if ((int)treeUsers.Nodes[i].Tag == group.UserGroupNum)
             {
                 treeUsers.SelectedNode = treeUsers.Nodes[i];
                 SelectedGroupNum       = group.UserGroupNum;
             }
         }
     }
     else             //user
     {
         Userod       user  = UserodB.GetUser((int)treeUsers.SelectedNode.Tag);
         FormUserEdit FormU = new FormUserEdit(user);
         FormU.ShowDialog();
         if (FormU.DialogResult == DialogResult.Cancel)
         {
             return;
         }
         FillTreeUsers();
         for (int i = 0; i < treeUsers.Nodes.Count; i++)
         {
             for (int j = 0; j < treeUsers.Nodes[i].Nodes.Count; j++)
             {
                 if ((int)treeUsers.Nodes[i].Nodes[j].Tag == FormU.UserCur.UserNum)
                 {
                     treeUsers.SelectedNode = treeUsers.Nodes[i].Nodes[j];
                     SelectedGroupNum       = FormU.UserCur.UserGroupNum;
                 }
             }
         }
     }
     FillTreePerm();
     changed = true;
 }
Esempio n. 5
0
        private void butAddGroup_Click(object sender, EventArgs e)
        {
            UserGroup         group = new UserGroup();
            FormUserGroupEdit FormU = new FormUserGroupEdit(group);

            FormU.IsNew = true;
            FormU.ShowDialog();
            if (FormU.DialogResult == DialogResult.Cancel)
            {
                return;
            }
            FillList();
        }
Esempio n. 6
0
        private void butAddGroup_Click(object sender, System.EventArgs e)
        {
            UserGroup         group = new UserGroup();
            FormUserGroupEdit FormU = new FormUserGroupEdit(group);

            FormU.IsNew = true;
            FormU.ShowDialog();
            if (FormU.DialogResult == DialogResult.Cancel)
            {
                return;
            }
            FillTreeUsers();
            FillTreePerm();
            changed = true;
        }
Esempio n. 7
0
        private void listGroups_DoubleClick(object sender, EventArgs e)
        {
            if (listGroups.SelectedIndex == -1)
            {
                return;
            }
            UserGroup         group = UserGroups.List[listGroups.SelectedIndex];
            FormUserGroupEdit FormU = new FormUserGroupEdit(group);

            FormU.ShowDialog();
            if (FormU.DialogResult == DialogResult.Cancel)
            {
                return;
            }
            FillList();
            //reselect group

            /*for(int i=0;i<treeUsers.Nodes.Count;i++) {
             *      if((int)treeUsers.Nodes[i].Tag==group.UserGroupNum) {
             *              treeUsers.SelectedNode=treeUsers.Nodes[i];
             *              SelectedGroupNum=group.UserGroupNum;
             *      }
             * }*/
        }
Esempio n. 8
0
		private void listGroups_DoubleClick(object sender,EventArgs e) {
			if(listGroups.SelectedIndex==-1) {
				return;
			}
			UserGroup group=UserGroups.List[listGroups.SelectedIndex];
			FormUserGroupEdit FormU=new FormUserGroupEdit(group);
			FormU.ShowDialog();
			if(FormU.DialogResult==DialogResult.Cancel) {
				return;
			}
			FillList();
			//reselect group
			/*for(int i=0;i<treeUsers.Nodes.Count;i++) {
				if((int)treeUsers.Nodes[i].Tag==group.UserGroupNum) {
					treeUsers.SelectedNode=treeUsers.Nodes[i];
					SelectedGroupNum=group.UserGroupNum;
				}
			}*/
		}