Example #1
0
        public virtual JObject CreateNewFolder(HttpContext context)
        {
            YZRequest     request = new YZRequest(context);
            StoreZoneType zone    = request.GetEnum <StoreZoneType>("zone");
            string        path    = request.GetString("path", "");

            string folderName;

            using (BPMConnection cn = new BPMConnection())
            {
                cn.WebOpen();
                folderName = cn.CreateNewFolder(zone, path);
            }

            string folderPath;

            if (String.IsNullOrEmpty(path))
            {
                folderPath = folderName;
            }
            else
            {
                folderPath = path + "/" + folderName;
            }

            JObject item = new JObject();

            item["leaf"]    = false;
            item["text"]    = folderName;
            item["iconCls"] = "folder";
            item["path"]    = folderPath;
            item["rsid"]    = zone.ToString() + "://" + folderPath;
            return(item);
        }