Integrating SharePoint with Dynamics Navision

I was working on a SharePoint project for automating financial and human resource processes. One of the requirements is to integrate MOSS 2007 with MS Dynamics Navision. I had to do this integration at low cost and without any adapter.
To do such a thing i have done the followings :
  • Creating temporary tables on Navision SQL database.
  • Creating a dbml schema from the need tables in the SQL database of Navision. Theses represent Linq to SQl classes. (great tutorial about using Linq to SQL)
  • Creating a generic repository to use the Linq to SQL generated classes to do CRUD operations and search. (Code for Generic Repository)
  • Installing Navision NAS (Tutorial about NAS)
  • Developing NAS application to synchronize the temporary tables with the real ones on Navision.
One all things done , you can use them within SharePoint to extract employees data , insert new data …

Using SPLongOperation

Some SharePoint operations takes too much time to finish. After theses operations finish we need to redirect the user to another page or to the same one. SharePoint object model offers the SPLongOperation class that shows an “In progress page” that can be personalized. This page is similar to the one displayed when creating a new SharePoint site. The code snippet below shows how we can use this class and personalize this page.
   1:  using (SPLongOperation  operation = new SPLongOperation(this.Page))
   2:              {
   3:                  operation.LeadingHTML = "Operation ";
   4:                  operation.TrailingHTML = "Please wait while this operation finishes";
   5:                  operation.Begin();
   7:  // Your code here ! 
   9:                  operation.End(UrlToRedirectTo);
  11:              }