Пример #1
0
        private void tsmiGroupPermission_Click(object sender, EventArgs e)
        {
            int iPosition = bdsGroup.Find("Member_ID", tvGroup.SelectedNode.Name);

            if (iPosition > 0)
            {
                bdsGroup.Position = iPosition;
            }
            else
            {
                return;
            }

            drGroup = ((DataRowView)bdsGroup.Current).Row;

            frmPermission frmPermission = new frmPermission();

            frmPermission.MdiParent = this.MdiParent;
            frmPermission.Load(Convert.ToString(drGroup["Member_ID"]), "GROUP");
        }
Пример #2
0
        private void cmsUserPermission_Click(object sender, EventArgs e)
        {
            if ((bdsUser.Position < 0))
            {
                return;
            }

            lvUser.MoveDataSourceToCurrentRow();

            drUser = ((DataRowView)bdsUser.Current).Row;

            if ((bool)drUser["Is_Admin"])
            {
                string strMsg = Element.sysLanguage == enuLanguageType.English ? "Can not set permission for admin" : "Không cấp quyền cho người quản trị";
                EpointMessage.MsgOk(strMsg);
                return;
            }

            frmPermission frmPermission = new frmPermission();

            frmPermission.MdiParent = this.MdiParent;
            frmPermission.Load((string)drUser["Member_ID"], "USER");
        }