Exemple #1
0
        public JsonObject SaveInfoPage(string infoPageName, string infoPageDescription, long infoPageCategoryId, long accessGroupId, bool asyncLoading, bool isActive, DateTime expiryDate, bool commentable, string commentorRoleList, bool isPublic, bool isCommon, bool isDeleted, long sequence, long infoPageId)
        {
            var retMessage = new JsonObject();

            string message;
            long   retID = DataInfoList.SaveLtdInfoPage(DecodeUrl(infoPageName), DecodeUrl(infoPageDescription), infoPageCategoryId, accessGroupId, asyncLoading, isActive, expiryDate, commentable, commentorRoleList, isPublic, isCommon, isDeleted, sequence, infoPageId, out message);

            if ((retID > 0) && (message.Trim().Length == 0))
            {
                retMessage.Put("message", infoPageId == 0 ? "Successfully Added Info Page" : "Successfully Updated Info Page");
            }
            else
            {
                if (message.Trim().Length == 0)
                {
                    message = "Error in Saving Info Page. Return Info Page ID is 0";
                }
                retMessage.Put("error", message);
            }

            return(retMessage);
        }