DAL层:
private DataTable FindID(台号表Model Model对象)
{
SQLParameter p=new SQLParameter("@id",Model对象.台号);
string sql=" select * from 台号表 where 台号=@id";
return 数据库访问类对象.执行查询方法(sql,p);//返回一个数据集
}
BLL层:
private DataTable FindID(台号表Model Model对象)
{
return DAL层对象.FindID(Model对象);
}
UI层:
private void combobox_SelecedIndexChanged(sender,Event)//事件
{
台号表Model Model对象=new 台号表Model();
Model对象.台号=this.combobox.SelectedItem.ToString();
DataTable dt=new DataTable();
dt=BLL层对象.FindID(Model对象);
for(int i=0;i