Ejemplo n.º 1
0
    public string Handler_AddPersonalFolder()
    {
        StringBuilder sbRet = new StringBuilder();
            ContentAPI apiContent = new ContentAPI();
            long iNode = 0;
            int iFolder = 0;
            string sName = "";
            string sDesc = "";
            string sKey = "";
            try
            {
                iNode = Convert.ToInt32(Request.QueryString["node"]);
                if (Request.QueryString["name"] != "")
                {
                    sName = Request.QueryString["name"];
                }
                sKey = EkFunctions.HtmlEncode(Request.QueryString["key"]);
                if (Request.QueryString["desc"] != "")
                {
                    sDesc = Request.QueryString["desc"];
                }

                try
                {
                    iFolder = (Int32)apiContent.AddPersonalDirectoryFolder(iNode, sName, sDesc);
                }
                catch (Exception ex)
                {
                    EkException.ThrowException(ex);
                }
                sbRet.Append("  <method>AddPersonalFolder</method>").Append(Environment.NewLine);
                sbRet.Append("  <result>").Append(iFolder).Append("</result>").Append(Environment.NewLine);
                sbRet.Append("  <key>").Append(sKey).Append("</key>").Append(Environment.NewLine);
                return sbRet.ToString();
            }
            catch (Exception)
            {

            }
            return sbRet.ToString();
    }