コード例 #1
0
 public void Initialize()
 {
     _middlewareData        = new MiddlewareData();
     _session               = Utilities.CreateValidSession();
     _salesInvoiceConverter = new SalesInvoiceConverter(_session);
     _salesInvoiceInterface = new SalesInvoiceOperations(_session);
 }
コード例 #2
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);
        }
コード例 #3
0
ファイル: DataFunctions.cs プロジェクト: RickSchoeman/Werk
 public DataFunctions(Twinfield form, Session session)
 {
     _customerInterface      = new CustomerOperations(session);
     _supplierInterface      = new SupplierOperations(session);
     _balanceSheetInterface  = new BalanceSheetOperations(session);
     _profitLossInterface    = new ProfitLossOperations(session);
     _articleInterface       = new ArticleOperations(session);
     _salesInvoiceInterface  = new SalesInvoiceOperations(session);
     _costCenterInterface    = new CostCenterOperatons(session);
     _customerConverter      = new CustomerConverter();
     _supplierConverter      = new SupplierConverter();
     _generalLedgerConverter = new GeneralLedgerConverter();
     _articleConverter       = new ArticleConverter();
     _salesInvoiceConverter  = new SalesInvoiceConverter(session);
     _costCenterConverter    = new CostCenterConverter();
     _form    = form;
     _session = session;
 }
コード例 #4
0
        public Twinfield(Session session)
        {
            _customerInterface     = new CustomerOperations(session);
            _supplierInterface     = new SupplierOperations(session);
            _balanceSheetInterface = new BalanceSheetOperations(session);
            _profitLossInterface   = new ProfitLossOperations(session);
            _articleInterface      = new ArticleOperations(session);
            _salesInvoiceInterface = new SalesInvoiceOperations(session);
            _costCenterInterface   = new CostCenterOperatons(session);
            _middlewareData        = new MiddlewareData();
            _session = session;
            InitializeComponent();

            var dataList = new List <ComboxItem <DataTypeEnum> >();

            foreach (var item in Enum.GetValues(typeof(DataTypeEnum)))
            {
                dataList.Add(new ComboxItem <DataTypeEnum>((DataTypeEnum)item, DataTypeDisplayName));
            }

            var functies = new List <string> {
                "None"
            };

            dataVeld.DropDownStyle     = ComboBoxStyle.DropDownList;
            DataComboBox.DataSource    = dataList;
            DataComboBox.DropDownStyle = ComboBoxStyle.DropDownList;
            functie.DataSource         = functies;
            functie.DropDownStyle      = ComboBoxStyle.DropDownList;
            radioButton1.Checked       = false;
            radioButton2.Checked       = true;
            textBox1.Text            = @"Middleware";
            LogBox.Text              = @"Administratie " + _session.Office + @" geladen";
            functieUitvoeren.Enabled = false;
            dataVeld.Enabled         = false;
            functie.Enabled          = false;
            this.FormBorderStyle     = FormBorderStyle.FixedSingle;

            _ldf = new DataFunctions(this, _session);
        }
コード例 #5
0
        public void Initialize()
        {
            var session = Utilities.CreateValidSession();

            _salesInvoiceInterface = new SalesInvoiceOperations(session);
        }