Under UI Layer
clsRegistraction register=new ClsRegistration();
string FirstName=txtFirstName.Text;
string LastName=txtLastName.Text;
string Address=txtAddress.Text;
register.InsertDetails(FirstName,LastName,Address);
Now I have one method in ClsRegistration class i.e InsertDetails()
so I can pass values like this.
Under BAL
Public void InsertDetails(string FirstName,string LastName,string Address)
{
------some code----
}
---------------------------------------------------------------------------
Now I am using List.
List
{
new clsRegistration { FirstName=txtFirstName.Text, LastName= txtLastName.Text,Address=txtAddress.Text};
}
Now how to pass these list values that InsertDetails() like above procedure
Should I create class object and call the method ?
is it compalsary?

Pravin MorePosted Sep 20, 2011, 5:53 AM
pass list value as parameter like this
foreach(clsRegistration cls in register )
{
clsRegistraction registerObj =new ClsRegistration();
registerObj.InsertDetails(cls.FirstName,cls.LastName,cls.Address);
}
hope it will solve your problem.
Thanx,
Pravin.
Mahesh BabuPosted Sep 20, 2011, 7:08 AM