亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? commoditymanage.java

?? 這是用java實現的一個倉儲管理系統
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
		System.out.println(" ");
		System.out.println("        |--------Supplier Menu-------|");
		System.out.println("          1.Display Supplier Detail");
		System.out.println("          2.Insert  Supplier Detail");
		System.out.println("          3.Update  Supplier Detail");
		System.out.println("          4.Delete  Supplier Detail");
		System.out.println("                   0.Exit");
		System.out.println("        |----------------------------|");
		System.out.print("        Please choose a number(0~4):");
		Supplier s=new Supplier();
		s.choose();
	}
	
	public void again()throws IOException
	{
		System.out.println("Return to the Supplier Menu?");
		System.out.print("choose '10'for yes,'20' for no! ");
		BufferedReader ar=new BufferedReader(new InputStreamReader(System.in));
		String d=ar.readLine();
		int m=Integer.parseInt(d);
		Supplier s=new Supplier();
		CommodityManage CM=new CommodityManage();
		if(m==10)
		{
			s.SupplierMenu();
			s.choose();
		}
		else if(m==20)
		{
			System.out.println("-------------You have exited Main Menu!-------------");
			System.exit(0);
		}
		else	
		{
			System.out.println("Please enter again!");
			s.again();
		}				
	}	
	public void choose()throws IOException
	{
	  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String w=br.readLine();
		n=Integer.parseInt(w);
		Supplier s=new Supplier();
		CommodityManage CM=new CommodityManage();
		{
			switch(n)
			{
				case 1:	s.DisplaySupplier();	s.again();	break;
				case 2:	s.InsertSupplier() ;	s.again();	break;
				case 3:	s.UpdateSupplier() ;	s.again();	break;
				case 4:	s.DeleteSupplier() ;	s.again();	break;
				case 0:	System.out.println("You have returned to the Main Menu!");	
								CM.DisplayMenu();
								CM.chooseMenu();
								break;
				default:
								System.out.print("Please enter again:");	s.choose();	break;	
			}
		}	
	}
	public void DisplaySupplier()  
	{
		System.out.println("-----------------1.DisplaySupplier--------------------");
		Connection con=null;
		Statement stat;
		ResultSet res;
    try
    {
	    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
	    con=DriverManager.getConnection("jdbc:odbc:Commodity");
	    stat=con.createStatement();
	    res=stat.executeQuery("select * from SupplierDetail");
	    while(res.next())
	    {
	      System.out.println("	            ID : "+res.getString(1));
	      System.out.println("	          Name : "+res.getString(2));
	      System.out.println("	   Description : "+res.getString(3));
        System.out.println("	     Telephone : "+res.getString(4));
        System.out.println("	       Address : "+res.getString(5));
        System.out.println("	Shipment Delay : "+res.getString(6));
	      System.out.println("	     Appraisal : "+res.getString(7));
	      System.out.println("\n--------------------Supplier Detail-------------------\n");
	    }
     }
     catch(Exception e)
     {
	    	System.out.println("Could not query: "+e);
     }
		 if (con!=null) con=null;
	}
	
	public void Display()  
	{
			Connection con=null;
	    PreparedStatement stat;
	    ResultSet res=null;
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      try
      {
		    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
		    con=DriverManager.getConnection("jdbc:odbc:Commodity");
		    stat=con.prepareStatement("select * from SupplierDetail where cSupplierID=?");
		    stat.setString(1,(String)ID);  //用值替換SQL語句中的問號參數
		    res=stat.executeQuery();  
		    while(res.next())
		    {
		      System.out.println("	            ID : "+res.getString(1));
		      System.out.println("	          Name : "+res.getString(2));
		      System.out.println("	   Description : "+res.getString(3));
	        System.out.println("	     Telephone : "+res.getString(4));
	        System.out.println("	       Address : "+res.getString(5));
	        System.out.println("	Shipment Delay : "+res.getString(6));
		      System.out.println("	     Appraisal : "+res.getString(7));
		      System.out.println("");
		    }
     }
     catch(Exception e)
     {
	    	System.out.println("Could not display: "+e);
     }
		 if (con!=null) con=null;
	}
	
	public void InsertSupplier() throws IOException 
	{
			System.out.println("-----------------2.InsertSupplier--------------------");
			Connection con=null;
	    PreparedStatement stat=null;
	    int res=0;

	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    try
	    {
	        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
	        con=DriverManager.getConnection("jdbc:odbc:Commodity");
	        stat=con.prepareStatement("insert into SupplierDetail values(?,?,?,?,?,?,?)");

	        System.out.print("SupplierID(6) = ");
	        String SupplierID=br.readLine();   //從鍵盤讀入值存入字串變量中
	        ID=SupplierID;

	        System.out.print("SlpplierName(50) = ");
	        String SlpplierName=br.readLine();

	        System.out.print("Description(50) = ");
	        String Description=br.readLine();

	        System.out.print("Telephone (like 1234-1234567) = ");
	        String Telephone=br.readLine();
	        
					System.out.print("Address(50) = ");
	        String Address=br.readLine();

	        System.out.print("ShipmentDelay (day) = ");
	        String ShipmentDelay=br.readLine();

	        System.out.print("CredibilityDegree (best or high or medium or so-so) = ");
	        String CredibilityDegree=br.readLine();
					
					System.out.println(" ");
					
	        stat.setString(1,SupplierID);  //用值替換SQL語句中的問號參數
	        stat.setString(2,SlpplierName);
	        stat.setString(3,Description);
          stat.setString(4,Telephone);
          stat.setString(5,Address);
          stat.setInt(6,Integer.parseInt(ShipmentDelay)); 
	        stat.setString(7,CredibilityDegree);

	        res=stat.executeUpdate();
	        if (res!=0) System.out.println("-------Your details have been registered-------");
	    }

	    catch(Exception ex)
      {      
     	   System.out.println("Error registe: "+ex);
      }

			 if (con!=null) con=null;
			 Log l=new Log();
			 l.GetDate();
			 FileWriter outF = new FileWriter("log.txt",true);
			 outF.write("                Inserted a supplier \r\n");
			 outF.write("-----------------------------------------------------\r\n");
			 outF.close();
			 Supplier s=new Supplier();
			 System.out.println(" ");
			 System.out.println("-------------Insert Detail-------------------");
			 s.Display();
	}
	
	public void UpdateSupplier() throws IOException 
	{
      System.out.println("-----------------3.UpdateSupplier--------------------");
      Connection con=null;
	    PreparedStatement stat=null;
	    int res=0;
	    
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    try
	    {
	        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
	        con=DriverManager.getConnection("jdbc:odbc:Commodity");
	        System.out.print("Please enter the cSupplierID:");
	        String SupplierID=br.readLine();
	        ID=SupplierID;
	        System.out.println();
	        System.out.println("Update what?");
	        System.out.println("1.vSupplierName");
	        System.out.println("2.vSupplierDescription");
	        System.out.println("3.cSupplierTele");
	        System.out.println("4.vSupplierAddress");
	        System.out.println("5.iShipmentDelay");
	        System.out.println("6.cCredibilityDeg");
	        System.out.print("Please choose(1-6) : ");
					String w=br.readLine();
					int n=Integer.parseInt(w);
					switch(n)
					{
						case 1:	stat=con.prepareStatement("update SupplierDetail set vSupplierName=? where cSupplierID=?");
										System.out.print("Enter the new vSupplierName(6) : ");break;
						case 2:	stat=con.prepareStatement("update SupplierDetail set vSupplierDescription=? where cSupplierID=?");
										System.out.print("Enter the new vSupplierDescription(50) : ");break;
						case 3:	stat=con.prepareStatement("update SupplierDetail set cSupplierTele=? where cSupplierID=?");
										System.out.print("Enter the new cSupplierTele(like 1234-1234567) : ");break;
						case 4:	stat=con.prepareStatement("update SupplierDetail set vSupplierAddress=? where cSupplierID=?");
										System.out.print("Enter the new vSupplierAddress(50) : ");break;
						case 5:	stat=con.prepareStatement("update SupplierDetail set iShipmentDelay=? where cSupplierID=?");
										System.out.print("Enter the new iShipmentDelay(day) : ");break;
						case 6: stat=con.prepareStatement("update SupplierDetail set cCredibilityDeg=? where cSupplierID=?");
										System.out.print("Enter the new cCredibilityDeg(best or high or medium or so-so) : ");break;
						default:break;
					}
	        
	        String newdata=br.readLine();
	        stat.setString(1,(String)newdata);  //用值替換SQL語句中的問號參數
	        stat.setString(2,(String)SupplierID);  //用值替換SQL語句中的問號參數
	        
					res=stat.executeUpdate();
	        if (res!=0) System.out.println("-------Your details have been updata-------");
	    }

      catch(Exception e)
      {
	    System.out.println("Could not Updata: "+e);
      }
      if (con!=null)con=null;
      Log l=new Log();
			l.GetDate();
			FileWriter outF = new FileWriter("log.txt",true);
			outF.write("          Updated table supplier detail \r\n");
			outF.write("-----------------------------------------------------\r\n");
			outF.close();
      Supplier s=new Supplier();
      System.out.println("--------------Update Detail-------------------");
      s.Display();
	}
	public void DeleteSupplier()throws IOException
	{
			System.out.println("-----------------4.DeleteSupplier--------------------");
			Connection con=null;
	    PreparedStatement stat=null;
	    int res=0;

	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    try
	    {
	        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
	        con=DriverManager.getConnection("jdbc:odbc:Commodity");
	        stat=con.prepareStatement("delete SupplierDetail where cSupplierID=?");

	        System.out.print("Enter cSupplierID(6):");
	        String SupplierID=br.readLine();   //從鍵盤讀入值存入字串變量中

	        stat.setString(1,SupplierID);  //用值替換SQL語句中的問號參數
	    
	        res=stat.executeUpdate();
	        if (res!=0) System.out.println("-------Your details have been registered-------");
	    }

	    catch(Exception e)
      {      
     	   System.out.println("Could not Delete: "+e);
      }
	    if (con!=null) con=null;
	    Log l=new Log();
			l.GetDate();
			FileWriter outF = new FileWriter("log.txt",true);
			outF.write("                Deleted a supplier \r\n");
			outF.write("-----------------------------------------------------\r\n");
			outF.close();
	    Supplier s=new Supplier();
	    System.out.println("----------The Detail that after delete----------");
	    s.DisplaySupplier();

	}
	public static void main(String args[])throws IOException
	{
			Supplier s=new Supplier();
			s.SupplierMenu();
	}
}
//-----------------------------------------------------------------------------------------------------------------//

//---------------------------------------------Here's Business Detail----------------------------------------------//
class Business
{
	static String ID;
	public void BusinessMenu()throws IOException
	{
		System.out.println("        |---------Business Menu--------|");
		System.out.println("                 1.Order Detail");
		System.out.println("                 2.Sold  Detail");
		System.out.println("                     0.Exit");
		System.out.println("        |------------------------------|");
		System.out.print("        Please choose a number(0~2):");
		Business c=new Business();
		c.choose();
	  System.out.println("");
	}
	
	public void again()throws IOException
	{
		System.out.println("Return to the Business Menu ?");
		System.out.print("Press '10' for Yes,Press '20' for No! ");
		BufferedReader ar=new BufferedReader(new InputStreamReader(System.in));
		String d=ar.readLine();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线视频一区二区三| 亚洲视频一二三区| 亚洲欧美影音先锋| 美女视频黄免费的久久| www.色综合.com| 欧美精品一区二区三区四区 | 欧美不卡一区二区三区| 亚洲女与黑人做爰| 成人免费毛片嘿嘿连载视频| 日韩一区二区三区免费看| 一区在线播放视频| 国产精品中文字幕日韩精品| 欧美老肥妇做.爰bbww视频| 最新日韩av在线| 欧美色图天堂网| 国产情人综合久久777777| 日本成人中文字幕| 欧美日韩国产片| 亚洲精品视频免费看| 91国产免费看| 国产午夜精品久久| 国产福利精品一区二区| 欧美tickling网站挠脚心| 视频在线观看一区二区三区| 91精品办公室少妇高潮对白| 亚洲欧洲在线观看av| 盗摄精品av一区二区三区| 久久欧美一区二区| 国产美女视频91| 久久久久久日产精品| 久久超碰97中文字幕| 日韩一区和二区| 蜜桃av一区二区三区| 欧美一级理论性理论a| 日本aⅴ精品一区二区三区| 欧美一区二区免费| 91老师国产黑色丝袜在线| 亚洲欧洲av一区二区三区久久| 国产99精品在线观看| 国产女人18毛片水真多成人如厕 | 色噜噜狠狠成人中文综合| 亚洲精品免费视频| 一本色道亚洲精品aⅴ| 亚洲美女免费视频| 欧美午夜影院一区| 日韩电影一二三区| 久久精品在线观看| 不卡一区二区三区四区| 亚洲狠狠丁香婷婷综合久久久| 91日韩精品一区| 亚洲一区二三区| 欧美一区二区视频免费观看| 麻豆精品一二三| 国产女人水真多18毛片18精品视频| 成人动漫中文字幕| 亚洲图片欧美综合| 精品欧美一区二区久久| 岛国av在线一区| 亚洲国产日日夜夜| 久久久噜噜噜久久人人看 | 91精品国产综合久久精品图片| 免费黄网站欧美| 国产精品国产三级国产普通话蜜臀| 91浏览器入口在线观看| 午夜精品久久久久影视| 久久久久久99久久久精品网站| 99久久婷婷国产| 日韩国产欧美在线观看| 国产欧美日韩不卡| 在线播放一区二区三区| 不卡一区二区中文字幕| 日韩福利视频导航| 综合亚洲深深色噜噜狠狠网站| 日韩欧美亚洲国产精品字幕久久久| 国产不卡视频在线观看| 亚洲主播在线播放| 国产日产欧美一区| 在线观看日韩av先锋影音电影院| 91在线一区二区| 日韩专区欧美专区| 国产精品国产三级国产aⅴ中文| 欧美精品v日韩精品v韩国精品v| 国产福利精品导航| 免费在线观看一区| 亚洲午夜久久久久久久久电影院| 日韩视频一区二区在线观看| 色综合久久久久综合99| 国产精品影视天天线| 性做久久久久久免费观看| 中文无字幕一区二区三区 | 欧美性xxxxxxxx| 成熟亚洲日本毛茸茸凸凹| 美日韩一区二区| 午夜婷婷国产麻豆精品| 中文字幕在线观看一区二区| 久久亚洲影视婷婷| 日韩一区二区免费在线电影| 欧美性猛交xxxx乱大交退制版| av电影在线不卡| 高清不卡在线观看| 国产精品18久久久| 久久97超碰国产精品超碰| 午夜精品影院在线观看| 亚洲一级二级在线| 亚洲欧美日韩电影| 亚洲色图都市小说| 国产欧美久久久精品影院| 欧美一区二区三区播放老司机| 欧美又粗又大又爽| 91女厕偷拍女厕偷拍高清| www.欧美亚洲| eeuss鲁片一区二区三区| 成人午夜免费av| 懂色av中文字幕一区二区三区| 国产综合一区二区| 经典三级一区二区| 黄色日韩网站视频| 精品一区二区在线看| 久久99日本精品| 国产一区二区三区最好精华液| 激情综合色综合久久| 国内精品久久久久影院一蜜桃| 日韩精品亚洲一区二区三区免费| 天天操天天干天天综合网| 午夜成人免费视频| 久久99久久精品| 国产盗摄精品一区二区三区在线| 国产一区二区三区在线观看免费| 国产精品77777| 97se亚洲国产综合自在线不卡| 不卡av免费在线观看| 一本色道久久综合亚洲aⅴ蜜桃| 色狠狠色噜噜噜综合网| 欧美日韩高清影院| 欧美成人精品1314www| 久久品道一品道久久精品| 久久精品99国产精品| 国产福利精品导航| 一本一道久久a久久精品综合蜜臀| 欧美性生活影院| 884aa四虎影成人精品一区| 日韩视频免费观看高清完整版在线观看| 91精品欧美综合在线观看最新| 欧美精品一区视频| 亚洲人成精品久久久久| 午夜精品福利一区二区蜜股av| 麻豆成人免费电影| 99国产精品久久久| 337p亚洲精品色噜噜噜| 国产亚洲人成网站| 亚洲二区视频在线| 韩日av一区二区| 91免费观看国产| 日韩精品一区二区三区视频播放 | 亚洲高清三级视频| 国产一区二区三区香蕉| 色综合天天狠狠| 精品成人一区二区三区| 亚洲男人的天堂av| 精品一区二区在线视频| 欧美在线视频日韩| 久久精品在这里| 日日摸夜夜添夜夜添国产精品 | 国产综合色视频| 在线观看一区不卡| 久久精品视频免费| 婷婷夜色潮精品综合在线| 高清国产一区二区| 欧美一区二区精美| 一区二区不卡在线视频 午夜欧美不卡在| 捆绑变态av一区二区三区| 一本大道综合伊人精品热热| 精品国产一区二区三区久久影院| 亚洲综合图片区| av一二三不卡影片| 国产色婷婷亚洲99精品小说| 日本一不卡视频| 欧美在线观看一二区| 中文字幕一区二区三区蜜月 | 2023国产精品| 亚洲一区中文日韩| aa级大片欧美| 国产精品日日摸夜夜摸av| 免费三级欧美电影| 5858s免费视频成人| 一区二区三区日韩精品| 91在线视频网址| 亚洲视频在线一区观看| 白白色 亚洲乱淫| 欧美国产欧美综合| 国产乱淫av一区二区三区| 欧美xxxxxxxx| 蜜桃av噜噜一区| 日韩欧美黄色影院| 久久黄色级2电影| 精品少妇一区二区三区免费观看| 日韩精品视频网| 欧美巨大另类极品videosbest | 亚洲精品免费电影| 色国产精品一区在线观看|