public ActionResult GetDashBoardBudgetData(int id)
 {
     using (var bal = new DashboardBudgetBal())
     {
         var current  = bal.GetDashboardBudgetById(id);
         var jsonData = new
         {
             current.AprilBudget,
             current.AugustBudget,
             current.BudgetDescription,
             current.BudgetFor,
             current.BudgetId,
             current.BudgetType,
             current.CorporateId,
             current.DecemberBudget,
             current.DepartmentNumber,
             current.FacilityId,
             current.FebruaryBudget,
             current.FiscalYear,
             current.IsActive,
             current.JanuaryBudget,
             current.JulyBudget,
             current.JuneBudget,
             current.MarchBudget,
             current.MayBudget,
             current.NovemberBudget,
             current.OctoberBudget,
             current.SeptemberBudget,
         };
         return(Json(jsonData, JsonRequestBehavior.AllowGet));
     }
 }
        /// <summary>
        /// Get the details of the current DashboardBudget in the view model by ID
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <returns></returns>
        public ActionResult GetDashboardBudget(int id)
        {
            using (var bal = new DashboardBudgetBal())
            {
                //Call the AddDashboardBudget Method to Add / Update current DashboardBudget
                var currentDashboardBudget = bal.GetDashboardBudgetById(id);

                //Pass the ActionResult with the current DashboardBudgetViewModel object as model to PartialView DashboardBudgetAddEdit
                return(PartialView(PartialViews.DashboardBudgetAddEdit, currentDashboardBudget));
            }
        }
 /// <summary>
 /// Delete the current DashboardBudget based on the DashboardBudget ID passed in the DashboardBudgetModel
 /// </summary>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public ActionResult DeleteDashboardBudget(int id)
 {
     using (var bal = new DashboardBudgetBal())
     {
         //Get DashboardBudget model object by current DashboardBudget ID
         var currentDashboardBudget = bal.GetDashboardBudgetById(id);
         var userId = Helpers.GetLoggedInUserId();
         var result = bal.DeleteDashBoradBudget(currentDashboardBudget);
         //return deleted ID of current DashboardBudget as Json Result to the Ajax Call.
         return(Json(result));
         //Check If DashboardBudget model is not null
     }
     //Return the Json result as Action Result back JSON Call Success
 }