One UI for two business objects

Posted by JC on Stack Overflow See other posts from Stack Overflow or by JC
Published on 2010-06-07T19:12:08Z Indexed on 2010/06/07 19:22 UTC
Read the original article Hit count: 147

Filed under:
|

I have an order edit and quote edit screen that are very similar. I want to try to avoid code like this:

if (order is Order)
    SetupScreenForOrder();
if (order is Quote)
    SetupScreenForQuote();

But maintaining two screens is not good either. If I create some common interface between a Quote and Order then how do you deal with fields like OrderNumber or QuoteDate?

What's the best way to handle this?

© Stack Overflow or respective owner

Related posts about c#

Related posts about object-oriented-design