RemNavigationCreateFolder Method |
Namespace: Paperwork.Connect
public a_GenericResult CreateFolder( ObjectID parentId, ObjectName name, bool isprivate, bool iscabinet, ObjectID aclId, string iconIndex = "" )
public void CreateFolder()
{
ObjectName name = new ObjectName("Baykus");
string path = @"TR_CABINETS/Genel/";
a_PathInfo pi = p.rNavigation.getFolderPath(path); //Klasör yolu üzerindeki tüm klasörlerin OBJECT_ID döner.
ObjectID str_folderId = new ObjectID(pi.ObjectList[pi.ObjectList.Count - 1]); //Biz en sondaki OBJECT_ID istiyoruz.
bool isPrivate = false;
bool isCabinet = false;
ObservableCollection<LookupItem> acls = p.rLookup.GetACLs("Default ACL");
if (acls.Count < 0)
throw new Exception("Yetkiseti bulunamadı");
ObjectID aclId = new ObjectID(acls[0].ObjectId);
a_GenericResult cabinet = p.rNavigation.CreateFolder(str_folderId, name, isPrivate, isCabinet, aclId);
if (cabinet.ErrorCode != 0)
throw new Exception(cabinet.Message);
}