Esempio 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;
        }
Esempio n. 2
0
        public SupplierForm(Session session)
        {
            _countryInterface       = new CountryOperations(session);
            _dimensionTypeInterface = new DimensionTypeOperations(session);
            InitializeComponent();
            Cursor.Current = Cursors.WaitCursor;
            var countries = _countryInterface.GetAll().OrderBy(o => o.Name).ToList();

            countryBox.DataSource    = countries;
            countryBox.DropDownStyle = ComboBoxStyle.DropDownList;
            countryBox.DisplayMember = "Name";
            countryBox.SelectedIndex = countryBox.FindStringExact("Nederland");
            var types = _dimensionTypeInterface.GetByName("CRD");

            maskBox.Text         = @"**Code moet voldoen aan het volgende format : " + types[0].Mask;
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            Cursor.Current       = Cursors.Arrow;
        }