freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

北大青鳥第一單元超市收銀管理系統(tǒng)(編輯修改稿)

2025-02-08 02:11 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 客戶端業(yè)務(wù)類 package 。 /** * 客戶端業(yè)務(wù)類 . * 功能 :客戶端調(diào)用業(yè)務(wù)類的方法 ,實(shí)現(xiàn)和服務(wù)器端的數(shù)據(jù)交互 */ import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 public class ClientB { //創(chuàng)建 Socket實(shí)例 Socket socket=null。 //創(chuàng)建輸入輸出流 ObjectOutputStream oos=null。 ObjectInputStream ois=null。 /** * 初始化輸入輸出流的方法 ,每次調(diào)用方法時(shí)都要初始化 輸入輸出流 */ //初始化流的方法 public void initSocket(){ try {//socket=new Socket(localhost,8888) socket=new Socket((),arseInt(()))。 //獲得輸入輸出流 oos=new ObjectOutputStream(())。 ois=new ObjectInputStream(())。 } catch (NumberFormatException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } catch (UnknownHostException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } catch (IOException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } } /** * 關(guān)閉輸入輸出流的方法 . * 每次調(diào)用方法之后都要關(guān)閉輸入輸出流 */ public void closeSocket(){ //關(guān)閉流 的方法 try { ()。 ()。 ()。 } catch (IOException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } } /** * 客戶端登錄方法 . * 接收客戶端發(fā)送參數(shù) ,發(fā)送到服務(wù)器端驗(yàn)證 ,并接收服務(wù)器端返回的數(shù)據(jù)信息 * @param name * @param password * @return */ //登錄方法 public Datas doLogin(String name, String password) { initSocket()。 User user=new User()。 (name)。 (password)。 Datas datas=new Datas()。 ()。 (user)。 //寫入流 try { (datas)。 //接收服務(wù)器返回值 datas=(Datas) ()。 return datas。 } catch (IOException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } catch (ClassNotFoundException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } finally{ closeSocket()。 } return null。 } /** * 客戶端查詢?nèi)可唐返姆椒? * @return */ //查詢?nèi)可唐返姆椒? public Datas FindAll(){ initSocket()。 Datas datas=new Datas()。 ()。 try { (datas)。 datas=(Datas) ()。 return datas。 } catch (IOException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } catch (ClassNotFoundException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 }finally{ closeSocket()。 } return null。 } /** * 客戶端實(shí)現(xiàn)按編號(hào)查詢商品的方法 * 功能 :接收編號(hào) ,到服務(wù)器查詢 ,接收返回值 * @param goodid * @return */ //按編號(hào)查詢商品的方法 public Datas Find(String goodid) { initSocket()。 Goods good=new Goods()。 (goodid)。 Datas datas=new Datas()。 ()。 (good)。 try { (datas)。 datas=(Datas) ()。 return datas。 } catch (IOException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } catch (ClassNotFoundException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } finally{ closeSocket()。 } return null。 } /** * 客戶端管理員實(shí)現(xiàn)入庫(kù)商品的方法 * @param goodid * @param count * @return */ //入庫(kù)方法 public Datas RuKu(String goodid,int count){ initSocket()。 Goods good=new Goods()。 (goodid)。 (count)。 Datas datas=new Datas()。 ()。 (good)。 try { (datas)。 datas=(Datas) ()。 return datas。 } catch (IOException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } catch (ClassNotFoundException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } finally{ closeSocket()。 } return null。 } /** * 客戶端管理員實(shí)現(xiàn)商品出庫(kù)的方法 * @param goodid * @param count * @return */ public Datas ChuKu(String goodid, int count) { initSocket()。 // 接收參數(shù) Goods good=new Goods()。 (goodid)。 (count)。 Datas datas=new Datas()。 ()。 (good)。 try { (datas)。 datas =(Datas) ()。 return datas。 } catch (IOException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } catch (ClassNotFoundException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 }finally{ closeSocket()。 } return null。 } /** * 客戶端管理員實(shí)現(xiàn)商品新增的方法 * @param good * @return */ //新增商品方法 public Datas Add(Goods good) { initSocket()。 Datas datas=new Datas()。 ()。 (good)。 try { (datas)。 datas=(Datas) ()。 } catch (IOException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } catch (ClassNotFoundException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 }finally{ closeSocket()。 } return null。 } /** * 客戶端收銀員實(shí)現(xiàn)掃描商品的方法 * @param scannum * @return */ //掃描方法 public Datas scan(String scannum) { // TODO 自動(dòng)生成的方法存根 initSocket()。 Goods good=new Goods()。 (scannum)。 Datas datas=new Datas()。 (good)。 ()。 try { (datas)。 datas =(Datas) ()。 return datas。 } catch (IOException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } catch (ClassNotFoundException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 }finally{ closeSocket()。 } return null。 } /** * 客戶端收銀員實(shí)現(xiàn)結(jié)賬時(shí)返回購(gòu)買列表的方法 * @return */ //結(jié)賬方法 .返回購(gòu)買列表 public Datas result(){ initSocket()。 Datas datas=new Datas()。 ()。 try { (datas)。 datas=(Datas) ()。 return datas。 } catch (IOException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } catch (ClassNotFoundException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 }finally{ closeSocket()。 } return null。 } /** * 客戶端收銀員實(shí)現(xiàn)修改數(shù)量的方法 * @param changeid * @param changenum * @return */ //收銀員 ,修改數(shù)量的方法 public Datas ChangeCount(String changeid, int changenum) { initSocket()。 Goods good=new Goods()。 (changeid)。 (changenum)。 Datas datas=new Datas()。 ()。 (good)。 try { (datas)。 datas=(Datas) ()。 return datas。 } catch (IOException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 } catch (ClassNotFoundException e) { // TODO 自動(dòng)生成的 catch 塊 ()。 }finally{ closeSocket()。 } return null。 } /** * 客戶端收銀員實(shí)現(xiàn)清空購(gòu)買列表的方法 * @return */ public Datas clear() { // TODO 自動(dòng)生成的方法存根
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1