(file) Return to act_addProgramtypes.cfm CVS log (file) (dir) Up to [Development] / p2rx-programs

 1 neenan 1.1 <!--- 	Name:  act_addprogramTypes.cfm
 2                	Purpose: This functions as the action file to link the existing programtypes selected by the user for their 
 3            				organization to the	dorganization table. The values are passed on from the dsp_addprogramtypes.cfm form.
 4            				Each time this page is called,the records in the dorgtoprogramtype table are deleted for the particular 
 5            				organization and fresh records are appended.
 6            		Date created: 02/24/2005
 7                   	Dependancy: URL.URL.Orgid
 8            		Variables: 	
 9            					
10            		Functions: 
11            		Date changed: 	02/24/2005			Prabin & Neena  Created & Documentation
12            ---> 	
13            
14            
15            <cfquery name="deletepg" datasource="#Programsdb#">
16            delete 
17            from   dOrgToProgramType
18            Where	OrgID = #URL.ORGID#
19            </cfquery> 
20            
21            
22 neenan 1.1 <cfset Array = #ListToArray(form.ProgramTypeID)#>
23            
24            <cfloop from="1" to="#ArrayLen(Array)#" index="x">
25            	<cfquery datasource="#Programsdb#">
26            	Insert Into dOrgtoprogramtype (OrgID, ProgramTypeID)
27            		Values(#URL.OrgID#, #Array[x]#)
28            	</cfquery>
29            </cfloop>
30            

CVS Admin
Powered by
ViewCVS 1.0-dev