예제 #1
0
        public HttpResponseMessage GetActivity()
        {
            HttpStatusCode ReturnCode = HttpStatusCode.OK;
            TranInfo <List <Activity_M> >     transaction = new TranInfo <List <Activity_M> >();
            ReturnResult <List <Activity_M> > result      = new ReturnResult <List <Activity_M> >();

            try
            {
                result = _service.GetActivity();

                if (result.status.Status == StatusEnum.Success)
                {
                    transaction.data   = result.result;
                    transaction.status = true;
                }
                else
                {
                    transaction.status = false;
                    transaction.AddException(result.status.StatusMessage);
                }
            }
            catch (Exception ex)
            {
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);
            }

            return(Request.CreateResponse <TranInfo <List <Activity_M> > >(ReturnCode, transaction));
        }
        public HttpResponseMessage GetAccountSearch([FromBody] AccountSearch accountSearch)
        {
            AccountManagementService    accService  = new AccountManagementService();
            HttpStatusCode              ReturnCode  = HttpStatusCode.OK;
            TranInfo <SearchResult>     transaction = new TranInfo <SearchResult>();
            ReturnResult <SearchResult> result      = new ReturnResult <SearchResult>();

            try
            {
                result = accService.GetAccountSearch(accountSearch);
                if (result.status.Status == StatusEnum.Success)
                {
                    transaction.data   = result.result;
                    transaction.status = true;
                }
                else
                {
                    transaction.status = false;
                    transaction.AddException(result.status.StatusMessage);
                }
            }
            catch (Exception ex)
            {
                transaction.status = false;
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);
            }
            return(Request.CreateResponse <TranInfo <SearchResult> >(ReturnCode, transaction));
        }
예제 #3
0
        public HttpResponseMessage SubmitMail([FromBody] MailM model)
        {
            HttpStatusCode       ReturnCode  = HttpStatusCode.OK;
            TranInfo <MailM>     transaction = new TranInfo <MailM>();
            ReturnResult <MailM> result      = new ReturnResult <MailM>();

            try
            {
                var dbResult = _service.SubmitMail(model);
                if (dbResult.status.Status == StatusEnum.Success)
                {
                    transaction.data   = dbResult.result;
                    transaction.status = true;
                }
                else
                {
                    transaction.status = false;
                    transaction.AddException(dbResult.status.StatusMessage);
                }
            }
            catch (Exception ex)
            {
                transaction.status = false;
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);
            }
            return(Request.CreateResponse <TranInfo <MailM> >(ReturnCode, transaction));
        }
        public HttpResponseMessage DeleteCityUser([FromUri] int UserID)
        {
            System.Diagnostics.EventLog.WriteEntry("Application", "Controller Delete Customer started");
            AccountManagementService accService  = new AccountManagementService();
            HttpStatusCode           ReturnCode  = HttpStatusCode.OK;
            TranInfo <bool>          transaction = new TranInfo <bool>();
            ReturnResult <bool>      result      = new ReturnResult <bool>();

            try
            {
                result = accService.DeleteCityUser(UserID);
                if (result.status.Status == StatusEnum.Success)
                {
                    transaction.status = true;
                }
                else
                {
                    transaction.status = false;
                    transaction.AddException(result.status.StatusMessage);
                }
            }
            catch (Exception ex)
            {
                transaction.status = false;
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);
            }
            return(Request.CreateResponse <TranInfo <bool> >(ReturnCode, transaction));
        }
예제 #5
0
        public HttpResponseMessage GetStatus(int?activityid = null)
        {
            HttpStatusCode ReturnCode = HttpStatusCode.OK;
            TranInfo <List <Status_M> >     transaction = new TranInfo <List <Status_M> >();
            ReturnResult <List <Status_M> > result      = new ReturnResult <List <Status_M> >();

            try
            {
                result = _service.GetStatus((int)activityid);

                if (result.status.Status == StatusEnum.Success)
                {
                    transaction.data   = result.result;
                    transaction.status = true;
                }
                else
                {
                    transaction.status = false;
                    transaction.AddException(result.status.StatusMessage);
                }
            }
            catch (Exception ex)
            {
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);

                //  LogHelper.Instance.Error(service.CorrelationId, Username, Request.GetRequestContext().VirtualPathRoot, ex.Message, InnerExceptionMessage, 0, ex);
            }

            return(Request.CreateResponse <TranInfo <List <Status_M> > >(ReturnCode, transaction));
        }
예제 #6
0
        public HttpResponseMessage GetCustomEmailNotification(int cID, int AnalystUserID, int NotificationID)
        {
            HttpStatusCode              ReturnCode  = HttpStatusCode.OK;
            TranInfo <CustomEmailM>     transaction = new TranInfo <CustomEmailM>();
            ReturnResult <CustomEmailM> result      = new ReturnResult <CustomEmailM>();

            try
            {
                result = _service.GetCustomEmailNotification(cID, AnalystUserID, NotificationID);

                if (result.status.Status == StatusEnum.Success)
                {
                    transaction.data   = result.result;
                    transaction.status = true;
                }
                else
                {
                    transaction.status = false;
                    transaction.AddException(result.status.StatusMessage);
                }
            }
            catch (Exception ex)
            {
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);
            }

            return(Request.CreateResponse <TranInfo <CustomEmailM> >(ReturnCode, transaction));
        }
예제 #7
0
        public HttpResponseMessage AssignHearingOfficer(int cID, int HearingOfficerUserID)
        {
            HttpStatusCode      ReturnCode  = HttpStatusCode.OK;
            TranInfo <bool>     transaction = new TranInfo <bool>();
            ReturnResult <bool> result      = new ReturnResult <bool>();

            try
            {
                result = _service.AssignHearingOfficer(cID, HearingOfficerUserID);

                if (result.status.Status == StatusEnum.Success)
                {
                    transaction.data   = result.result;
                    transaction.status = true;
                }
                else
                {
                    transaction.status = false;
                    transaction.AddException(result.status.StatusMessage);
                }
            }
            catch (Exception ex)
            {
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);
            }

            return(Request.CreateResponse <TranInfo <bool> >(ReturnCode, transaction));
        }
        public HttpResponseMessage SaveTranslationServiceInfo([FromBody] TranslationServiceInfoM model)
        {
            AccountManagementService accService  = new AccountManagementService();
            HttpStatusCode           ReturnCode  = HttpStatusCode.OK;
            TranInfo <Boolean>       transaction = new TranInfo <Boolean>();
            ReturnResult <Boolean>   result      = new ReturnResult <Boolean>();

            try
            {
                result = accService.SaveTranslationServiceInfo(model);
                if (result.status.Status == StatusEnum.Success)
                {
                    transaction.status = true;
                }
                else
                {
                    transaction.status = false;
                    transaction.AddException(result.status.StatusMessage);
                }
            }
            catch (Exception ex)
            {
                transaction.status = false;
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);
            }
            return(Request.CreateResponse <TranInfo <Boolean> >(ReturnCode, transaction));
        }
        public HttpResponseMessage CreateCityUserAccount([FromBody] CityUserAccount_M cityUserModel)
        {
            System.Diagnostics.EventLog.WriteEntry("Application", "Controller Save Customer started");
            AccountManagementService         accService   = new AccountManagementService();
            IEmailService                    emailService = new EmailService();
            HttpStatusCode                   ReturnCode   = HttpStatusCode.OK;
            TranInfo <CityUserAccount_M>     transaction  = new TranInfo <CityUserAccount_M>();
            ReturnResult <CityUserAccount_M> result       = new ReturnResult <CityUserAccount_M>();

            try
            {
                result = accService.CreateCityUserAccount(cityUserModel);
                if (result.status.Status == StatusEnum.Success)
                {
                    //emailService.SendEmail(getRegisterCustomerEmailModel(result.result));
                    transaction.status = true;
                }
                else
                {
                    transaction.status = false;
                    transaction.AddException(result.status.StatusMessage);
                }
            }
            catch (Exception ex)
            {
                transaction.status = false;
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);
            }
            return(Request.CreateResponse <TranInfo <CityUserAccount_M> >(ReturnCode, transaction));
        }
        public HttpResponseMessage RemoveThirdPartyInfo([FromBody] ThirdPartyInfoM model)
        {
            System.Diagnostics.EventLog.WriteEntry("Application", "Controller Remove Third Party started");
            AccountManagementService       accService  = new AccountManagementService();
            HttpStatusCode                 ReturnCode  = HttpStatusCode.OK;
            TranInfo <ThirdPartyInfoM>     transaction = new TranInfo <ThirdPartyInfoM>();
            ReturnResult <ThirdPartyInfoM> result      = new ReturnResult <ThirdPartyInfoM>();

            try
            {
                result = accService.RemoveThirdPartyInfo(model);
                if (result.status.Status == StatusEnum.Success)
                {
                    transaction.status = true;
                }
                else
                {
                    transaction.status = false;
                    transaction.AddException(result.status.StatusMessage);
                }
            }
            catch (Exception ex)
            {
                transaction.status = false;
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);
            }
            return(Request.CreateResponse <TranInfo <ThirdPartyInfoM> >(ReturnCode, transaction));
        }
        public HttpResponseMessage ForgetPwd([FromBody] CustomerInfo customerInfo)
        {
            //System.Diagnostics.EventLog.WriteEntry("Application", "LoginCust started");
            AccountManagementService accService  = new AccountManagementService();
            HttpStatusCode           ReturnCode  = HttpStatusCode.OK;
            TranInfo <bool>          transaction = new TranInfo <bool>();
            ReturnResult <bool>      result      = new ReturnResult <bool>();

            try
            {
                if (customerInfo == null || customerInfo.email == null || customerInfo.email == "")
                {
                    transaction.status = false;
                    transaction.AddException("Please enter email address");
                }
                else
                {
                    result = accService.ForgetPwd(customerInfo.email);
                    if (result.status.Status == StatusEnum.Success)
                    {
                        transaction.data   = result.result;
                        transaction.status = true;
                    }
                    else
                    {
                        // transaction.warnings.Add(result.status.StatusMessage);

                        transaction.status = false;
                        transaction.AddException(result.status.StatusMessage);

                        //_commonService.LogError(result.status.StatusCode, result.status.StatusMessage, result.status.StatusDetails, 0, "LoginCust");
                    }
                }
            }
            catch (Exception ex)
            {
                transaction.status = false;
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);
                // transaction.AddException(ex.Message);
                //ReturnCode = HttpStatusCode.InternalServerError;

                //if (ex.InnerException != null) { InnerExceptionMessage = ex.InnerException.Message; }
                //LogHelper.Instance.Error(CorrelationID, Username, Request.GetRequestContext().VirtualPathRoot, ex.Message, InnerExceptionMessage, 0, ex);
            }

            return(Request.CreateResponse <TranInfo <bool> >(ReturnCode, transaction));
        }
        public HttpResponseMessage GetNotes(int ReqID)
        {
            HttpStatusCode           ReturnCode  = HttpStatusCode.OK;
            TranInfo <List <Notes> > transaction = new TranInfo <List <Notes> >();

            try
            {
                ExtractClaimDetails();

                transaction.data   = service.GetNotes(ReqID, Username);
                transaction.status = true;
            }
            catch (Exception ex)
            {
                transaction.AddException(ex.Message);
                ReturnCode = HttpStatusCode.InternalServerError;

                if (ex.InnerException != null)
                {
                    InnerExceptionMessage = ex.InnerException.Message;
                }
                LogHelper.Instance.Error(service.CorrelationId, Username, Request.GetRequestContext().VirtualPathRoot, ex.Message, InnerExceptionMessage, 0, ex);
            }

            return(Request.CreateResponse <TranInfo <List <Notes> > >(ReturnCode, transaction));
        }
        // [ValidateModelState]
        public HttpResponseMessage SaveOTRequest([FromBody] Header objHeader, [FromUri] int?ReqID = null)
        {
            HttpStatusCode       ReturnCode  = HttpStatusCode.OK;
            TranInfo <OTRequest> transaction = new TranInfo <OTRequest>();

            try
            {
                ExtractClaimDetails();

                IList <string> Warnings;
                int            reqid = service.SaveOTRequest(ReqID, objHeader, Username, out Warnings);
                //transaction.data = reqid;
                transaction.data     = service.GetOTRequest(reqid, null, Username);
                transaction.warnings = Warnings;
                transaction.status   = true;
            }
            catch (Exception ex)
            {
                transaction.AddException(ex.Message);
                ReturnCode = HttpStatusCode.InternalServerError;

                if (ex.InnerException != null)
                {
                    InnerExceptionMessage = ex.InnerException.Message;
                }
                LogHelper.Instance.Error(service.CorrelationId, Username, Request.GetRequestContext().VirtualPathRoot, ex.Message, InnerExceptionMessage, 0, ex);
            }

            return(Request.CreateResponse <TranInfo <OTRequest> >(ReturnCode, transaction));
        }
        public HttpResponseMessage GetCustomer()
        {
            HttpStatusCode              ReturnCode  = HttpStatusCode.OK;
            TranInfo <CustomerInfo>     transaction = new TranInfo <CustomerInfo>();
            ReturnResult <CustomerInfo> result      = new ReturnResult <CustomerInfo>();

            try
            {
                CustomerInfo obj;
                obj = new CustomerInfo();

                transaction.data   = obj;
                transaction.status = true;
            }
            catch (Exception ex)
            {
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);

                //  LogHelper.Instance.Error(service.CorrelationId, Username, Request.GetRequestContext().VirtualPathRoot, ex.Message, InnerExceptionMessage, 0, ex);
            }

            return(Request.CreateResponse <TranInfo <CustomerInfo> >(ReturnCode, transaction));
        }
        public HttpResponseMessage GetCustomer(int custID)
        {
            AccountManagementService    accService  = new AccountManagementService();
            HttpStatusCode              ReturnCode  = HttpStatusCode.OK;
            TranInfo <CustomerInfo>     transaction = new TranInfo <CustomerInfo>();
            ReturnResult <CustomerInfo> result      = new ReturnResult <CustomerInfo>();

            try
            {
                result = accService.GetCustomer(custID);
                if (result.status.Status == StatusEnum.Success)
                {
                    transaction.data   = result.result;
                    transaction.status = true;
                }
                else
                {
                    // transaction.warnings.Add(result.status.StatusMessage);

                    transaction.status = false;
                    transaction.AddException(result.status.StatusMessage);

                    //_commonService.LogError(result.status.StatusCode, result.status.StatusMessage, result.status.StatusDetails, 0, "LoginCust");
                }
            }
            catch (Exception ex)
            {
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);

                //  LogHelper.Instance.Error(service.CorrelationId, Username, Request.GetRequestContext().VirtualPathRoot, ex.Message, InnerExceptionMessage, 0, ex);
            }

            return(Request.CreateResponse <TranInfo <CustomerInfo> >(ReturnCode, transaction));
        }
예제 #16
0
        public HttpResponseMessage SaveNewActivityStatus(ActivityStatus_M activityStatus, int CID)
        {
            ExtractClaimDetails();
            //Appl accService = new AccountManagementService();
            HttpStatusCode      ReturnCode  = HttpStatusCode.OK;
            TranInfo <bool>     transaction = new TranInfo <bool>();
            ReturnResult <bool> result      = new ReturnResult <bool>();

            try
            {
                result = _service.SaveNewActivityStatus(activityStatus, CID);

                if (result.status.Status == StatusEnum.Success)
                {
                    transaction.data   = result.result;
                    transaction.status = true;
                }
                else
                {
                    transaction.status = false;
                    transaction.AddException(result.status.StatusMessage);
                }
            }
            catch (Exception ex)
            {
                transaction.status = false;
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);

                //if (ex.InnerException != null) { InnerExceptionMessage = ex.InnerException.Message; }
                //LogHelper.Instance.Error(CorrelationID, Username, Request.GetRequestContext().VirtualPathRoot, ex.Message, InnerExceptionMessage, 0, ex);
            }

            return(Request.CreateResponse <TranInfo <bool> >(ReturnCode, transaction));
        }
        public HttpResponseMessage RemoveThirdParty([FromBody] ThirdPartyDetails thirdpartyInfo, int?custid = null)
        {
            AccountManagementService accService  = new AccountManagementService();
            HttpStatusCode           ReturnCode  = HttpStatusCode.OK;
            TranInfo <bool>          transaction = new TranInfo <bool>();
            ReturnResult <bool>      result      = new ReturnResult <bool>();

            try
            {
                result = accService.RemoveThirdParty((int)custid, thirdpartyInfo.ThirdPartyRepresentationID);
                if (result.status.Status == StatusEnum.Success)
                {
                    transaction.status = true;
                }
                else
                {
                    transaction.status = false;
                    transaction.AddException(result.status.StatusMessage);
                }
            }
            catch (Exception ex)
            {
                transaction.status = false;
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);

                // transaction.AddException(ex.Message);
                //ReturnCode = HttpStatusCode.InternalServerError;

                //if (ex.InnerException != null) { InnerExceptionMessage = ex.InnerException.Message; }
                //LogHelper.Instance.Error(CorrelationID, Username, Request.GetRequestContext().VirtualPathRoot, ex.Message, InnerExceptionMessage, 0, ex);
            }

            return(Request.CreateResponse <TranInfo <bool> >(ReturnCode, transaction));
        }
        public HttpResponseMessage AuthorizeCollaborator([FromBody] CollaboratorAccessM access)
        {
            AccountManagementService accService  = new AccountManagementService();
            HttpStatusCode           ReturnCode  = HttpStatusCode.OK;
            TranInfo <bool>          transaction = new TranInfo <bool>();
            ReturnResult <bool>      result      = new ReturnResult <bool>();

            try
            {
                result = accService.AuthorizeCollaborator(access);
                if (result.status.Status == StatusEnum.Success)
                {
                    transaction.data   = (bool)result.result;
                    transaction.status = true;
                }
                else
                {
                    transaction.status = false;
                    transaction.AddException(result.status.StatusMessage);
                }
            }
            catch (Exception ex)
            {
                transaction.status = false;
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);
                // transaction.AddException(ex.Message);
                //ReturnCode = HttpStatusCode.InternalServerError;

                //if (ex.InnerException != null) { InnerExceptionMessage = ex.InnerException.Message; }
                //LogHelper.Instance.Error(CorrelationID, Username, Request.GetRequestContext().VirtualPathRoot, ex.Message, InnerExceptionMessage, 0, ex);
            }

            return(Request.CreateResponse <TranInfo <bool> >(ReturnCode, transaction));
        }
예제 #19
0
        public HttpResponseMessage GetCaseswithNoAnalyst([FromBody] CaseSearch caseSearch, [FromUri] int UserID)
        {
            //Appl accService = new AccountManagementService();
            HttpStatusCode ReturnCode = HttpStatusCode.OK;
            TranInfo <SearchCaseResult>     transaction = new TranInfo <SearchCaseResult>();
            ReturnResult <SearchCaseResult> result      = new ReturnResult <SearchCaseResult>();

            try
            {
                result = _service.GetCaseswithNoAnalyst(caseSearch, UserID);

                if (result.status.Status == StatusEnum.Success)
                {
                    transaction.data   = result.result;
                    transaction.status = true;
                }
                else
                {
                    transaction.status = false;
                    transaction.AddException(result.status.StatusMessage);
                }
            }
            catch (Exception ex)
            {
                transaction.status = false;
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);

                //if (ex.InnerException != null) { InnerExceptionMessage = ex.InnerException.Message; }
                //LogHelper.Instance.Error(CorrelationID, Username, Request.GetRequestContext().VirtualPathRoot, ex.Message, InnerExceptionMessage, 0, ex);
            }

            return(Request.CreateResponse <TranInfo <SearchCaseResult> >(ReturnCode, transaction));
        }
        public HttpResponseMessage GetEmptyAccountSearchModel()
        {
            HttpStatusCode               ReturnCode  = HttpStatusCode.OK;
            TranInfo <AccountSearch>     transaction = new TranInfo <AccountSearch>();
            ReturnResult <AccountSearch> result      = new ReturnResult <AccountSearch>();

            try
            {
                transaction.data   = new AccountSearch();
                transaction.status = true;
            }
            catch (Exception ex)
            {
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);
            }

            return(Request.CreateResponse <TranInfo <AccountSearch> >(ReturnCode, transaction));
        }
        public HttpResponseMessage GetAuthorizedUsers(int?custID = null)
        {
            AccountManagementService           accService  = new AccountManagementService();
            HttpStatusCode                     ReturnCode  = HttpStatusCode.OK;
            TranInfo <CollaboratorAccessM>     transaction = new TranInfo <CollaboratorAccessM>();
            ReturnResult <CollaboratorAccessM> result      = new ReturnResult <CollaboratorAccessM>();

            try
            {
                transaction.data   = new CollaboratorAccessM();
                transaction.status = true;
                //result = accService.GetAuthorizedUsers((int)custID);
                //if (result.status.Status == StatusEnum.Success)
                //{
                //    transaction.data = result.result;
                //    transaction.status = true;
                //}
                //else
                //{
                //    transaction.status = false;
                //    transaction.AddException(result.status.StatusMessage);
                //    //_commonService.LogError(result.status.StatusCode, result.status.StatusMessage, result.status.StatusDetails, 23, "GetAuthorizedUsers");
                //}
            }
            catch (Exception ex)
            {
                transaction.status = false;
                transaction.AddException(ex.Message);
                ReturnCode    = HttpStatusCode.InternalServerError;
                result.status = _eHandler.HandleException(ex);
                _commonService.LogError(result.status);
                //ReturnCode = HttpStatusCode.InternalServerError;

                //if (ex.InnerException != null) { InnerExceptionMessage = ex.InnerException.Message; }
                //LogHelper.Instance.Error(CorrelationID, Username, Request.GetRequestContext().VirtualPathRoot, ex.Message, InnerExceptionMessage, 0, ex);
            }

            return(Request.CreateResponse <TranInfo <CollaboratorAccessM> >(ReturnCode, transaction));
        }
        public HttpResponseMessage GetOTRequest(int?reqid = null, int?fy = null)
        {
            HttpStatusCode       ReturnCode  = HttpStatusCode.OK;
            TranInfo <OTRequest> transaction = new TranInfo <OTRequest>();

            try
            {
                ExtractClaimDetails();

                OTRequest obj;
                if (reqid.HasValue)
                {
                    obj = service.GetOTRequest((int)reqid, fy, Username);
                }
                else
                {
                    obj = new OTRequest();
                }

                transaction.data   = obj;
                transaction.status = true;
            }
            catch (Exception ex)
            {
                transaction.AddException(ex.Message);
                ReturnCode = HttpStatusCode.InternalServerError;

                if (ex.InnerException != null)
                {
                    InnerExceptionMessage = ex.InnerException.Message;
                }
                LogHelper.Instance.Error(service.CorrelationId, Username, Request.GetRequestContext().VirtualPathRoot, ex.Message, InnerExceptionMessage, 0, ex);
            }

            return(Request.CreateResponse <TranInfo <OTRequest> >(ReturnCode, transaction));
        }