Exemplo n.º 1
0
        public Session Login(string loginServerUrl, string user, string password, string organisation)
        {
            Console.WriteLine("Log in");
            var sessionService = new SessionService(clientFactory);

            _session = sessionService.Logon(loginServerUrl, user, password, organisation);
            if (_session == null)
            {
                Console.WriteLine("Failed to log in to organisation {0} with user {1} on {2}.", organisation, user,
                                  loginServerUrl);
                return(null);
            }

            Console.WriteLine("Logged in to organisation {0} with user {1} on {2}.", organisation, user,
                              loginServerUrl);
            Console.WriteLine();
            _customerInterface = new CustomerOperations(_session);
            _supplierInterface = new SupplierOperations(_session);
//            _generalLedgerInterface = new GeneralLedgerOperations(_session);
            _articleInterface       = new ArticleOperations(_session);
            _salesInvoiceInterface  = new SalesInvoiceOperations(_session);
            _costCenterInterface    = new CostCenterOperatons(_session);
            _costCenterConverter    = new CostCenterConverter();
            _generalLedgerConverter = new GeneralLedgerConverter();
            _dimensionTypeInterface = new DimensionTypeOperations(_session);
            _balanceSheetInterface  = new BalanceSheetOperations(_session);
            _countryOperations      = new CountryOperations(_session);
            _customerConverter      = new CustomerConverter();
            _supplierConverter      = new SupplierConverter();
            _articleConverter       = new ArticleConverter();
            _salesInvoiceConverter  = new SalesInvoiceConverter(_session);
            return(_session);
        }
Exemplo n.º 2
0
        public CostCenterForm(Session session)
        {
            _dimensionTypeInterface = new DimensionTypeOperations(session);
            InitializeComponent();
            Cursor.Current = Cursors.Arrow;
            var types = _dimensionTypeInterface.GetByName("KPL");

            maskBox.Text         = @"**Code moet voldoen aan het volgende format : " + types[0].Mask;
            Cursor.Current       = Cursors.Arrow;
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
        }
Exemplo n.º 3
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;
        }
Exemplo n.º 4
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;
        }