public AppyStatementModel RequestBalance(GetInitialDataForAccountStatementRequestDto request, long memberId) { AppyStatementModel response = new AppyStatementModel(); response.ResponseStatement = new StatementResponseDto(); //response.ResponseStatement.MemberDetails = _dbHelper.GetStatmentMemberDetails(memberId, request.AccountHeadModel.DepositId, request.dateTo); response.ResponseStatement.BalanceAmt = _dbHelper.GetAccountBalance(request.AccountHeadModel.AccountTypeId, request.AccountHeadModel.DepositId); return(response); }
public HttpResponseMessage RequestBalance(StatementRequestDto model) { // var response = "1000000"; if (!_processController.ValidateRequest(model as RequestBase)) { return(Request.CreateErrorResponse(HttpStatusCode.Unauthorized, new UnauthorizedAccessException("Unauthorized access. Please try to log in again."))); } var request = new GetInitialDataForAccountStatementRequestDto(); request.AccountHeadModel.DepositId = model.DepositId; request.AccountHeadModel.AccountTypeId = model.AccountType; var response = _processController.RequestBalance(request, Convert.ToInt64(model.MemberId)); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
public AppyStatementModel RequestStatement(GetInitialDataForAccountStatementRequestDto request, long memberId) { decimal openingbalance; AppyStatementModel response = new AppyStatementModel(); response.ResponseStatement = new StatementResponseDto(); if (request.Service == "accountstatement") { response.ResponseStatement.StatementDetails = _dbHelper.GetStatementTransactionDetails(memberId, request.AccountHeadModel.DepositId, request.AccountHeadModel.AccountTypeId, request.dateFrom, request.dateTo, out openingbalance); response.ResponseStatement.OpeningBalance = openingbalance; } else if (request.Service == "accountstatementtrade") { response.ResponseStatement.StatementDetails = _dbHelper.GetStatementTransactionDetailsTrade(memberId, request.AccountHeadModel.DepositId, request.AccountHeadModel.AccountTypeId, request.dateFrom, request.dateTo, out openingbalance); response.ResponseStatement.OpeningBalance = openingbalance; } return(response); }
public HttpResponseMessage RequestStatement(StatementRequestDto model) { if (!_processController.ValidateRequest(model as RequestBase)) { return(Request.CreateErrorResponse(HttpStatusCode.Unauthorized, new UnauthorizedAccessException("Unauthorized access. Please try to log in again."))); } var request = new GetInitialDataForAccountStatementRequestDto(); request.AccountHeadModel.DepositId = model.DepositId; request.AccountHeadModel.AccountTypeId = model.AccountType; request.dateFrom = model.DateFrom.ToString("yyyy-MM-dd"); request.dateTo = model.DateTo.ToString("yyyy-MM-dd"); request.AppId = model.AppId; request.Service = model.Service; request.MemberId = model.MemberId; var response = _processController.RequestStatement(request, Convert.ToInt64(model.MemberId)); response.DateFrom = request.dateFrom; response.DateTo = request.dateTo; return(Request.CreateResponse(HttpStatusCode.OK, response)); }