Ejemplo n.º 1
0
 public AccountEditForm(bool isDebit, MoneyDataSet.AccountTypesRow accountType = null, MoneyDataSet.AccountsRow account = null)
 {
     InitializeComponent();
     this.keeper      = MoneyDataKeeper.Instance;
     this.isDebit     = isDebit;
     this.accountType = accountType;
     this.account     = account;
 }
Ejemplo n.º 2
0
 public PlanEditForm(MoneyDataSet.TransactionTemplatesRow template,
                     MoneyDataSet.PlannedTransactionsRow sourcePlan = null, MoneyDataSet.PlannedTransactionsRow destinationPlan = null, bool isCopy = false)
 {
     InitializeComponent();
     this.keeper          = MoneyDataKeeper.Instance;
     this.template        = template;
     this.sourcePlan      = sourcePlan;
     this.destinationPlan = destinationPlan;
     this.isCopy          = isCopy;
 }
Ejemplo n.º 3
0
        public TransactionEditForm(MoneyDataSet.TransactionTemplatesRow template, MoneyDataSet.PlannedTransactionsRow plan = null)
        {
            InitializeComponent();
            this.keeper     = MoneyDataKeeper.Instance;
            this.template   = template;
            this.sourcePlan = plan;

            sourceAccounts = keeper.GetAccounts(template.AccountTypesRowByFK_AccountTypes_Source_TransactionTemplates,
                                                template.ExactSourceAccountType);

            if (template.HasDestinationAccount)
            {
                if (sourcePlan != null)
                {
                    int pairID = sourcePlan.PairReferenceID;
                    sourcePlan = null;

                    // trying to find source and destination plans
                    foreach (MoneyDataSet.PlannedTransactionsRow pairedPlan in keeper.PlannedTransactions.Where(p =>
                                                                                                                ((!p.IsPairReferenceIDNull()) && (p.PairReferenceID != 0) && (p.PairReferenceID == pairID))))
                    {
                        if (pairedPlan.TransactionTypeID.Equals(template.SourceTransactionTypeID))
                        {
                            sourcePlan = pairedPlan;
                        }
                        if (pairedPlan.TransactionTypeID.Equals(template.DestinationTransactionTypeID))
                        {
                            destinationPlan = pairedPlan;
                        }
                    }
                }

                destinationAccounts = keeper.GetAccounts(template.AccountTypesRowByFK_AccountTypes_Destination_TransactionTemplates,
                                                         template.ExactDestinationAccountType);
            }
        }
Ejemplo n.º 4
0
 public CurrencyForm(MoneyDataSet.CurrenciesRow existingItem)
 {
     InitializeComponent();
     this.keeper       = MoneyDataKeeper.Instance;
     this.existingItem = existingItem;
 }
Ejemplo n.º 5
0
 public TemplateForm(MoneyDataSet.TransactionTemplatesRow existingItem)
 {
     InitializeComponent();
     this.keeper       = MoneyDataKeeper.Instance;
     this.existingItem = existingItem;
 }
Ejemplo n.º 6
0
        public CustomMetadataForm()
        {
            InitializeComponent();

            this.keeper = MoneyDataKeeper.Instance;
        }
Ejemplo n.º 7
0
 public TemplateSelectorForm(IEnumerable <MoneyDataSet.TransactionTemplatesRow> templates)
 {
     InitializeComponent();
     this.keeper    = MoneyDataKeeper.Instance;
     this.templates = templates;
 }
Ejemplo n.º 8
0
 public AccountCorrectionForm(MoneyDataSet.AccountsRow selectedAccount = null)
 {
     InitializeComponent();
     existingAccount = selectedAccount;
     keeper          = MoneyDataKeeper.Instance;
 }
Ejemplo n.º 9
0
 public AccountTypeForm(MoneyDataSet.AccountTypesRow existingItem)
 {
     InitializeComponent();
     this.keeper       = MoneyDataKeeper.Instance;
     this.existingItem = existingItem;
 }