I defined a class called bundlecontrol
public class BundleControl
{
private BundleControl()
{
//
}
private static string dbConnectionString()
{
return ConfigurationManager.AppSettings["Main.ConnectionString"];
}
static public BundleControlEntity Get(int bundlecode)
{
DataAccessAdapter adapter = new DataAccessAdapter(dbConnectionString());
BundleControlEntity bundle = new BundleControlEntity(bundlecode);
adapter.Dispose();
return bundle;
}
}
I want to access the entity fields.
BundleControlEntity bundle = BundleControl.Get(5);
int testcopies = Convert.ToInt32(bundle.Copies);
int testcuttoff = Convert.ToInt32(bundle.Cutoff);
int minpages = Convert.ToInt32(bundle.MinPages);
int maxpages = Convert.ToInt32(bundle.MaxPages);
The problem is that m not getting the required values.
when i check that database:
i got the record.
Id minpages maxpages copies cutoff
5 68 104 50 70
i just want to know....what iam doin wrongl.
suggestions please