<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<activity id="__fKXwD3DqSbBDbuLW1Vy">
  <name>删除</name>
  <parentId>__ksTMCWREuhtiNcHQhNJ</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <type>3</type>
  <onActionForm></onActionForm>
  <onActionView></onActionView>
  <onActionFlow></onActionFlow>
  <onActionPrint></onActionPrint>
  <colorType>default</colorType>
  <beforeActionScript><![CDATA[//删除对应的章节信息         
         (function(){         
          	var selectId = getParameterAsText("_selects");                               
       	var it = 0;                                 
          	var arrto = splitText(selectId,";");       
       	var errorStr = "";                    
       	var dominId = getDomainid();               
       	it =arrto.length;                                                                         
       	if(!isNotNull(selectId)){                               
         	return createAlert("请先勾选需要删除的数据");                               
       	}           
       	for(var i=0;i<arrto.length;i++){        
             var lessonId =  arrto[i];        
             var sql="select count(ID) count, ITEM_AUTHLESSONNAME from tlk_authorization_record where ITEM_AUTHLESSONID = '"+lessonId+"'";                             
             var datas = queryByDSName("tms",sql);        
             var data = datas.iterator( ).next();        
             if(data.get("count") != "0"){        
               errorStr += data.get("ITEM_AUTHLESSONNAME") + "</br>";        
             }   
          }  
  		if(errorStr != ""){  
          	return createAlert(errorStr + "已被授权，无法删除！");  
          }else{  
         	var sql ="delete t1,t2 from tlk_lesson_chapter t1 "+         
          		"left JOIN "+         
         		"tlk_lesson_section t2 on t1.ID = t2.ITEM_LESSONCHAPTERID "+         
         		"where t1.ITEM_LESSONID = '"+ lessonId +"'";        
         		deleteByDSName("tms",sql);         
           }       
         })()]]></beforeActionScript>
  <afterActionScript><![CDATA[]]></afterActionScript>
  <retractBeforeActionScript><![CDATA[]]></retractBeforeActionScript>
  <retractAfterActionScript><![CDATA[]]></retractAfterActionScript>
  <hiddenScript><![CDATA[]]></hiddenScript>
  <readonlyScript><![CDATA[]]></readonlyScript>
  <startFlowScript><![CDATA[]]></startFlowScript>
  <editMode>0</editMode>
  <flowShowType></flowShowType>
  <fileNameScript><![CDATA[]]></fileNameScript>
  <orderno>1</orderno>
  <stateToShow></stateToShow>
  <parentView>__ksTMCWREuhtiNcHQhNJ</parentView>
  <parentForm></parentForm>
  <impmappingconfigid>__7tkXQ8UWGSqrTJkHtCB</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[]]></dispatcherParams>
  <jumpMode>1</jumpMode>
  <jumpActOpenType>0</jumpActOpenType>
  <withOld>false</withOld>
  <actionType>0</actionType>
  <actionDispatcherUrlScript><![CDATA[]]></actionDispatcherUrlScript>
  <actionSelection>0</actionSelection>
  <relatedFormId></relatedFormId>
  <actionScript><![CDATA[]]></actionScript>
  <workFlowType>0</workFlowType>
  <contextMenu>false</contextMenu>
  <showInToolbar>true</showInToolbar>
  <transpond>选择</transpond>
  <targetList>__3hgJK72PUZrQCame6LT|</targetList>
  <label><![CDATA[]]></label>
</activity>