Ejemplo n.º 1
0
        public SalesInvoiceForm(Session session)
        {
            _customerInterface    = new CustomerOperations(session);
            _articleInterface     = new ArticleOperations(session);
            _currencyInterface    = new CurrencyOperations(session);
            _vatInterface         = new VatOperations(session);
            _invoiceTypeInterface = new InvoiceTypeOperations(session);
            InitializeComponent();
            Cursor.Current = Cursors.WaitCursor;
            var custs = _customerInterface.GetSummaries();

            customerBox.DataSource    = custs;
            customerBox.DropDownStyle = ComboBoxStyle.DropDownList;
            customerBox.DisplayMember = "Code";
            var curs = _currencyInterface.GetAll();

            currencyBox.DataSource    = curs;
            currencyBox.DropDownStyle = ComboBoxStyle.DropDownList;
            currencyBox.DisplayMember = "Code";
            var arts     = _articleInterface.GetSummaries();
            var articles = new List <object>();

            foreach (var a in arts)
            {
                articles.Add(a);
            }
            articleBox.DataSource    = articles;
            articleBox.DropDownStyle = ComboBoxStyle.DropDownList;
            articleBox.DisplayMember = "Code";
            var vats = _vatInterface.GetSummaries();

            vatBox.DataSource    = vats;
            vatBox.DropDownStyle = ComboBoxStyle.DropDownList;
            vatBox.DisplayMember = "Code";
            var types = _invoiceTypeInterface.GetAll();

            typeBox.DataSource    = types;
            typeBox.DropDownStyle = ComboBoxStyle.DropDownList;
            typeBox.DisplayMember = "Code";
            var subarts = _articleInterface.GetSubArticlesByArticle(articleBox.GetItemText(articleBox.SelectedItem));

            subarticleBox.DataSource    = subarts;
            subarticleBox.DropDownStyle = ComboBoxStyle.DropDownList;
            subarticleBox.DisplayMember = "Code";
            this.FormBorderStyle        = FormBorderStyle.FixedSingle;
            Cursor.Current = Cursors.Arrow;
        }
Ejemplo n.º 2
0
        public GeneralLedgerForm(Session session, string type)
        {
            _vatInterface           = new VatOperations(session);
            _dimensionTypeInterface = new DimensionTypeOperations(session);
            InitializeComponent();
            Cursor.Current = Cursors.WaitCursor;
            var vats = _vatInterface.GetSummaries();

            vatBox.DataSource    = vats;
            vatBox.DropDownStyle = ComboBoxStyle.DropDownList;
            vatBox.DisplayMember = "Code";
            var ty = _dimensionTypeInterface.GetByName(type);

            maskBox.Text         = @"**Code moet bij type " + type + @" voldoen aan het volgende format: " + ty[0].Mask;
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            Cursor.Current       = Cursors.Arrow;
            Type = type;
        }
Ejemplo n.º 3
0
        public ArticleForm(Session session)
        {
            _supplierInterface     = new SupplierOperations(session);
            _balanceSheetInterface = new BalanceSheetOperations(session);
            _profitLossInterface   = new ProfitLossOperations(session);
            _costCenterInterface   = new CostCenterOperatons(session);
            _vatInterface          = new VatOperations(session);
            InitializeComponent();
            Cursor.Current = Cursors.WaitCursor;
            var sups = _supplierInterface.GetSummaries();

            supplierBox.DataSource    = sups;
            supplierBox.DropDownStyle = ComboBoxStyle.DropDownList;
            supplierBox.DisplayMember = "Code";

            foreach (var g in _profitLossInterface.GetSummaries())
            {
                if (!ledgerBox.Items.Contains(g))
                {
                    ledgerBox.Items.Add(g);
                }
            }

            ledgerBox.DisplayMember = "Code";
            ledgerBox.SelectedIndex = 0;
            ledgerBox.DropDownStyle = ComboBoxStyle.DropDownList;
            var ccs = _costCenterInterface.GetSummaries();

            centerBox.DataSource    = ccs;
            centerBox.DropDownStyle = ComboBoxStyle.DropDownList;
            centerBox.DisplayMember = "Code";
            var vats = _vatInterface.GetSummaries();

            vatBox.DataSource    = vats;
            vatBox.DropDownStyle = ComboBoxStyle.DropDownList;
            vatBox.DisplayMember = "Code";
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            Cursor.Current       = Cursors.Arrow;
        }