示例#1
0
        //DELETE
        public bool RemoveDataFromDir(double claimID)
        {
            ClaimLibrary data = GetDataByClaimID(claimID);

            if (data == null)
            {
                return(false);
            }

            int intialCount = _claimsDir.Count;

            _claimsDir.Dequeue();

            if (intialCount > _claimsDir.Count)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#2
0
        //UPDATE
        public bool UpdateDataFromDir(int existingClaimID, ClaimLibrary newData)
        {
            //Find the original content
            ClaimLibrary existingData = GetDataByClaimID(existingClaimID);

            //Update the content
            if (existingData != null)
            {
                existingData.ClaimID      = newData.ClaimID;
                existingData.ClaimType    = newData.ClaimType;
                existingData.Description  = newData.Description;
                existingData.Settlement   = newData.Settlement;
                existingData.IncidentDate = newData.IncidentDate;
                existingData.ClaimDate    = newData.ClaimDate;
                existingData.Valid        = newData.Valid;

                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#3
0
        //CRUD

        //CREATE
        public void AddDataToList(ClaimLibrary data)
        {
            _claimsDir.Enqueue(data);
        }