I’m currently on the task of developing a Sales/CRM application on MVC3.
Since lots of opperations revolve around a given order (that can ve saved and later used) I was wondering some questions.
- I want tabs for a quote for the customer and an internal order view. How can i handle the behaviour so when a client opens a given order he/she can stay within the same order?
- The Order has information to generate various other Excel documents (like supplier invoices and shipping orders) I need to implement a way to “fill up” those forms. The forms are in Excel format, is there any way to “fill” an excel from a C# application and then generate the file?
Thank you.
The first question sounds like a problem of persistence. You can use sessions to persist data across pages. For example, if you have some sort of
Orderclass you can create a newOrderwhen the customer does something that requires it:Later on, you can obtain it using the same mechanism:
Personally, I write some wrappers around the
Sessionto make it strongly typed and so I can unit test it properly. Something along the lines of:Then I can implement it as:
in some concrete class. It becomes easy to mock and unit test as well.