0

I am using Visual Studio 2010, Sql server Express Edition & C#.

I have develop a simple Master Detail application (mostly with the help of experts help from this forum) An Order system, and now I want to go one step further from simple application to N-Tier version.

Did some search on net and came up with Tutorial which guides me enough to create Order class which contains methods:

  • DataTable GetOrders(int OrdId) Retrieve order based on ID provided
  • int SaveData(string CustID, DateTime ShpDate, DateTime OrdDate) To save the order, This method has all Insert, Update, Delete command in it, using SqlAdapter.

Following the same pattern I've also created OrderDetails class for setting up line items for each order. OrderDetails also contains methods GetOrder & SaveData...

Now the main problem, what should I do to save the whole Order with OrderDetails? I know this is something I should wrap up in Transaction...But not sure how to do? any link/tutorial/sample/guidance will be highly appreciated.

I've not posted any code due to make this post clear...If required I will post the code immediately.

Thanks

Ahmed

6
  • Yes I think you should add some code and precises your question - what is your problem? Otherwise I would recommend codereview.stackexchange.com
    – Jocke
    Jan 2, 2014 at 8:12
  • Is this WinForms application or asp.net application
    – Damith
    Jan 2, 2014 at 8:30
  • You can check link
    – Damith
    Jan 2, 2014 at 8:36
  • @Jocke ok I will add code soon...
    – Ahmed
    Jan 2, 2014 at 8:55
  • @Damith This is WinForms Application, and thanks for the link I am checking it.
    – Ahmed
    Jan 2, 2014 at 8:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.