Beispiel #1
0
        private void AddAuth()
        {
            int aid;

            if (CAuth == null)
            {
                aid = 0;
            }
            else
            {
                aid = cb_top.Checked ? 0 : CAuth.id;
            }

            Authority auth = GetEditAuth(aid);
            int       id   = authorityService.AddAuthority(auth);

            if (id != 0)
            {
                auth.id = id;
                authorities.Add(auth);
                ShowTreeView();
                ShowTipsMessageBox("添加成功");
            }
        }