Exemplo n.º 1
0
        public HttpResponseMessage AddIdentificationType(HttpRequestMessage reqObject)
        {
            int result = 0;

            _requestedDataObject = _IDataManipulation.GetRequestedDataObject(reqObject);
            if (_requestedDataObject != null && _requestedDataObject.BusinessData != null)
            {
                _IdentificationType = JsonConvert.DeserializeObject <IdentificationType>(_requestedDataObject.BusinessData);
                result = _IIdentificationTypeService.AddIdentificationType(_IdentificationType);
            }

            if (result == 1)
            {
                _serviceResponse = _IDataManipulation.ResopnseWhenDataFound(result, "information has been added successfully");
            }
            else
            {
                _serviceResponse = _IDataManipulation.ResopnseWhenDataNotFound("Identification Not Found...");
            }
            _response = _IDataManipulation.CreateResponse(_serviceResponse, reqObject);
            return(_response);
        }