P
parez
I am planning to make my winforms implement an interface representing
the data on the forms.
And the interface will be passed to a class which will contain the
data to be populated on the winforms.I am planning to use reflection
to the populate the winforms.
The reason why i am doing it is to keep the separate the data classes
and UI.
In future I mite have to develop an asp.net Application.(all i will
have to do is create webforms which implemtn the interface).
Please comment. ANd TIA
An example of the class which contains data for the AddressForm is
below.
public class AddressRequest
{
public Address()
{
}
[FormMapper("StreetAddress")]
public string StreetAddress { get; set; }
[FormMapper("Address2")]
public string UnitNumber { get; set; }
[FormMapper("City")]
public string City { get; set; }
[FormMapper("State")]
public string State { get; set; }
[FormMapper("Zip")]
public string zip { get; set; }
}
public interface IAddresss
{
string StreetAddress;
string Address2;
string city;
string state;
strring zip;
string country;
}
the data on the forms.
And the interface will be passed to a class which will contain the
data to be populated on the winforms.I am planning to use reflection
to the populate the winforms.
The reason why i am doing it is to keep the separate the data classes
and UI.
In future I mite have to develop an asp.net Application.(all i will
have to do is create webforms which implemtn the interface).
Please comment. ANd TIA
An example of the class which contains data for the AddressForm is
below.
public class AddressRequest
{
public Address()
{
}
[FormMapper("StreetAddress")]
public string StreetAddress { get; set; }
[FormMapper("Address2")]
public string UnitNumber { get; set; }
[FormMapper("City")]
public string City { get; set; }
[FormMapper("State")]
public string State { get; set; }
[FormMapper("Zip")]
public string zip { get; set; }
}
public interface IAddresss
{
string StreetAddress;
string Address2;
string city;
string state;
strring zip;
string country;
}