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); } }
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); }
public HttpResponseMessage GetFundNav(GetFundNavRequest _getFundNavRequest) { decimal value = _mutualFundsRepository.GetFundNav(_getFundNavRequest); return(Request.CreateResponse(HttpStatusCode.OK, value)); }