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

正文內(nèi)容

基于java企業(yè)進(jìn)銷存管理系統(tǒng)畢業(yè)設(shè)計(jì)-在線瀏覽

2025-08-06 12:33本頁(yè)面
  

【正文】 本信息后,就應(yīng)該向數(shù)據(jù)庫(kù)中執(zhí)行插入操作。其中setKhinfo(KhinfoBean khinfo)方法是用來(lái)設(shè)置該類中的屬性khinfo,其值為參數(shù)傳遞來(lái)的KhinfoBean的對(duì)象。具體代碼如下:package 。import .*。 DBResult rst=new DBResult()。 } public void regist() throws Exception{ String reg=insert into tb_customer values(?,?,?,?,?,?,?,?,?,?,?)。 //創(chuàng)建一個(gè)預(yù)處理語(yǔ)句,然后設(shè)置他們的參數(shù) (1,())。 (3,())。 (5,())。 (7,())。 (9,())。 (11,())。 } catch(Exception e){ ()。 } }} 查詢、分頁(yè)JavaBean的編寫(xiě)()該系統(tǒng)中主要的方法分為兩部分:一部分是根據(jù)用戶提交的不同請(qǐng)求調(diào)用不用的方法來(lái)獲取SQL語(yǔ)句;另一部分是用于分頁(yè)顯示。q void querySql(String countSql):執(zhí)行SQL語(yǔ)句,獲得分頁(yè)顯示時(shí)的各個(gè)屬性。這部分代碼是本系統(tǒng)中查詢部分的骨架,所有涉及到查詢操作的代碼部分全都調(diào)用了該Bean 中相應(yīng)的方法,并完成了分頁(yè)顯示。import 。import .*。 //當(dāng)前頁(yè)數(shù) private int maxPage。 //總記錄數(shù)(即從數(shù)據(jù)庫(kù)中查出的所有記錄) private int pageSize=2。 //記錄集對(duì)象 private String File。 //選擇的查詢字段 private String ccif。 //查詢關(guān)鍵字 private String countSql=null。 //用來(lái)存儲(chǔ) select top 2……語(yǔ)句 private String nowPage=null。 //在做翻頁(yè)時(shí),傳遞除pages以外的其他參數(shù) private String andor。 //查詢起始時(shí)間,即從什么日期開(kāi)始查詢 private String edate。 //排序條件,即按什么排序 private String paixu。 } public int getCurPage() { return curPage。 } //省略了對(duì)Bean中其他屬性設(shè)置的部分代碼 ……/** * 通過(guò)參數(shù)傳遞來(lái)設(shè)置Bean中的屬性 */ public void setQuerySql(String file,String pages,String strCount){ =pages。 //用來(lái)動(dòng)態(tài)設(shè)置處理表單請(qǐng)求的JSP文件 =strCount。 //調(diào)用querySql方法,并將參數(shù)countSql傳遞到該方法中 }catch(Exception e){ ()。 //那么就將當(dāng)前頁(yè)的值設(shè)為1; } else{ =()。 } } ResultSet rsCount=(countSql)。 //獲取記錄總數(shù),即所要查詢記錄的總行數(shù) } //獲取總頁(yè)數(shù),即如果當(dāng)總記錄數(shù)除以每頁(yè)顯示的記錄的余數(shù)為0時(shí),總頁(yè)數(shù)就等于兩數(shù)整除的結(jié)果 //如果余數(shù)不等于0,那么總頁(yè)數(shù)就等于兩數(shù)整除的結(jié)果加1=(%==0)?():(+1)。 //那么當(dāng)前頁(yè)就是最大頁(yè) } ()。 int prev = 1。 //向后翻頁(yè),即當(dāng)前頁(yè)加1 str = str + font style=39??傆?jì)font color=39。 + () + /font條記錄, + 【共font color=39。 + ()+ /font頁(yè)】。red39。red39。nbsp。 if( 1) str = str + A href= + + ?pages=1 + str_parameter + 首頁(yè)/A 。 if( 1) str = str + A href= + + ?pages= + prev + str_parameter + 上一頁(yè)/A 。 if( ) str = str + A href= + + ?pages= + next + str_parameter + 下一頁(yè)/A 。 if( 1 amp。 != ) str = str + A href= + + ?pages= + + str_parameter + 尾頁(yè)/A。 //在頁(yè)面跳轉(zhuǎn)間設(shè)置隱藏表單,來(lái)保存不同的請(qǐng)求 str = str + 轉(zhuǎn)到input type =39。 name=39。 size=39。頁(yè)+ input type=39。 name=39。 value=39。input type =39。 name=39。 value=39。input type =39。 name=39。 value=39。input type =39。 name=39。 value=39。input type =39。 name=39。 value=39。input type =39。 name=39。 value=39。input type =39。 name=39。 value=39。input type =39。 name=39。 value=39。input type=39。 name=39。 value=39。/form。 } /** * 根據(jù)不同條件來(lái)獲取不同的查詢前N條的SQL語(yǔ)句 */ public String getString(String table){ if((=)) { String strSql=select top +*+ * from +table+ where+ +cif+=+39。 return strSql。%+qvalue+%39。 } else if((ALL)) { String strSql=select top +*+ * from +table。 } else if(()) { String strSql=select top +*+ * from +table+ where +cif+ 39。 return strSql。 } /** * 根據(jù)不同條件來(lái)獲得不同的計(jì)算記錄總數(shù)的SQL語(yǔ)句 */ public String getCount(String table){ if((=)) { String strSql=select count(*) from +table+ where+ +cif+=+39。 return strSql。%+qvalue+%39。 } else if((ALL)) { String strSql=select count(*) from +table。 } else if(()) { String strSql=select count(*) from +table+ where +cif+ 39。 return strSql。 } /** * 根據(jù)不同條件和不同的起始日期和結(jié)束日期來(lái)獲得不同的計(jì)算記錄總數(shù)的SQL語(yǔ)句 */ public String getDateCount(String table){ if((=)) //在sdate到edate時(shí)間段中進(jìn)行精確查詢 { String strSql=select count(*) from +table+ where +cif+ = 39。+ andor+ xsdate between 39。 and 39。 return strSql。%+qvalue+%39。+sdate+39。+edate+39。 } else if((ALL)) //取出表中所有記錄 { String strSql=select count(*) from +table。 } return null。+qvalue+39。+sdate+39。+edate+39。 } else if((LIKE)) { String strSql=select top +*+ * from +table+ where +cif+ like 39。+andor+ xsdate between 39。 and 39。 return strSql。 return strSql。 } /** * 子查詢中得到從起始日期到結(jié)束日期這段時(shí)間所有不重復(fù)的spid(商品id),并返回不重復(fù)的spid的總數(shù) */ public String getOrderCount(String table){ String strSql=select count(*) from (select spid from +table+ where xsdate between 39。 and 39。 group by spid) as aa。 } /** * 聯(lián)合查詢查詢出某一表中從起始到結(jié)束日期間所有不重復(fù)的spid(商品id) * 并且將所有相同spid下的sl(數(shù)量)和je(金額)求和,即計(jì)算出某一商品在 * 某一時(shí)間段內(nèi)的總銷售數(shù)量和銷售總額 * 最后通過(guò)聯(lián)合查詢?cè)趖b_brand表(商品信息表)中將該spid所對(duì)應(yīng)商品的其他一些信息查詢出來(lái) */ public String getOrderString(String table){ String strSql=select top + *+ * from tb_brand a inner join (select spid,sum(sl) as sl,sum(je) as je+ from +table+ where xsdate between 39。 and 39。 group by spid ) as b+ on = order by +orderby+ +paixu。 }} 顯示系統(tǒng)時(shí)間的JavaBean的編寫(xiě)在本系統(tǒng)中,商品的入庫(kù)編號(hào)、銷售票號(hào)等都是由“2位英文字母+系統(tǒng)時(shí)間+5位數(shù)字”自動(dòng)生成的,所以我們將系統(tǒng)時(shí)間封裝到Bean中,這樣可以很好的將這部分代碼重用。import .*。 private int yy。 //保存由Date類中g(shù)etMonth()方法返回的整型數(shù)值 private int dd。 private String sm。 public ShowTime(){ date=new Date()。 //只有加上1900才是系統(tǒng)當(dāng)前的年份 mm=()+1。 sy=(yy)。 //將整型mm轉(zhuǎn)化為字符串類型 sd=(dd)。} if(()==1){ sd=0+sd。 } public String getDate(){ return sy++sm++sd。該模塊主要用于驗(yàn)證用戶的身份及密碼,其運(yùn)行結(jié)果如圖3所示。當(dāng)用戶輸入合法信息后,提交該表單。表1 用戶登錄頁(yè)面涉及的HTML表單元素名稱類型含義重要屬性form1form表單action= method=postusernametext用戶名passwordpassword密碼submitbutton【登錄】按鈕onClick=check()resetreset【取消】按鈕class=btn_grey value=取消用戶登錄頁(yè)面中驗(yàn)證用戶輸入合法性的主要JavaScript代碼如下:……//省略部分代碼script language=javascript function check(){ if(==0){ alert(請(qǐng)輸入用戶名)。return。()。 } ()。當(dāng)驗(yàn)證通過(guò)后,進(jìn)入到系統(tǒng)的主頁(yè)面進(jìn)行操作;否則給予信息提示,并返回到登錄頁(yè)面重新登錄。charset=gb23
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1