public decimal GetFundNav(GetFundNavRequest getFundNavRequest)
        {
            DataTable dtResult = _mutualFundsDataAccess.GetFundNav(getFundNavRequest);

            if (dtResult != null && dtResult.Rows.Count > 0)
            {
                return(decimal.Parse(dtResult.Rows[0]["NAV"].ToString()));
            }
            else
            {
                return(-9999999);
            }
        }
Exemplo n.º 2
0
        public DataTable GetFundNav(GetFundNavRequest getFundNavRequest)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "schemaCode", Value = getFundNavRequest.SchemaCode
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Date, ParameterName = "date", Value = getFundNavRequest.Date.Date
            });


            DataSet ds = SQLHelper.ExecuteProcedure("PersonalFinance", "GetFundPrice", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
Exemplo n.º 3
0
        public HttpResponseMessage GetFundNav(GetFundNavRequest _getFundNavRequest)
        {
            decimal value = _mutualFundsRepository.GetFundNav(_getFundNavRequest);

            return(Request.CreateResponse(HttpStatusCode.OK, value));
        }