• ComponentArt:Grid args.get_item().getMember("CURRENCY").get_value()


    ComponentArt:Grid中的当前行
    var varNumber=0;//记录用户把所有已选择的CheckBox取消了选择
        
             
    function Select(sender,args) //args本身带了具体的行包括行id
             {       
                    
    var varCurrency="";   
                    
    var varSZDW;    //涉帐单位
                    if(!args.get_item().getMember("choice").get_value())//为真时,表示当前没有被选中的行
                    {
                        varCurrency  
    =  args.get_item().getMember("CURRENCY").get_value();
                        varSZDW 
    = args.get_item().getMember("COMP_C_CNAME").get_value();
                        
    if(varNumber==0)
                        
    {
                            document.getElementById(
    "txtCurrency").value=varCurrency;                       
                            document.getElementById(
    "hid1").value=varSZDW;
                            varNumber
    ++;//第一次有行被选中,记录所选行总数的变量加一
                        }

                        
    else//已经有行被选
                        {
                            
    //再次选中的行的CURRENCY列与前面已选保存在txtCurrency中的货币种类不同,否定当前行,不需要判断涉账单位是否相同
                            if(args.get_item().getMember("CURRENCY").get_value()!=document.getElementById("txtCurrency").value)
                             
    {
                                args.get_item().setValue(
    1false);
                                  alert(
    "币种不同");
                              }

                              
    else//货币种类相同,只需记载varNubmer++;
                              {
                                  
    if(args.get_item().getMember("COMP_C_CNAME").get_value()!=document.getElementById("hid1").value)//涉账单位不同
                                  {
                                       args.get_item().setValue(
    1,false);
                                       alert(
    "涉账单位不同");                                  
                                  }

                                  
    else//涉账单位也相同,才需记载varNubmer++;
                                  {   
                                      varNumber
    ++
                                  }

                              }

                             
                        }

                        
                    }

                    
    else//为真时,表示当前有选中行,需要取消某些行
                    {
                        
                        varNumber
    --;//每取消一个,只需把记录所选行总数减一
                        if(varNumber==0)//所有行都被取消了
                        {
                            document.getElementById(
    "txtCurrency").value="";//最后置空该TextBox
                        }

                    }
                    
                  
               
                
                   

                
    var ss;
                ss
    =GetCheckedItems(Grid1,1);            
                
    var arrTmp = ss.split(",");
                
    var varTemp=0;
                
    for(var i = 0; i < arrTmp.length-1; i++)
                
    {
                    varTemp
    +=parseFloat(arrTmp[i]);
                }
               
                document.form1.txtAmount.value
    =varTemp;//赋值给总金额TextBox
               
           
               
             }
     
    客户端事件注册:
     </Levels>
                    
    <ClientEvents>
                        
    <ItemCheckChange EventHandler="Select" />
                    
    </ClientEvents>
       
    </ComponentArt:Grid>

  • 相关阅读:
    RobotFrameWork--selenium2模拟chrome的user agent
    robot设置chrome mobile emulation
    [转]如何用git将项目代码上传到github
    poj1182 食物链【并查集-好题!】
    hdu4998 Rotate【计算几何】
    poj3168 Barn Expansion【计算几何 平面扫描】
    FZU2110 Star【计算几何】
    poj1269 intersecting lines【计算几何】
    poj3304 Segments【计算几何】
    java大数
  • 原文地址:https://www.cnblogs.com/simhare/p/838038.html
Copyright © 2020-2023  润新知