Middleware in a nutshell

Communicate with company ERP could be very simple with Mdf.

Using B2MML Manager you can import Production Schedules, export Production Performances, import Product Definitions and Materials and so on.

1public void ImportSample(string fileName)
2{
3    ProductionScheduleB2MMLConnector b2mmlConnector = new ProductionScheduleB2MMLConnector();
4    b2mmlConnector.ImportFromFile(fileName);
5}

As you can see in this c# sample code, calling only one method you could import all data into Mdf tables (SQL Server):

  • Production schedule
  • Production request
  • Segment request
  • Production parameter
  • Personnel requirement (with properties)
  • Equipment requirement (with properties)
  • Material requirement (with properties)
  • Material produced requirement (with properties)
  • Material consumed requirement (with properties)
  • Consumable expected (with properties)

You will have two methods to import B2MML data: ImportFromFile and ImportFromXml. All data will be imported in one transaction.

As you know you can put some other check to verify data in the same transaction:

1public void ImportSample(string fileName)
2{
3    using (TransactionScope transactionScope = new TransactionScope())
4    {
5        ProductionScheduleB2MMLConnector b2mmlConnector = new ProductionScheduleB2MMLConnector();
6        b2mmlConnector.ImportFromFile(fileName);
7        
8        bool someCheck = true// Your check
9        
10        if (someCheck)
11        {
12            transactionScope.Complete();
13        }
14    }
15}