Agencies and Programs
Select * from Organization where Orgid = #URL.Orgid#
Insert Into dOrganization
(OrganizationName, Phone, Extension, Division, FaxNumber, TimeZone, Address1, EmailName, GeoServiceID, Address2, Hotline, City, StateOrProvince, URL, PostalCode, Country, GraphicURL, Profile)
Values ('#dorg.OrganizationName#',
'#dorg.Phone#',
'#dorg.Extension#',
'#dorg.Division#',
'#dorg.FaxNumber#',
'#dorg.TimeZone#',
'#dorg.Address1#',
'#dorg.EmailName#',
#dorg.GeoServiceID#,
'#dorg.Address2#',
'#dorg.Hotline#',
'#dorg.City#',
'#dorg.StateOrProvince#',
'#dorg.URL#',
'#dorg.PostalCode#',
'#dorg.Country#',
'#dorg.GraphicURL#',
'#dorg.Profile#'
)
Select max(orgid) as maxid from dorganization
Select * from contacts where Orgid = #URL.Orgid#
INSERT INTO dContacts(Prefix, FirstName, Middle, LastName, NameSuffix, Title, Primary, WorkPhone, WorkExtension, MobilePhone, FaxNumber, EmailName, Address, City, State, Zip, OrgID)
Values('#Prefix#','#FirstName#','#Middle#','#LastName#','#NameSuffix#','#Title#','#Primary#','#WorkPhone#','#WorkExtension#','#MobilePhone#','#FaxNumber#','#EmailName#','#Address#','#City#','#State#','#Zip#',#getorgid.maxid#)
Select * from OrgtoProgramtype
where Orgid = #URL.Orgid#
Insert Into dOrgtoprogramtype (OrgID,ProgramTypeID)
Values(#getorgid.maxID#, #ProgTypeArray[x]#)
SELECT orgid, ServiceID
FROM OrgtoService
SELECT orgid, ServiceID
FROM OrgtoService
WHERE Orgid=#URL.orgid# And serviceid Not in (select serviceid from service where approved=1);
Insert Into dOrgtoService (OrgID, ServiceID)
Values(#getorgid.maxID#, #ServiceArray[x]#)
SELECT ds.service,ds.type,ds.Approved, os.orgid
FROM Service AS ds, Orgtoservice AS os
WHERE os.Orgid=#URL.Orgid# and os.serviceid=ds.serviceid and ds.approved=0;
Insert Into dService(Service,Type,Approved,CenterID)
Values('#NewServiceArray[x]#','#NewTypeArray[x]#',1,7)
Select max(serviceid) as maxserviceid from dService
Insert Into dOrgtoService (OrgID, ServiceID)
Values(#getorgid.maxID#, #getserviceid.maxserviceid#)
SELECT *
FROM dOrganization
where orgID = #maxOrgID#
--->