Two search methods

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.