Example #1
0
        public AccountsForm()
        {
            manager = MyFundsManager.SingletonInstance;
            InitializeComponent();

            //cbType.DataSource = tipos;
        }
Example #2
0
        public MovementsForm(MyFundsManager _manager)
        {
            manager = _manager;
            movements = new List<Movement>();
            InitializeComponent();
            textBox1.Text = 0.ToString();
            textBox2.Text = 0.ToString();
            _color = new Color();
            /*DateTime moment = DateTime.Today;
            String last_reference = "";

            try
            {
                last_reference = manager.My_db.AccountingMovements.OrderByDescending(ac => ac.Id).First().reference;
            }
            catch (Exception e)
            {
                last_reference = "GL170000";
            }
            
            last_reference = last_reference.Substring(4);
            int reference_number = Convert.ToInt32(last_reference) + 1;
            String new_reference = "GL" + moment.ToString("yy") + Convert.ToString(reference_number);
            textBox5.Text = new_reference;*/
            /*textBox1.TextChanged += OnDebitCreditChanged;
            textBox2.TextChanged += OnDebitCreditChanged;*/
            comboBox1.SelectedIndexChanged += OnSelectedIndexChanged;
            listView1.FullRowSelect = true;
        }
        public BankingAccountsForm()
        {
            manager = MyFundsManager.SingletonInstance;
            InitializeComponent();

            cbBank.DataSource    = manager.OwnBanks();
            cbBank.DisplayMember = "Name";
            cbBank.ValueMember   = "Id";
        }
 public AddendumsLauncher()
 {
     try
     {
         manager = MyFundsManager.SingletonInstance;
         InitializeComponent();
     }
     catch (Exception _ex)
     {
         Console.WriteLine("Error in AddendumsLauncher.AddendumsLauncher: " + _ex.Message);
     }
 }
 public DisbursementsForm()
 {
     try
     {
         manager = MyFundsManager.SingletonInstance;
         InitializeComponent();
     }
     catch (Exception _ex)
     {
         Console.WriteLine("Error in DisbursementsForm.DisbursementsForm: " + _ex.Message);
     }
 }
Example #6
0
 public BookReportForm()
 {
     try
     {
         manager = MyFundsManager.SingletonInstance;
         InitializeComponent();
     }
     catch (Exception _ex)
     {
         Console.WriteLine("Error in BookReportForm.BookReportForm: " + _ex.Message);
     }
 }
Example #7
0
 public AddendumsForm()
 {
     try
     {
         manager = MyFundsManager.SingletonInstance;
         InitializeComponent();
         bookings = new List <Disbursement>();
     }
     catch (Exception _ex)
     {
         Console.WriteLine("Error in AddendumsForm.AddendumsForm: " + _ex.Message);
     }
 }
Example #8
0
        public BondsList()
        {
            manager = MyFundsManager.SingletonInstance;
            InitializeComponent();
            listView1.FullRowSelect = true;

            foreach (BondsTFF _bond in manager.My_db.BondsTFFs)
            {
                Decimal      amount  = (decimal)_bond.pieces * _bond.price;
                string[]     row     = { _bond.number, Convert.ToString(_bond.pieces), string.Format("€{0:N2}", amount), Convert.ToString(_bond.issued) };
                ListViewItem my_item = new ListViewItem(row);
                listView1.Items.Add(my_item);
            }
        }
Example #9
0
        public GeneralLedgerForm()
        {
            manager           = MyFundsManager.SingletonInstance;
            movements         = new List <Movement>();
            movementsToDelete = new List <Movement>();
            InitializeComponent();
            textBox1.Text           = 0.ToString();
            textBox2.Text           = 0.ToString();
            _color                  = new Color();
            listView1.FullRowSelect = true;

            cbAccount.SelectedIndexChanged    += OnAccountChanged;
            cbSubaccount.SelectedIndexChanged += OnSubAccountChanged;
        }
Example #10
0
 public BondsTFFForm()
 {
     try
     {
         manager   = MyFundsManager.SingletonInstance;
         investors = new List <InvestorForBond>();
         InitializeComponent();
         listView1.FullRowSelect = true;
         check_pieces            = 0;
         _color = new Color();
     }
     catch (Exception _ex)
     {
         Console.WriteLine("Error in BondsForm.BondsForm: " + _ex.Message);
     }
 }
Example #11
0
        public MovementReportForm()
        {
            try
            {
                manager = MyFundsManager.SingletonInstance;
                InitializeComponent();

                dtpFrom.Value = DateTime.Now.AddMonths(-1).Date;
                dtpTo.Value   = DateTime.Now.Date.AddHours(23).AddMinutes(59).AddSeconds(59);

                loadData();
            }
            catch (Exception _ex)
            {
                Console.WriteLine("Error at MovementReportForm.MovementReportForm: " + _ex.Message);
            }
        }
Example #12
0
        public InvestmentsForm()
        {
            try
            {
                disbursement = 0;
                profit       = 0;

                //disbursements = new List<DisbursementForInvestement>();
                disbursements = new List <Disbursement>();

                toDelete = new List <Disbursement>();

                manager = MyFundsManager.SingletonInstance;
                InitializeComponent();
            }
            catch (Exception _ex)
            {
                Console.WriteLine("Error in InvestmentsForm.InvestmentsForm: " + _ex.Message);
            }
        }
Example #13
0
        public GenerateBondInterestForm()
        {
            manager = MyFundsManager.SingletonInstance;
            InitializeComponent();
            total_bond_interest = 0;
            total_tff_interest  = 0;
            foreach (BondsTFF _bond in manager.My_db.BondsTFFs)
            {
                DateTime now       = DateTime.Now;
                var      startDate = new DateTime(now.Year, now.Month, 1);
                var      endDate   = startDate.AddMonths(1).AddDays(-1);
                int      days      = (int)(endDate - startDate).TotalDays;

                Decimal amount           = (Decimal)_bond.pieces * _bond.price;
                Decimal interest_on_bond = amount * (decimal)_bond.interest_on_bond / 100 * days / 360;
                Decimal interest_tff     = amount * (decimal)_bond.interest_tff_contribution / 100 * days / 360;

                total_bond_interest += interest_on_bond;
                total_tff_interest  += interest_tff;

                string[]     row     = { _bond.number, string.Format("€{0:N2}", amount), string.Format("€{0:N2}", interest_on_bond), string.Format("€{0:N2}", interest_tff) };
                ListViewItem my_item = new ListViewItem(row);
                my_item.Font = new Font(listView1.Font, FontStyle.Bold);
                listView1.Items.Add(my_item);
                foreach (BondsTFFInvestor _investor in _bond.BondsTFFInvestors)
                {
                    String  name                    = manager.My_db.Investors.Find(_investor.FK_BondsInvestors_Investors).name;
                    Decimal second_amount           = (Decimal)_investor.quantity * _bond.price;
                    Decimal second_interest_on_bond = second_amount * (decimal)_bond.interest_on_bond / 100 * days / 360;
                    Decimal second_interest_tff     = second_amount * (decimal)_bond.interest_tff_contribution / 100 * days / 360;

                    string[]     second_row  = { name, string.Format("€{0:N2}", second_amount), string.Format("€{0:N2}", second_interest_on_bond), string.Format("€{0:N2}", second_interest_tff) };
                    ListViewItem second_item = new ListViewItem(second_row);
                    listView1.Items.Add(second_item);
                }
            }
        }
Example #14
0
 public BanksForm()
 {
     manager = MyFundsManager.SingletonInstance;
     InitializeComponent();
 }
Example #15
0
 private void BondsTFAMList_Load(object sender, EventArgs e)
 {
     manager = MyFundsManager.SingletonInstance;
     this.bondsTFAMTableAdapter.FillByFundId(this.fundsDBDataSet.BondsTFAM, manager.Selected);
 }
Example #16
0
 public UnknownRoutine()
 {
     manager = MyFundsManager.SingletonInstance;
     InitializeComponent();
 }
Example #17
0
 public OtherDetailsForm()
 {
     manager = MyFundsManager.SingletonInstance;
     InitializeComponent();
 }
Example #18
0
 public UnderlyingDebtorsForm()
 {
     manager = MyFundsManager.SingletonInstance;
     InitializeComponent();
 }
 public ServiceSupplierForm()
 {
     manager = MyFundsManager.SingletonInstance;
     InitializeComponent();
 }
 public ShareholdersForm()
 {
     manager = MyFundsManager.SingletonInstance;
     InitializeComponent();
 }
Example #21
0
 public SubaccountsForm()
 {
     manager = MyFundsManager.SingletonInstance;
     InitializeComponent();
 }