Example #1
0
        public string DeleteItemPermanently(long id)
        {
            User item = BaseMapper.GetObjectFromContext(UsersMapper.GetByID(id));

            if (item != null)
            {
                Return returnObj = UsersMapper.DeletePermanently(item);

                if (returnObj.IsError)
                {
                    return(jGrowlHelper.GenerateCode(new jGrowlMessage("Error", "Error deleting item permanently", jGrowlMessage.jGrowlMessageType.Error, returnObj.Error), true));
                }
                else
                {
                    return(jGrowlHelper.GenerateCode(new jGrowlMessage("Success", "Item was successfully deleted permanently", jGrowlMessage.jGrowlMessageType.Success), false));
                }
            }

            return("");
        }