public ActionResult ManageExpense(int expenseId = 0) { ExpenseReportModel expense = new ExpenseReportModel(); if (expenseId > 0) { expense = _expenseReportService.GetExpenseById(expenseId); expense.Category = _categoryService.GetCategoryById(expense.CategoryId); expense.PaymentType = _paymentTypeService.GetPaymentTypeById(expense.PaymentTypeId); } expense.ListOfCategories = _categoryService.GetAllCategories(); expense.ListOfPaymentTypes = _paymentTypeService.GetAllPaymentTypes(); return(PartialView("_ExpenseManageForm", expense)); }