예제 #1
0
        private void FixupAppBudget(AppBudget previousValue)
        {
            if (previousValue != null && previousValue.AppBudgetServices.Contains(this))
            {
                previousValue.AppBudgetServices.Remove(this);
            }

            if (AppBudget != null)
            {
                if (!AppBudget.AppBudgetServices.Contains(this))
                {
                    AppBudget.AppBudgetServices.Add(this);
                }
                if (AppBudgetId != AppBudget.Id)
                {
                    AppBudgetId = AppBudget.Id;
                }
            }
        }
 public static bool IsEditable(AppBudget f)
 {
     return(f.StatusId == (int)AppBudgetApprovalStatuses.New ||
            f.StatusId == (int)AppBudgetApprovalStatuses.Rejected ||
            f.StatusId == (int)AppBudgetApprovalStatuses.ReturnedToAgency);
 }