Click here to Skip to main content

Design and Architecture

 
QuestionWeb services theory PinmemberBytescream3-Dec-12 10:24 
AnswerRe: Web services theory PinmemberRaj Champaneriya3-Dec-12 18:41 
AnswerRe: Web services theory Pinmemberjschell4-Dec-12 8:17 
QuestionConsuming perl webservice in .Net Pinmemberernestohari1-Dec-12 22:38 
AnswerRe: Consuming perl webservice in .Net PinmemberEddy Vluggen2-Dec-12 2:57 
QuestionThoughts on Authorization in a Hierarchical User Structure. PinmemberBrady Kelly1-Dec-12 1:56 
AnswerRe: Thoughts on Authorization in a Hierarchical User Structure. PinmemberEddy Vluggen2-Dec-12 2:56 
GeneralRe: Thoughts on Authorization in a Hierarchical User Structure. PinmemberBrady Kelly2-Dec-12 3:06 
GeneralRe: Thoughts on Authorization in a Hierarchical User Structure. PinmemberEddy Vluggen2-Dec-12 3:34 
QuestionA MEF Question - Refering base classes without adding reference to a dll. PinmemberJohn T.Emmatty29-Nov-12 22:25 
AnswerRe: A MEF Question - Refering base classes without adding reference to a dll. PinmemberEddy Vluggen1-Dec-12 5:30 
QuestionHand Gesture Recognition System PinmemberMember 916988728-Nov-12 3:00 
AnswerRe: Hand Gesture Recognition System PinmemberEddy Vluggen1-Dec-12 5:27 
QuestionMoving code from a Window/UserControl to outside in order to make it reusable! PinmemberRags151227-Nov-12 6:48 
Hi,
 
I have a usercontrol in my WPF application, and there is a code behind file suppose EmployeeEditor.xaml.cs which has some code to modify.
For e.g;
I have a Employee as defined below
 
Class Employee
{
      public string Name {get; set;}
      public uint Id   {get; set;}
}
 
I have a UserControl to edit the Employee information which has EmployeeEditor.xaml and EmployeeEditor.xaml.cs
 
There are methods in EmployeeEditor class to modify the list of employee
- AddEmployee()
- RemoveEmployee()
- RenameEmployee()
 
These methods has business logic to update the information in the data object/database.
 
The life of EmployeeEditor class is till the user control is displayed and it dies on closing it.
 
I wanted to move above methods outside this class, so that they can be used elsewhere in a functionality such as Undo/Redo which will create/delete an employee using AddEmployee/RemoveEmployee methods.
 
One solution is to move those methods to a helper which i don't feel to be appropiate as I need to pass all the dependencies of AddEmployee() method as a parameter.
Other solution can be to create a separate class to which will perform all the operations and keep the dependencies.
 
Please let me know if this problem fits into any design pattern and what could be the better solution?
 
Thanks in advance!
AnswerRe: Moving code from a Window/UserControl to outside in order to make it reusable! PinmemberEddy Vluggen1-Dec-12 5:25 
GeneralRe: Moving code from a Window/UserControl to outside in order to make it reusable! PinmemberRags15129-Dec-12 4:46 
Questionhow to show database table in a class diagram PinmemberQobacha24-Nov-12 22:49 
AnswerRe: how to show database table in a class diagram Pinmemberjschell25-Nov-12 5:05 
AnswerRe: how to show database table in a class diagram Pinmembermanoranjan25-Nov-12 5:46 
AnswerRe: how to show database table in a class diagram PinmemberVishwaKL27-Nov-12 20:51 
GeneralFile Directories Pinmemberstrrom78-Nov-12 17:03 
GeneralRe: File Directories PinmvpRichard MacCutchan8-Nov-12 23:41 
GeneralRe: File Directories Pinmemberstrrom79-Nov-12 18:08 
GeneralRe: File Directories PinmvpRichard MacCutchan9-Nov-12 23:25 
QuestionUsing WCF and RESTFUL api in a legacy system PinmentorMd. Marufuzzaman5-Nov-12 1:24 
AnswerRe: Using WCF and RESTFUL api in a legacy system PinmemberEddy Vluggen5-Nov-12 2:24 
GeneralRe: Using WCF and RESTFUL api in a legacy system PinmentorMd. Marufuzzaman5-Nov-12 5:07 
GeneralRe: Using WCF and RESTFUL api in a legacy system PinmemberEddy Vluggen5-Nov-12 5:23 
GeneralRe: Using WCF and RESTFUL api in a legacy system PinmentorMd. Marufuzzaman5-Nov-12 7:04 
GeneralRe: Using WCF and RESTFUL api in a legacy system PinmemberEddy Vluggen5-Nov-12 7:49 
GeneralRe: Using WCF and RESTFUL api in a legacy system PinmentorMd. Marufuzzaman5-Nov-12 8:21 
QuestionCommunication mechanism Pinmemberrupeshkp7285-Nov-12 1:10 
AnswerRe: Communication mechanism PinmvpAbhinav S5-Nov-12 1:43 
GeneralRe: Communication mechanism Pinmemberrupeshkp7285-Nov-12 1:46 
GeneralRe: Communication mechanism PinmvpAbhinav S5-Nov-12 1:51 
AnswerRe: Communication mechanism PinmemberH.Brydon29-Nov-12 9:52 
Questionwindows 8 desktop application PinmemberMenelaos Vergis30-Oct-12 23:40 
AnswerRe: windows 8 desktop application PinmemberEddy Vluggen31-Oct-12 0:38 
GeneralRe: windows 8 desktop application PingroupEgomedia3-Nov-12 19:32 
GeneralRe: windows 8 desktop application PingroupEgomedia3-Nov-12 19:36 
AnswerRe: windows 8 desktop application PinprotectorPete O'Hanlon31-Oct-12 1:03 
GeneralRe: windows 8 desktop application PinmemberMenelaos Vergis31-Oct-12 1:37 
GeneralRe: windows 8 desktop application PinprotectorPete O'Hanlon31-Oct-12 1:42 
GeneralRe: windows 8 desktop application PinmemberMenelaos Vergis31-Oct-12 2:13 
GeneralRe: windows 8 desktop application PinprotectorPete O'Hanlon31-Oct-12 2:54 
QuestionInventory Control App. - Looking For Suggestions PinmemberMatt U.30-Oct-12 8:36 
AnswerRe: Inventory Control App. - Looking For Suggestions Pinmemberjschell30-Oct-12 10:16 
GeneralRe: Inventory Control App. - Looking For Suggestions PinmemberMatt U.31-Oct-12 1:54 
GeneralRe: Inventory Control App. - Looking For Suggestions Pinmemberjschell31-Oct-12 8:49 
GeneralRe: Inventory Control App. - Looking For Suggestions PinmemberMatt U.31-Oct-12 9:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.140821.2 | Last Updated 22 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid