Example #1
0
        public APIReturn Get_item(uint?Id)
        {
            RolesInfo item = Roles.GetItem(Id);

            if (item == null)
            {
                return(new APIReturn(98, "记录不存在,或者没有权限"));
            }
            return(new APIReturn(0, "成功", "item", item.ToBson()));
        }
Example #2
0
        public APIReturn Post_insert([FromForm] string Name, [FromForm] ulong[] mn_Users)
        {
            RolesInfo item = new RolesInfo();

            item.Name = Name;
            item      = Roles.Insert(item);
            //关联 Users
            foreach (ulong mn_Users_in in mn_Users)
            {
                item.FlagUsers(mn_Users_in);
            }
            return(new APIReturn(0, "成功", "item", item.ToBson()));
        }