Ejemplo n.º 1
0
        public JsonObject SaveInfoCategory(string infoCategoryName, bool isDefault, bool isActive, long infoCategoryId)
        {
            var retMessage = new JsonObject();

            string message;
            long   retCategoryID = DataInfoList.SaveLtdInfoCategory(infoCategoryName, isDefault, isActive, infoCategoryId, out message);

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

            return(retMessage);
        }