Click here to Skip to main content
15,913,685 members
Home / Discussions / C#
   

C#

 
GeneralRe: Set MdiParent form BackgroundWorker Pin
Rob Philpott4-Feb-10 2:33
Rob Philpott4-Feb-10 2:33 
GeneralRe: Set MdiParent form BackgroundWorker Pin
ddecoy4-Feb-10 2:56
ddecoy4-Feb-10 2:56 
GeneralRe: Set MdiParent form BackgroundWorker Pin
Dave Kreskowiak4-Feb-10 3:37
mveDave Kreskowiak4-Feb-10 3:37 
GeneralRe: Set MdiParent form BackgroundWorker Pin
ddecoy4-Feb-10 4:47
ddecoy4-Feb-10 4:47 
GeneralRe: Set MdiParent form BackgroundWorker Pin
Dave Kreskowiak4-Feb-10 12:41
mveDave Kreskowiak4-Feb-10 12:41 
QuestionHow i implement Strategy Design pattern in following case Pin
pekhaleyogesh3-Feb-10 23:26
pekhaleyogesh3-Feb-10 23:26 
AnswerRe: How i implement Strategy Design pattern in following case Pin
J4amieC3-Feb-10 23:58
J4amieC3-Feb-10 23:58 
GeneralRe: How i implement Strategy Design pattern in following case Pin
pekhaleyogesh4-Feb-10 0:21
pekhaleyogesh4-Feb-10 0:21 
Hi J4amieC
Thanks for quick response....
You ans sounds logical, in fact i tried workout well !!!!

but my application requirement is that from base class i need to access the method like

DatabaseWrapper db = new SqlDatabaseWrapper();

i am having another solution of it using Strategy design pattern like

i have
1)ItrnactionalInterface in that startTraction.....
Then i have two concrete class
2)TrancationalDatabase : ItrnactionalInterface // implements transaction
3)Non TrancationalDatabase : ItrnactionalInterface // throwing exception

now in base class i defined it as

abstract class DatabaseWrapper
ItrnactionalInterface tr
// here i had method
void StartTranction
{
tr.StartTranction();
}




and in SqlDatabaseWrapper
tr = new TrancationalDatabase ();

and in ExcelDatabaseWrraper
tr = new NonTrancationalDatabase();


So when i do like :

DatabaseWrapper db = new SqlDatabaseWarpper();
db.StartTransction() // this will call the method from TrancationalDatabase

and if i


DatabaseWrapper db = new ExcelDatabaseWrraper();
db.StartTransction() // this will call the method from NonTrancationalDatabase


This working fine.. according to the strategy design pattern....

but the problem is the object of Transaction which i create in TrancationalDatabase
that i have to use in the SqlDatabaseWarpper.

Now even we can implement as property and access this....

but the problem is come when i am having OracleDatabaseWrapper, MySqlDatabaseWrapper....

Can you suggest any think how i can do this?

Yogesh Pekhale
pekhaleyogesh@gmail.com

AnswerRe: How i implement Strategy Design pattern in following case Pin
Rob Philpott4-Feb-10 0:21
Rob Philpott4-Feb-10 0:21 
GeneralRe: How i implement Strategy Design pattern in following case Pin
pekhaleyogesh4-Feb-10 0:25
pekhaleyogesh4-Feb-10 0:25 
AnswerRe: How i implement Strategy Design pattern in following case Pin
Not Active4-Feb-10 1:55
mentorNot Active4-Feb-10 1:55 
GeneralRe: How i implement Strategy Design pattern in following case Pin
pekhaleyogesh4-Feb-10 2:21
pekhaleyogesh4-Feb-10 2:21 
GeneralRe: How i implement Strategy Design pattern in following case Pin
pekhaleyogesh4-Feb-10 2:30
pekhaleyogesh4-Feb-10 2:30 
GeneralRe: How i implement Strategy Design pattern in following case Pin
Not Active4-Feb-10 2:41
mentorNot Active4-Feb-10 2:41 
Questiontying an event to dynamically created radio buttons [Solved] Pin
Wamuti3-Feb-10 22:38
Wamuti3-Feb-10 22:38 
AnswerRe: tying an event to dynamically created radio buttons Pin
Zar Ni3-Feb-10 22:57
Zar Ni3-Feb-10 22:57 
AnswerRe: tying an event to dynamically created radio buttons Pin
Luc Pattyn4-Feb-10 0:14
sitebuilderLuc Pattyn4-Feb-10 0:14 
Questioncreate LogError file(C# Coding) [modified] for WindowsApplication Pin
jojoba20103-Feb-10 22:06
jojoba20103-Feb-10 22:06 
AnswerRe: create LogError file(C# Coding) Pin
Zar Ni3-Feb-10 22:16
Zar Ni3-Feb-10 22:16 
QuestionRe: create LogError file(C# Coding) Pin
jojoba20103-Feb-10 22:38
jojoba20103-Feb-10 22:38 
AnswerRe: create LogError file(C# Coding) Pin
Zar Ni3-Feb-10 22:42
Zar Ni3-Feb-10 22:42 
AnswerRe: create LogError file(C# Coding) [modified] for WindowsApplication Pin
Wamuti3-Feb-10 23:00
Wamuti3-Feb-10 23:00 
QuestionRe: create LogError file(C# Coding) [modified] for WindowsApplication Pin
jojoba20103-Feb-10 23:55
jojoba20103-Feb-10 23:55 
AnswerRe: create LogError file(C# Coding) [modified] for WindowsApplication Pin
Luc Pattyn4-Feb-10 0:18
sitebuilderLuc Pattyn4-Feb-10 0:18 
AnswerRe: create LogError file(C# Coding) [modified] for WindowsApplication Pin
Zar Ni4-Feb-10 13:41
Zar Ni4-Feb-10 13:41 

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

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