Example #1
0
        public HttpResponseMessage DeleteErrorLog(HttpRequestMessage reqObject)
        {
            int result = 0;

            _requestedDataObject = _IDataManipulation.GetRequestedDataObject(reqObject);
            if (_requestedDataObject != null && _requestedDataObject.BusinessData != null)
            {
                _ErrorLog = JsonConvert.DeserializeObject <ErrorLog>(_requestedDataObject.BusinessData);
            }

            if (_ErrorLog == null || string.IsNullOrWhiteSpace(_ErrorLog.SL))
            {
                _serviceResponse = _IDataManipulation.SetResponseObject(result, "Error Id Not Found...");
                _response        = _IDataManipulation.CreateResponse(_serviceResponse, reqObject);
                return(_response);
            }

            result = _IErrorLogService.DeleteErrorLog(_ErrorLog);
            if (result == 1)
            {
                _serviceResponse = _IDataManipulation.SetResponseObject(result, "information has been deleted successfully");
            }
            else
            {
                _serviceResponse = _IDataManipulation.SetResponseObject(result, "Error Id Not Found...");
            }
            _response = _IDataManipulation.CreateResponse(_serviceResponse, reqObject);
            return(_response);
        }