public override bool CanEdit(DataRow dr) { atriumDB.EFileRow er = myA.FM.CurrentFile; bool isOwner = false; if (!er.IsNull("OwnerOfficeId") && er.OwnerOfficeId == myA.AtMng.WorkingAsOfficer.OfficeId) { isOwner = true; } //JLL sysadmin hack if (myA.AtMng.SecurityManager.CanExecute(0, atSecurity.SecurityManager.Features.SysAdmin) == atSecurity.SecurityManager.ExPermissions.Yes) { return(true); } if (!isOwner) { return(false); } else { return(myA.AtMng.SecurityManager.CanUpdate(er.FileId, atSecurity.SecurityManager.Features.OfficeAccount) != atSecurity.SecurityManager.LevelPermissions.No); } }
public override bool CanDelete(DataRow dr) { atriumDB.EFileRow er = myA.FM.CurrentFile; bool isOwner = false; if (!er.IsNull("OwnerOfficeId") && er.OwnerOfficeId == myA.AtMng.WorkingAsOfficer.OfficeId) { isOwner = true; } if (!isOwner) { return(false); } else { return(myA.AtMng.SecurityManager.CanDelete(er.FileId, atSecurity.SecurityManager.Features.OfficeAccount) == atSecurity.SecurityManager.LevelPermissions.All); } }
private atriumDB.EFileRow CreateFile(FileManager parentFile) { try { ParentFile = parentFile; atriumDB.EFileRow drFile = (atriumDB.EFileRow)EFile.Add(parentFile.CurrentFile); atriumDB.FileXRefRow fxr = (atriumDB.FileXRefRow)GetFileXRef().Add(parentFile.CurrentFile); fxr.LinkType = 0; fxr.FileId = parentFile.CurrentFile.FileId; fxr.OtherFileId = drFile.FileId; if (!drFile.IsNull("FileNumber")) { fxr.Name = drFile.FileNumber; fxr.FullFileNumber = drFile.FullFileNumber; } return(drFile); } catch (Exception exc) { throw exc; } }