工厂销售管理系统源程序清单内容摘要:

lic class AddContract extends Contract { private static final long serialVersionUID = 1079754123359683663L。 ConBean cb = new ConBean()。 /** * Create the frame 15 */ public AddContract() { super()。 setBounds(100, 100, 500, 375)。 //setDefaultCloseOperation()。 (添加合同 )。 (false)。 (false)。 (+())。 (true)。 (true)。 (true)。 (true)。 (true)。 (true)。 (true)。 (true)。 (true)。 //设置运行时窗口的位置 Dimension screenSize = ().getScreenSize()。 (( 400) / 2,( 300) / 2 + 45)。 (添 加 )。 (清 空 )。 //添加事件侦听 (this)。 (this)。 } public void actionPerformed(ActionEvent e) { // TODO 自动生成方法存根 Object obj = ()。 if(obj == add){ (false)。 (false)。 (false)。 (false)。 16 (false)。 (false)。 (false)。 (false)。 (false)。 (false)。 (false)。 (false)。 ((), (), (), (),(), (), (), (), ())。 ()。 AddContract ac = new AddContract()。 (true)。 } else if(obj == clear){ setNull()。 (+())。 } } } package。 /** * @author 超老板 * 创建标识 :071223 */ import。 import。 import。 //有关合同数据库操作的类 public class ConBean { String sql。 ResultSet rs = null。 String contract_no。 String checkout_meth。 String exchange_add。 String transport_meth。 String transport_fee。 17 String need_name。 String product_name。 String number。 String price。 String delivery_data。 String colName。 //列名 String colValue。 //列值 String colValue2。 //列值 int contract_ID。 //合同的新编号 //添加合同 public void addCon(String checkout_Meth,String exchange_Add,String transport_Meth,String transport_Fee,String need_Name,String product_Name,String numBer,String priCe,String delivery_Data){ DataBase db = new DataBase()。 // = contract_no。 = checkout_Meth。 = exchange_Add。 = transport_Meth。 = transport_Fee。 = need_Name。 = product_Name。 = numBer。 = priCe。 = delivery_Data。 if(need_name == null||()){ (null, 请 输 入 需 方 名 称 , 错误,)。 return。 } else if(product_name == null||()){ (null, 请 输 入 产 品 名 称 , 错误,)。 return。 } else{ sql = insert into contract (Checkout_meth,Exchange_add,Transport_meth,Transport_fee,Need_name,Product_name,Numbe,Price,Delivery_data) values (39。 +checkout_meth+39。 ,39。 +exchange_add+39。 ,39。 +transport_meth+39。 ,39。 +transport_fee+39。 ,39。 +need_name+39。 ,39。 +product_name+39。 ,39。 +number+39。 ,39。 +price+39。 ,39。 +delivery 18 _data+39。 )。 try{ ()。 (sql)。 (null,成功添加一条记录 )。 } catch(Exception e){ (e)。 (null, 添加失败 , 错误,)。 } finally{ ()。 ()。 } } } //修改合同 public void conModify(String contract_No,String checkout_Meth,String exchange_Add,String transport_Meth, String transport_Fee,String need_Name,String product_Name,String numBer,String priCe,String delivery_Data){ DataBase db = new DataBase()。 = contract_No。 = checkout_Meth。 = exchange_Add。 = transport_Meth。 = transport_Fee。 = need_Name。 = product_Name。 = numBer。 = priCe。 = delivery_Data。 if(need_name == null||()){ (null, 请 输 入 需 方 名 称 , 错误,)。 return。 } else{ sql = update contract set Checkout_meth = 39。 +checkout_meth+39。 ,Exchange_add = 39。 +exchange_add+39。 ,Transport_meth = 19 39。 +transport_meth+39。 ,Transport_fee = 39。 +transport_fee+39。 ,Need_name = 39。 +need_name+39。 ,Product_name =39。 +product_name+39。 ,Numbe = 39。 +number+39。 ,Price = 39。 +price+39。 ,Delivery_data = 39。 +delivery_data+39。 where Contract_no = +(contract_no)+。 } try{ ()。 (sql)。 (null,成功修改一条记录 )。 } catch(Exception e){ (e)。 (null, 修改失败 , 错误,)。 } finally{ ()。 ()。 } } //删除合同 public void delCon(String contract_No){ DataBase db = new DataBase()。 = contract_No。 sql = delete from contract where Contract_no = +(contract_no)+。 try{ ()。 (sql)。 (null,成功删除一条记录 )。 } catch(Exception e){ (e)。 (null, 删除失败 , 错误,)。 } finally{ ()。 ()。 } } 20 //根据合同号查询合同执行情况清单 public String[] searchCon(String no){ DataBase db = new DataBase()。 = no。 String[] s = new String[9]。 sql = select * from contract where Contract_no = +(contract_no)+。 try{ ()。 rs = (sql)。 if(()){ s[0] = (Checkout_meth)。 s[1] = (Exchange_add)。 s[2] = (Transport_meth)。 s[3] = (Transport_fee)。 s[4] = (Need_name)。 s[5] = (Product_name)。 s[6] = (Numbe)。 s[7] = (Price)。 s[8] = (Delivery_data)。 } else s = null。 } catch(Exception e){ } finally{ ()。 ()。 } return s。 } /** * 合同综合查询 (按照一个条件进行查询 ) */ public String[][] conAllSearch(String colname,String colvalue){ = colname。 = colvalue。 DataBase DB = new DataBase()。 String[][] = null。 int row = 0。 int i = 0。 21 (colvalue)。 if(colValue == null||()){ sql = select * from contract。 } else{ sql = select * from contract where +colName+ = 39。 +colValue+39。 } try{ ()。 rs = (sql)。 if(()){ row = ()。 } if(row == 0){ = null。 } else{ = new String[row][10]。 ()。 ()。 while(()){ [i][0] = (Contract_no)。 [i][1] = (Checkout_meth)。 [i][2] = (Exchange_add)。 [i][3] = (Transport_meth)。 [i][4] = (Transport_fee)。 [i][5] = (Need_name)。 [i][6] = (Pro。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。