Exemple #1
0
        /// <summary>
        /// The default constructor of the orders controller
        /// getting the DI connection configuration, initializing interfaces
        /// and connecting to ERP.
        /// </summary>
        public OrdersController()
        {
            // Get connection details from configuration file.
            var confPath = Path.Combine(
                HttpRuntime.AppDomainAppPath,
                "Configuration");

            var connectionPath = File.ReadAllText(
                Path.Combine(
                    confPath,
                    "AlalaDocuments.conf"));

            var connection   = JsonConvert.DeserializeObject <DiConnectionModel>(connectionPath);
            var passwordPath = Path.Combine(
                confPath,
                "AlalaDocuments.dat");

            _connector = new DiConnectionMockup(connection, passwordPath); // TODO: Turn this to the actual controller for integration testing.

            _connector.Connect();

            _orders = new OrdersMockup(_connector); // TODO: Turn this to the actual controller for integration testing.
        }
Exemple #2
0
 /// <summary>
 /// Default constructor of orders controller
 /// initializing company DI object.
 /// </summary>
 /// <param name="connection">An interface represents the DI connection
 /// to be used for initializing the DI company object.</param>
 public Orders(IDiConnection connection)
 {
     _company = connection.Company;
 }
Exemple #3
0
 /// <summary>
 /// The default constructor of the business partner class.
 /// </summary>
 /// <param name="connection">An interface of SAP DI connection to be
 /// used for handling business partner objects.</param>
 public BusinessPartners(IDiConnection connection)
 {
     _company = connection.Company;
     _utility = new BusinessPartnerUtility();
 }
Exemple #4
0
 /// <summary>
 /// Default constructor of invoices mockup.
 /// </summary>
 /// <param name="connection">An interface to the DI connection.</param>
 public InvoicesMockup(IDiConnection connection)
 {
 }
Exemple #5
0
 /// <summary>
 /// Default constructor of incoming payments controller
 /// initializing company DI object.
 /// </summary>
 /// <param name="connection">An interface represents the DI connection
 /// to be used for initializing the DI company object.</param>
 public OutgoingPayments(IDiConnection connection)
 {
     _company = connection.Company;
     _utility = new OutgoingPaymentUtility();
 }
Exemple #6
0
 /// <summary>
 /// Default constructor of journal entries controller
 /// initializing company DI object.
 /// </summary>
 /// <param name="connection">An interface represents the DI connection
 /// to be used for initializing the DI company object.</param>
 public JournalEntries(IDiConnection connection)
 {
     _company = connection.Company;
 }
Exemple #7
0
 /// <summary>
 /// Default constructor of journal entries mockup.
 /// </summary>
 /// <param name="connection">An interface to the DI connection.</param>
 public JournalEntriesMockup(IDiConnection connection)
 {
 }
Exemple #8
0
 /// <summary>
 /// Default constructor of outgoing payments mockup.
 /// </summary>
 /// <param name="connection">An interface to the DI connection.</param>
 public OutgoingPaymentsMockup(IDiConnection connection)
 {
 }
Exemple #9
0
 /// <summary>
 /// Default constructor of invoices controller
 /// initializing company DI object.
 /// </summary>
 /// <param name="connection">An interface represents the DI connection
 /// to be used for initializing the DI company object.</param>
 public Invoices(IDiConnection connection)
 {
     _company = connection.Company;
 }
Exemple #10
0
 /// <summary>
 /// Default constructor of orders mockup.
 /// </summary>
 /// <param name="connection">An interface to the DI connection.</param>
 public OrdersMockup(IDiConnection connection)
 {
 }
 /// <summary>
 /// The default constructor of the business partner mockup class.
 /// </summary>
 /// <param name="connection">An interface of SAP DI connection to be
 /// used for handling business partner objects.</param>
 public BusinessPartnersMockup(IDiConnection connection)
 {
 }
Exemple #12
0
 /// <summary>
 /// Default constructor of incoming payments mockup.
 /// </summary>
 /// <param name="connection">An interface to the DI connection.</param>
 public IncomingPaymentsMockup(IDiConnection connection)
 {
 }