예제 #1
0
        protected void AddAccessGroupButton_Click(object sender, EventArgs e)
        {
            using (SecurityDBEntities db = new SecurityDBEntities())
            {
                AccessGroups newAccessGroup = new AccessGroups();
                newAccessGroup.NAME        = AccessGroupNameTextBox.Text;
                newAccessGroup.LABEL       = AccessGroupLabelTextBox.Text;
                newAccessGroup.DESCRIPTION = AccessGroupDescriptionTextBox.Text;

                db.AddToAccessGroups(newAccessGroup);
                db.SaveChanges();
            }

            AccessGroupsGridView.DataBind();
        }