public static OtherExpenseListViewModel GetOtherExpenseByUser(string username)
        {
            Entities entities      = new Entities();
            var      otherExpenses = entities.Expenses.Where(x => x.Username.Equals(username) &&
                                                             x.ExpenseType == (int)Constants.Constants.EXPENSE_TYPE.OTHERS &&
                                                             !x.DisabledDate.HasValue).OrderBy(x => x.Name).ToList();
            OtherExpenseListViewModel result = new OtherExpenseListViewModel();

            foreach (var otherExpense in otherExpenses)
            {
                OtherExpenseViewModel viewModel = new OtherExpenseViewModel
                {
                    Id            = otherExpense.Id,
                    Source        = otherExpense.Name,
                    ExpenseDay    = otherExpense.ExpenseDay,
                    Expense       = otherExpense.Value,
                    AnnualExpense = otherExpense.Value * 12,
                    Note          = otherExpense.Note
                };

                result.Expenses.Add(viewModel);
            }

            result.TotalExpense       = result.Expenses.Sum(x => x.Expense.Value);
            result.TotalAnnualExpense = result.TotalExpense * 12;
            result.IsInitialized      = UserQueries.IsCompleteInitialized(username);

            return(result);
        }
        public ActionResult _OtherExpenseTable()
        {
            OtherExpenseListViewModel model = OtherExpenseQueries.GetOtherExpenseByUser(UserQueries.GetCurrentUsername());

            return(PartialView(model));
        }