0

我正在尝试制作一个需要从用户帐户中删除许可证的程序。API 用于提取用户帐户和许可。删除许可和限制后,将创建一个事件以确认删除。现在它没有给我任何输出。

String User;
String License;
List<String> Permit;
public RemovePermit(String User, String license, List<String> Permit)
{
    this.User = user;
    this.License = license;
    this.Permit = Permit;
}

public void Run()
{
    List<PPermitGroups> permitGroupAdd = new List<PPermitGroups>();
    using (var apiUser = new ApiUser())
    {
        var user = apiGetPerson(User);
        var userPermit = apiGetPermitGroup(user.ID);
        String license = License;
        var deletePermitResult = userPermit.Where(x => Permit.Any(l => x.PermitGroup.Equals(l)|(!String.IsNullOrEmpty(x.Company)&& x.Company.Equals(l))));

        foreach (PPermitGroups p in deletePermitResult)
        {
            apiDeletePermitAndRestrictions(p);

            if(p.PermitGroupType == PPermitGroupsPermitGroupTypeEnum.ApplicationPermit)
            if (p.LicenseType.Equals("Not Fixed") || p.LicenseType.Equals("Fixed"))
                if (p.PermitGroup.StartsWith("Framework") || p.PermitGroup.StartsWith("Release"))
                {
                   var temp =  new UserEvent
                   EventType= " Delete"
                    License= ""
                    Permit = ""
            }
          api.CreateEvent(temp)
4

0 回答 0