Public faurermember findequipmentfacturer (string equipmentfacturer ){
String SQL = "select * From equipmentfacturer where equipmentfacturer =? ";
Resultset rs = execquery (SQL, new object [] {equipmentfacturer });
Try {
If (Rs. Next ()){
Faurermember FMB = new faurermember ();
FMB. setequipmentfacturer (Rs. getstring ("equipmentfacturer "));
FMB. setequipmentfacturername (Rs. getstring ("equipmentfacturername "));
FMB. setequipmentfactureraddress (Rs. getstring ("equipmentfactureraddress "));
FMB. setequipmentfacturerpostcode (Rs. getstring ("equipmentfacturerpostcode "));
FMB. setequipmentfacturerphone (Rs. getstring ("equipmentfacturerphone "));
FMB. setequipmentfacturerperson (Rs. getstring ("equipmentfacturerperson "));
FMB. setagentname (Rs. getstring ("agentname "));
FMB. setagentaddress (Rs. getstring ("agentaddress "));
FMB. setagentpostcode (Rs. getstring ("agentpostcode "));
FMB. setagentphone (Rs. getstring ("agentphone "));
FMB. setagentperson (Rs. getstring ("agentperson "));
FMB. setafterservicename (Rs. getstring ("afterservicename "));
FMB. setafterserviceaddress (Rs. getstring ("afterserviceaddress "));
FMB. setafterservicepostcode (Rs. getstring ("afterservicepostcode "));
FMB. setafterservicephone (Rs. getstring ("afterservicephone "));
FMB. setproduct (Rs. getstring ("product "));
FMB. setremark1 (Rs. getstring ("remark1 "));
Return FMB;
}
}
Catch (sqlexception e ){
// Todo auto-generated Catch Block E. printstacktrace ();
} Finally {
Super. clossall ();
} Return NULL;
}
Public list <faurermember> findequipmentfacturername (string name ){
String SQL = "select * From equipmentfacturer where equipmentfacturername like? ";
Object [] Params = {"%" + name + "% "};
Resultset rs = super.exe cquery (SQL, Params );
List <faurermember> flist = new arraylist <faurermember> ();
Try {While (Rs. Next ()){
Faurermember FMB = new faurermember ();
FMB. setequipmentfacturer (Rs. getstring ("equipmentfacturer "));
FMB. setequipmentfacturername (Rs. getstring ("equipmentfacturername "));
FMB. setequipmentfactureraddress (Rs. getstring ("equipmentfactureraddress "));
FMB. setequipmentfacturerpostcode (Rs. getstring ("equipmentfacturerpostcode "));
FMB. setequipmentfacturerphone (Rs. getstring ("equipmentfacturerphone "));
FMB. setequipmentfacturerperson (Rs. getstring ("equipmentfacturerperson "));
FMB. setagentname (Rs. getstring ("agentname "));
FMB. setagentaddress (Rs. getstring ("agentaddress "));
FMB. setagentpostcode (Rs. getstring ("agentpostcode "));
FMB. setagentphone (Rs. getstring ("agentphone "));
FMB. setagentperson (Rs. getstring ("agentperson "));
FMB. setafterservicename (Rs. getstring ("afterservicename "));
FMB. setafterserviceaddress (Rs. getstring ("afterserviceaddress "));
FMB. setafterservicepostcode (Rs. getstring ("afterservicepostcode "));
FMB. setafterservicephone (Rs. getstring ("afterservicephone "));
FMB. setproduct (Rs. getstring ("product "));
FMB. setremark1 (Rs. getstring ("remark1 "));
Flist. Add (FMB );
}
} Catch (sqlexception e ){
// Todo auto-generated Catch Block E. printstacktrace ();
} Finally {super. clossall ();
} Return flist;
}
Two search methods