heting

            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            40 隨筆 :: 9 文章 :: 45 評(píng)論 :: 0 Trackbacks

          2010年8月26日 #

           

          create or replace package CARD_SERVICE_DAY_VIEW_PARAM  is 
             
          function set_param(num varcharreturn varchar
             
          function get_param  return varchar

             
          end CARD_SERVICE_DAY_VIEW_PARAM; 
          commit;
             
             
          create or replace package body CARD_SERVICE_DAY_VIEW_PARAM is 
                 paramValue 
          varchar(10); 
                 
          function set_param(num varcharreturn varchar is 
                 
          begin 
                   paramValue:
          =num; 
                   
          return num; 
                  
          end;  
                 
                 
          function get_param return varchar is 
                 
          begin 
                   
          return paramValue; 
                 
          end
                 
             
          end CARD_SERVICE_DAY_VIEW_PARAM;    
          commit;

          create or replace view CARD_SERVICE_DAY_VIEW as 
          select
          cs.id,
          cs.card_id,
          cs.lock_money,
          to_char(cs.check_time,
          'yyyy-MM-dd hh24:mi'as check_time,
          cs.name,cs.phone,( months_between(to_date(CARD_SERVICE_DAY_VIEW_PARAM.get_param(),
          'yyyyMMdd'),
          to_date(to_char(cs.CHECK_TIME,
          'yyyyMMdd'),'yyyyMMdd'))  ) as curr_batch,
          (
          select count(1from transaction where card_id=cs.card_id and tran_time between cs.check_time and to_date(CARD_SERVICE_DAY_VIEW_PARAM.get_param(),'yyyyMMdd'and (curr_bal-money)<cs.lock_money) as condition,
          (
          select count(1from service_transaction where batch=(months_between(to_date(CARD_SERVICE_DAY_VIEW_PARAM.get_param(),'yyyyMMdd'),to_date(to_char(cs.CHECK_TIME,'yyyyMMdd'),'yyyyMMdd'))) and s_id=cs.id) as hasAudit 
          from card_service cs 
          where cs.state='T' 
          and 
          months_between(to_date(CARD_SERVICE_DAY_VIEW_PARAM.get_param(),
          'yyyyMMdd'),to_date(to_char(cs.CHECK_TIME,'yyyyMMdd'),'yyyyMMdd')) in (1,2,3,4,5,6
          order by cs.card_id
          commit;
          posted @ 2010-10-11 15:26 賀挺 閱讀(543) | 評(píng)論 (0)編輯 收藏

          window.showdialog完全手冊,解決模態(tài)窗口,傳值和返回值問題2009-08-28 13:31基本介紹:
          showModalDialog() (IE 4+ 支持)
          showModelessDialog() (IE 5+ 支持)
          window.showModalDialog()方法用來創(chuàng)建一個(gè)顯示HTML內(nèi)容的模態(tài)對(duì)話框。
          window.showModelessDialog()方法用來創(chuàng)建一個(gè)顯示HTML內(nèi)容的非模態(tài)對(duì)話框。

          使用方法:
          vReturnValue = window.showModalDialog(sURL [, vArguments] [,sFeatures])
          vReturnValue = window.showModelessDialog(sURL [, vArguments] [,sFeatures])

          參數(shù)說明:
          sURL--必選參數(shù),類型:字符串。用來指定對(duì)話框要顯示的文檔的URL。
          vArguments--可選參數(shù),類型:變體。用來向?qū)υ捒騻鬟f參數(shù)。傳遞的參數(shù)類型不限,包括數(shù)組等。對(duì)話框通過window.dialogArguments來取

          得傳遞進(jìn)來的參數(shù)。
          sFeatures--可選參數(shù),類型:字符串。用來描述對(duì)話框的外觀等信息,可以使用以下的一個(gè)或幾個(gè),用分號(hào)“;”隔開。
          1.dialogHeight :對(duì)話框高度,不小于100px,IE4中dialogHeight 和 dialogWidth 默認(rèn)的單位是em,而IE5中是px,為方便其見,

          在定義modal方式的對(duì)話框時(shí),用px做單位。
          2.dialogWidth: 對(duì)話框?qū)挾取?br /> 3.dialogLeft: 離屏幕左的距離。
          4.dialogTop: 離屏幕上的距離。
          5.center: {yes | no | 1 | 0 }:窗口是否居中,默認(rèn)yes,但仍可以指定高度和寬度。
          6.help: {yes | no | 1 | 0 }:是否顯示幫助按鈕,默認(rèn)yes。
          7.resizable: {yes | no | 1 | 0 } [IE5+]:是否可被改變大小。默認(rèn)no。
          8.status: {yes | no | 1 | 0 } [IE5+]:是否顯示狀態(tài)欄。默認(rèn)為yes[ Modeless]或no[Modal]。
          9.scroll:{ yes | no | 1 | 0 | on | off }:指明對(duì)話框是否顯示滾動(dòng)條。默認(rèn)為yes。
          下面幾個(gè)屬性是用在HTA中的,在一般的網(wǎng)頁中一般不使用。
          10.dialogHide:{ yes | no | 1 | 0 | on | off }:在打印或者打印預(yù)覽時(shí)對(duì)話框是否隱藏。默認(rèn)為no。
          11.edge:{ sunken | raised }:指明對(duì)話框的邊框樣式。默認(rèn)為raised。
          12.unadorned:{ yes | no | 1 | 0 | on | off }:默認(rèn)為no。

          參數(shù)傳遞:
          1.要想對(duì)話框傳遞參數(shù),是通過vArguments來進(jìn)行傳遞的。類型不限制,對(duì)于字符串類型,最大為4096個(gè)字符。也可以傳遞對(duì)象,例如:


          <script>
          var obj = new Object();
          obj.name="51js";
          window.showModalDialog("modal.htm",obj,"dialogWidth=200px;dialogHeight=100px");
          </script>
          modal.htm
          <script>
          var obj = window.dialogArguments
          alert("您傳遞的參數(shù)為:" + obj.name)
          </script>


          2.可以通過window.returnValue向打開對(duì)話框的窗口返回信息,當(dāng)然也可以是對(duì)象。例如:

          <script>
          str =window.showModalDialog("modal.htm",,"dialogWidth=200px;dialogHeight=100px");
          alert(str);
          </script>
          modal.htm
          <script>
          window.returnValue="/";
          </script>
           

          posted @ 2010-08-26 11:00 賀挺 閱讀(251) | 評(píng)論 (0)編輯 收藏

          主站蜘蛛池模板: 微山县| 高州市| 明溪县| 乾安县| 沙田区| 双辽市| 成武县| 湘潭县| 吉木萨尔县| 兴国县| 电白县| 建宁县| 辽中县| 博野县| 永济市| 霸州市| 高陵县| 平原县| 凌源市| 丰台区| 湘潭市| 阿瓦提县| 获嘉县| 邮箱| 淳安县| 丰台区| 绥芬河市| 炎陵县| 容城县| 苏州市| 南充市| 都兰县| 侯马市| 荣成市| 南溪县| 阳东县| 闽清县| 宁津县| 方正县| 嵊州市| 宁河县|