private void GetExpenseControl(int expenseControlId)
 {
     using (var expenseControlRepository = new ExpenseControlRepository())
     {
         ExpenseControl = expenseControlRepository.GetById(expenseControlId, true);
     }
 }
        private bool UpdateExpenseControl(DateTime endDate, string value)
        {
            using (var expenseControlRepository = new ExpenseControlRepository())
            {
                try
                {
                    expenseControl.TotalValue = value;
                    expenseControl.EndYear    = endDate.Year;
                    expenseControl.EndMonth   = endDate.Month;
                    expenseControl.EndDay     = endDate.Day;
                    expenseControl.Title      = Title;

                    expenseControlRepository.Update(expenseControl);
                    expenseControl = expenseControlRepository.GetById(expenseControl.ExpenseControlId, true);
                    return(true);
                }
                catch
                {
                    return(false);
                }
            }
        }