<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<activity id="__MYhQS31PNMuUuAhfXEM">
  <name>删除</name>
  <parentId>__Xq3r3eKoddb3a49Mrrg</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <type>1</type>
  <onActionForm></onActionForm>
  <onActionView>__Xq3r3eKoddb3a49Mrrg</onActionView>
  <colorType>default</colorType>
  <beforeActionScript><![CDATA[(function(){
 
 var selectId = getParameterAsText("_selects");//获取所选中数据的id结果集
 var msg = ""
 var arrto = splitText(selectId, ";"); //对这个结果集进行处理，以;进行切割，放到数组arrto
 if(isNotNull(selectId)){
     for (var i = 0; i < arrto.length; i++) { 
       var sql1 = "select ITEM_CLASSNAME,ITEM_CLASSSTATUS,ID from tlk_grade_card_class where ID ='" + arrto[i] + "'";
       var datas = queryByDSName("tms", sql1)
       if (datas != null) {
         for (var iterator = datas.iterator(); iterator.hasNext();){
           var map1 = iterator.next();//取值
           var classStatus = map1.get("ITEM_CLASSSTATUS");
           var className = map1.get("ITEM_CLASSNAME");
           if(!("0".equals(classStatus)||"5".equals(classStatus))){
             return className+"不符合删除条件！"
           }else{//符合条件的可以进行删除班级
             var sql = "delete from tlk_grade_card_class where ID='" + arrto[i] + "'";  
             deleteByDSName("tms", sql);
             var sql3="delete from tlk_level_class_student where ITEM_CLASSID='" + arrto[i] + "'"; 
             deleteByDSName("tms", sql3);
           }
         }
       }
       //return "删除成功！" //return 完后就会不执行载入视图
     }
  }else{
    return "请选择至少一条数据"
  }


})()]]></beforeActionScript>
  <afterActionScript><![CDATA[]]></afterActionScript>
  <hiddenScript><![CDATA[]]></hiddenScript>
  <readonlyScript><![CDATA[]]></readonlyScript>
  <editMode>0</editMode>
  <fileNameScript><![CDATA[]]></fileNameScript>
  <orderno>2</orderno>
  <parentView>__Xq3r3eKoddb3a49Mrrg</parentView>
  <impmappingconfigid></impmappingconfigid>
  <jumpType>0</jumpType>
  <expSub>false</expSub>
  <icon></icon>
  <disableFlowNode>false</disableFlowNode>
  <changeFlowOperator>false</changeFlowOperator>
  <changeFlowCc>false</changeFlowCc>
  <multiLanguageLabel></multiLanguageLabel>
  <dispatcherMode>0</dispatcherMode>
  <dispatcherUrl><![CDATA[]]></dispatcherUrl>
  <dispatcherParams><![CDATA[[{"paramKey":"","paramValue":""}]]]></dispatcherParams>
  <jumpMode>0</jumpMode>
  <jumpActOpenType>0</jumpActOpenType>
  <withOld>false</withOld>
  <actionType>0</actionType>
  <actionSelection>0</actionSelection>
  <workFlowType>0</workFlowType>
  <contextMenu>true</contextMenu>
  <showInToolbar>true</showInToolbar>
  <label><![CDATA[]]></label>
</activity>