internal void SplitAccount(int value, EntryExpenses model)
 {
     PerformTransaction(model);
     for (int i = 1; i < value; i++)
     {
         model.Date          = model.Date.AddMonths(1);
         model.CaptionRepeat = $"({i+1}/{value})";
         PerformTransaction(model);
         Save(model.Clone());
     }
 }
        public FrmEntryExpenses(EntryExpenses entry, ApplicationDbContext context) : this(entry.EntryType, context)
        {
            nupValue.Value      = Convert.ToDecimal(entry.Value);
            this.entryType      = entry.EntryType;
            dtDate.Value        = entry.Date;
            txtDescription.Text = entry.Description;
            LoadCategories();
            LoadPaymanetMethod();
            cbCategoria.SelectedIndex = cbCategoria.FindString(entry.Category.Description);

            if (entry.PaymentMethod is Account)
            {
                cbPaymentMethod.SelectedIndex = cbPaymentMethod.FindString($"{controller.GenerateCaptionHolder(entry.PaymentMethod.Holder)} conta: {((Account)entry.PaymentMethod).Bank}");
            }
            else
            {
                cbPaymentMethod.SelectedIndex = cbPaymentMethod.FindString($"{controller.GenerateCaptionHolder(entry.PaymentMethod.Holder)} cartão: {((CreditCard)entry.PaymentMethod).Issuer}");
            }

            if (entry.Category.SubCategories.Count != 0)
            {
                cbSubCategoria.SelectedIndex = cbSubCategoria.FindString(entry.Category.SubCategories[0].Description);
            }

            this.isEditMode = true;
            btnSave.Enabled = true;
            this.Model      = entry.Clone();
            this.OldModel   = entry;

            nupValue.Focus();
            cbCategoria.Enabled     = false;
            cbSubCategoria.Enabled  = false;
            cbPaymentMethod.Enabled = false;
            ckRepeat.Enabled        = false;
            nupTimes.Enabled        = false;
        }