コード例 #1
0
ファイル: TestController.cs プロジェクト: string17/Dolphin2.0
        public bool InsertRoleMenu(RoleMenuObj param)
        {
            var clients = new RoleMenu();

            clients.Itemid   = param.ItemId;
            clients.Roleid   = param.RoleId;
            clients.Menudesc = param.MenuDesc;
            bool success = _role.InsertRoleMenu(clients);

            if (success)
            {
                Log.InfoFormat(param.Computername, param.SystemIp, param.UserName, Constants.ActionType.AssignRoleMenu.ToString());
                _audit.InsertAudit(param.UserName, Constants.ActionType.AssignRoleMenu.ToString(), "Assign MenuRole", DateTime.Now, param.Computername, param.SystemIp);
                return(true);
            }
            else
            {
                Log.InfoFormat(param.Computername, param.SystemIp, param.UserName, Constants.ActionType.AssignRoleMenu.ToString());
                return(false);
            }
        }