商品进销存管理系统代码内容摘要:

eption e) { // TODO Autogenerated catch block ()。 if(st!=null)。 try { ()。 } catch (SQLException e1) { // TODO Autogenerated catch block ()。 if(conn!=null)。 try { ()。 } catch (SQLException e2) { // TODO Autogenerated catch block ()。 } } } } return vc。 } /** * 根据供应商 ID查询相关信息 * @param id * @return */ public static ProviderBean findProviderById(int id){ ProviderBean cl=new ProviderBean()。 Connection conn=null。 Statement st=null。 ResultSet rs = null。 conn=getConnection()。 try { st=()。 rs=(select *from gystable where id=+id+)。 while(()) { ((id))。 ((gname))。 ((gshort))。 ((gpost))。 ((gaddress))。 ((gtel))。 ((gfax))。 ((gconnect))。 ((gconnecttel))。 ((gbank))。 ((g))。 } } catch (SQLException e) { // TODO Autogenerated catch block ()。 }finally{ if(rs!=null){ try { ()。 } catch (SQLException e) { // TODO Autogenerated catch block ()。 } } if(st!=null)。 try { ()。 } catch (SQLException e1) { // TODO Autogenerated catch block ()。 if(conn!=null)。 try { ()。 } catch (SQLException e2) { // TODO Autogenerated catch block ()。 } } } return cl。 } /** * 删除供应商信息 * @param id * @return */ public static boolean deleteProviderById(int id){ Connection conn=null。 Statement st=null。 conn=getConnection()。 int i=0。 try { st=()。 i=(delete from gystable where id=+id+)。 } catch (SQLException e) { // TODO Autogenerated catch block ()。 }finally{ if(st!=null)。 try { ()。 } catch (SQLException e1) { // TODO Autogenerated catch block ()。 if(conn!=null)。 try { ()。 } catch (SQLException e2) { // TODO Autogenerated catch block ()。 } } } if(i!=0){ return true。 }else{ return false。 } } /* * 修改供应商信息 */ public static boolean updateProviderInfo(ProviderBean client){ Connection conn=null。 Statement st=null。 //ResultSet rs=null。 int i=0。 conn=getConnection()。 try { st=()。 i=(update gystable set gname=39。 +()+39。 ,gshort=39。 +()+39。 ,gaddress=39。 +()+39。 ,gpost=39。 +()+39。 ,gtel=39。 +()+39。 ,gfax=39。 +()+39。 ,gconnect=39。 +()+39。 ,gconnecttel=39。 +()+39。 ,gbank=39。 +()+39。 ,g=39。 +()+39。 where id =+())。 } catch (SQLException e) { // TODO Autogenerated catch block ()。 } if(i!=0){ return true。 }else{ return false。 } } /* * 检索供应商 */ public static List gys_checkGys(ProviderBean gys){ Statement st=null。 ResultSet rs=null。 Connection conn=getConnection()。 List list=new ArrayList()。 ProviderBean gysbean=null。 try { st=()。 rs=(select * from gystable where gname=39。 +()+39。 and gconnect=39。 +()+39。 )。 while(()){ gys=new ProviderBean()。 ((id))。 String gysText=(gname)。 (gysText)。 String shortText=(gshort)。 (shortText)。 String addressText=(gaddress)。 (addressText)。 String postText=(gpost)。 (postText)。 String telText=(gtel)。 (telText)。 String faxText=(gfax)。 (faxText)。 String concatText=(gconnect)。 (concatText)。 String concatTelText=(gconnecttel)。 (concatTelText)。 String Text=(g)。 (Text)。 String bankText=(gbank)。 (bankText)。 (gys)。 } } catch (SQLException e) { // TODO Autogenerated catch block ()。 }finally{if(rs!=null){ try { ()。 } catch (SQLException e) { // TODO Autogenerated catch block ()。 } } if(st!=null){ try { ()。 } catch (SQLException e) { // TODO Autogenerated catch block ()。 } } } return list。 } /* *添加商品信息 */ public static boolean insertProduceInfo(ProduceBean produce){ ProduceBean producebean =new ProduceBean()。 Statement st=null。 int i = 0。 //ResultSet rs=null。 Connection conn=getConnection ()。 try { st=()。 i=(insert into sptable (sname,sshort,schand,sguige,sbaoz,sdanw,sprice,skuchun)values(39。 +()+39。 ,39。 + ()+39。 ,39。 + ()+39。 ,39。 + ()+39。 ,39。 + ()+39。 ,39。 + ()+39。 ,+ (())+,+ (())+))。 } catch (SQLException e) { // TODO Autogenerated catch block ()。 }finally{ if(st!=null)。 try { ()。 } catch (SQLException e1) { // TODO Autogenerated catch block ()。 if(conn!=null)。 try { ()。 } catch (SQLException e2) { // TODO Autogenerated catch block ()。 } } } if(i!=0){ return true。 }else{ return false。 } } /** * 查询商品表中所有数据 */ public static List selectProduceAll(){ Connection conn=null。 Statement st=null。 ResultSet rs=null。 conn=getConnection()。 List vc=new ArrayList()。 ProduceBean client=null。 try { st=()。 rs=(select *from sptable)。 while(()){ client=new ProduceBean()。 ((id))。 String produceText=(sname)。 (produceText)。 String produceShortText=(sshort)。 (produceShortText)。 String shortText=(schand)。 (shortText)。 String addressText=(sguige)。 (addressText)。 String sizeText=(sbaoz)。 (sizeText)。 String produceConText=(sdanw)。 (produceText)。 String producePrizeText=(sprice)。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。