Exemplo n.º 1
0
        /// <summary>
        /// Method Name     : PutEstimateData
        /// Author          : Pratik Soni
        /// Creation Date   : 12 Jan 2018
        /// Purpose         : To update estimate details.
        /// Revision        :
        /// </summary>
        /// <param name="moveId"> </param>
        /// <param name="jsonFormattedData"> Contains the estimate details to be saved </param>
        /// <returns></returns>
        public ServiceResponse <Estimate> PutEstimateData(string moveId, string jsonFormattedData)
        {
            Dictionary <string, string> crmResponse;

            try
            {
                logger.Info("PutEstimateData encountered");
                string moveGUID = General.GetSpecificAttributeFromCRMResponse(crmMoveDetails.GetMoveGUID(moveId), "jkmoving_moveid");

                crmResponse = objCrmUtilities.ExecutePutRequest("jkmoving_moves", moveGUID, objDTOToCRMMapper.MapEstimateDTOToCRM(jsonFormattedData));

                return(GetCRMResponse(crmResponse));
            }
            catch (Exception ex)
            {
                logger.Error(resourceManager.GetString("msgServiceUnavailable"), ex);
                return(new ServiceResponse <Estimate> {
                    Message = resourceManager.GetString("msgServiceUnavailable")
                });
            }
        }