Ejemplo n.º 1
0
        //Create
        public bool AddContentToDirectory(ClaimItems content)
        {
            int startingCount = _contentDirectory.Count;

            _contentDirectory.Add(content);
            bool wasAdded = (_contentDirectory.Count > startingCount) ? true : false;

            return(wasAdded);
        }
Ejemplo n.º 2
0
        //Update
        public bool UpdateExistingContent(int originalID, ClaimItems newContent)
        {
            ClaimItems oldContent = GetContentByID(originalID);

            if (oldContent != null)
            {
                oldContent.ClaimID        = newContent.ClaimID;
                oldContent.TypeOfClaim    = newContent.TypeOfClaim;
                oldContent.Description    = newContent.Description;
                oldContent.ClaimAmount    = newContent.ClaimAmount;
                oldContent.DateOfIncident = newContent.DateOfIncident;
                oldContent.DateOfClaim    = newContent.DateOfClaim;
                oldContent.IsValid        = newContent.IsValid;

                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 3
0
        //Delete
        public bool DeleteExistingContent(ClaimItems existingContent)
        {
            bool deleteResult = _contentDirectory.Remove(existingContent);

            return(deleteResult);
        }