public HttpResponseMessage Delete(ApiAccidentValueEstimationModel accident)
 {
     if (_accidentValueEstimationManager.Delete(accident))
     {
         return(new HttpResponseMessage(HttpStatusCode.OK));
     }
     return(new HttpResponseMessage(HttpStatusCode.BadRequest));
 }
Exemplo n.º 2
0
 public AccidentValueEstimationModel MapAccidentValueEstimationApiModel(ApiAccidentValueEstimationModel ave)
 {
     return(new AccidentValueEstimationModel()
     {
         ID = ave.ID,
         CostOfDamage = ave.CostOfDamage,
         DamagedParts = ave.DamagedParts,
         Reason = ave.Reason
     });
 }
Exemplo n.º 3
0
        public ApiClaimModel Get(String id)
        {
            ClaimModel claim = _claimManager.Find <ClaimModel>(e => e.ID.Equals(id));
            AccidentValueEstimationModel    ave    = claim.AccidentValueEstimation;
            CommonToApiModelMapper          mapper = new CommonToApiModelMapper();
            ApiAccidentValueEstimationModel apiAve = mapper.MapAccidentValueEstmationCommonModel(ave);
            ApiClaimModel apiClaim = mapper.MapClaimCommonModel(claim);

            apiClaim.AccidentValueEstimaton = apiAve;
            return(apiClaim);
        }
        public ApiAccidentValueEstimationModel Get(ApiAccidentValueEstimationModel accidentValueEstimation)
        {
            //List<String> damagePartsList = new List<string>();
            //damagePartsList.Add("Buffer");
            //damagePartsList.Add("Fogg Light-Left");
            //ApiAccidentValueEstimationModel accident = new ApiAccidentValueEstimationModel
            //{
            //    ID = (int)ID,
            //    Reason = "Wet Weather",
            //    CostOfDamage = 20000,
            //    DamagedParts = new List<string>(damagePartsList),

            //};
            //return accident;
            return(_accidentValueEstimationManager.Find <ApiAccidentValueEstimationModel>(e => e.ID == accidentValueEstimation.ID));
        }