public void Test_MarketingBudget_GetFinanceHeaderValues() { // Get users list for current client List <BDSService.User> lstUsers = _marketingBudget.GetUserListByClientId(ClientId); // Get header values MarketingBudgetHeadsUp headerValues = _marketingBudget.GetFinanceHeaderValues(BudgetId, ExchangeRate, lstUsers); Assert.IsNotNull(headerValues); Assert.IsNotNull(headerValues.Budget); Assert.IsNotNull(headerValues.Forecast); Assert.IsNotNull(headerValues.Planned); Assert.IsNotNull(headerValues.Actual); }
/// <summary> /// Get finance header values(Budget, Forecast, Planned and Actual) /// </summary> /// <param name="BudgetId">Id of the Budget</param> /// <returns>Returns values in json format</returns> public JsonResult GetFinanceHeaderValues(int BudgetId, bool IsLineItem = false) { // Call function to get header values MarketingBudgetHeadsUp objHeader = _MarketingBudget.GetFinanceHeaderValues(BudgetId, Sessions.PlanExchangeRate, Sessions.ClientUsers, IsLineItem); string Budget, Forecast, Planned, Actual; Budget = Forecast = Planned = Actual = string.Empty; if (objHeader != null) { // Get values from datatable Budget = objHeader.Budget.ToString(); Forecast = objHeader.Forecast.ToString(); Planned = objHeader.Planned.ToString(); Actual = objHeader.Actual.ToString(); } return(Json(new { Budget = Budget, Forecast = Forecast, Planned = Planned, Actual = Actual }, JsonRequestBehavior.AllowGet)); }