public void PrepareForEdit(BudgetProject budgetProject)
        {
            CurrentEditOrViewProject = budgetProject;
            GuidForAdd = budgetProject.Id;

            BugetItemsForEditToAdd.Clear();
        }
        /// <summary>
        /// Counts for settle amount for budget project.
        /// </summary>
        /// <param name="project">The project.</param>
        /// <param name="scope">The scope.</param>
        /// <returns></returns>
        public decimal CountForSettleAmountForBudgetProject(BudgetProject project, SearchingScope scope = SearchingScope.CurrentMonth)
        {
            if (project.BudgetItems == null || project.BudgetItems.Count == 0)
            {
                return 0.0m;
            }

            DetailsCondition dc = new DetailsCondition();
            dc.SearchingScope = scope;

            var result = 0.0m;
            foreach (var category in project.BudgetItems)
            {
                result += CountSumOfBudgetItems(category, dc);
            }

            return result;
        }
 /// <summary>
 /// Resets the current.
 /// </summary>
 public void ResetCurrent()
 {
     CurrentEditOrViewProject = new BudgetProject();
     CurrentEditOrViewProject.Id = Guid.Empty;
     CurrentEditOrViewProject.CreateAt = null;
     GuidForAdd = Guid.NewGuid();
     BugetItemsForAdd.Clear();
 }