Ejemplo n.º 1
0
        private void cmdAdd_Click(object sender, System.EventArgs e)
        {
            int       sectionID = GetSectionID();
            bool      switchu   = chkSwitch.Checked;
            ArrayList users     = GetSelectedUsers(lstAllUsers);

            lblMemError.Visible = false;
            Sections sectionda = new Sections(Globals.CurrentIdentity);

            try {
                foreach (string user in users)
                {
                    sectionda.AddUser(sectionID, user, switchu);
                }
            } catch (DataAccessException er) {
                lblMemError.Text    = er.Message;
                lblMemError.Visible = true;
            }

            BindData();
            if (Refresh != null)
            {
                Refresh(this, new RefreshEventArgs());
            }
        }