I need some help in deciding the type of objects we should be usign for following scneraio.
I have some information that is stored at Country (table t_country) and State (table t_country_state) level. User is allowed to do operation (update or delete) on multiple records at a time and records are displayed in Grid control.
To work on records user can select
1. Country or
2. Country and any of the States of that Country.
When use selects first option (Country) all operations are done on table t_country. If user selects Country and State only table impacted is t_country_state.
Let me know if someone need more information about this.
Thanks
Vijay,
Go with the 2nd option i.e create different object for both entities. It will stream line your handling and calling both objects based on the selection.
Your code might look like
ddl = dorpdownlist
if(ddl.SelectedValue == "Country")
{
Country objCountry = Country.GetCountry();
objCountry..........
}
else
{
State objState = State.GetState(); // also pass country
}
Hope it helps
Thanks Zafar for your time.
We have decided to go for second approach.
Copyright (c) Marimer LLC