>
FOR i IN 1..p_conp_id.COUNT LOOP
--
BEGIN
--
UPDATE inty_conp_params
SET max_interruptions = p_max_int(i),
max_interruption_days = p_max_int_days(i),
max_interruption_length = p_max_int_len(i)
WHERE conp_id = p_conp_id(i)
AND inty_id = p_inty_id;
--
EXCEPTION
WHEN OTHERS THEN
ROLLBACK TO SAVEPOINT before_ins_or_upd_inty;
l_success := FALSE;
p_return_error := caco_utilities.get_module_text(3600);
-- An unexpected error has occurred while updating the interruption type. Please contact support
caco_debug.putline('efno_200$sp.insert_interruption_type: '
||'Update of inty_conp_params record failed : '||sqlerrm(sqlcode));
-- Write an error and carry on
cout_err.report_and_go( p_exception_number => sqlcode
, p_exception_message => 'Failed updating inty_conp_params record: '||sqlerrm(sqlcode)
, p_source => 'efno_200$sp.ins_or_upd_int_type');
--
EXIT upd_icp_loop;
END;
--
END LOOP upd_icp_loop;
--
END IF;
--
END IF;
--
COMMIT;
--
RETURN l_success;
--
END;
--
-- Startup
--
PROCEDURE startup(p_inty_id IN VARCHAR2 DEFAULT NULL
, p_int_type_code IN VARCHAR2 DEFAULT NULL
, p_description IN VARCHAR2 DEFAULT NULL
, p_cate_id IN VARCHAR2 DEFAULT NULL
, p_ins_or_upd IN VARCHAR2 DEFAULT 'INSERT'
, p_action IN VARCHAR2 DEFAULT NULL
, p_min_date IN VARCHAR2 DEFAULT NULL
, p_conp_id IN owa_util.vc_arr DEFAULT g_empty_vc_array
, p_max_int IN owa_util.vc_arr DEFAULT g_empty_vc_array
, p_max_int_days IN owa_util.vc_arr DEFAULT g_empty_vc_array
, p_max_int_len IN owa_util.vc_arr DEFAULT g_empty_vc_array
) IS
--
l_success BOOLEAN := TRUE;
l_return_error VARCHAR2(250);
l_ins_or_upd VARCHAR2(10) := p_ins_or_upd;
l_max_int_error owa_util.vc_arr;
l_max_int_days_error owa_util.vc_arr;
l_max_int_len_error owa_util.vc_arr;
--
BEGIN
--
IF NOT caco_security.security_check(g_package_name) THEN
RETURN;
END IF;
--
IF p_action = g_submit_lbl THEN -- insert
--
l_success := ins_or_upd_int_type(p_int_type_code => p_int_type_code,
p_description => p_description,
p_cate_id => p_cate_id,
p_ins_or_upd => 'INSERT',
p_min_date => p_min_date,
p_conp_id => p_conp_id,
p_max_int => p_max_int,
p_max_int_days => p_max_int_days,
p_max_int_len => p_max_int_len,
p_return_error => l_return_error,
p_max_int_error => l_max_int_error,
p_max_int_days_error => l_max_int_days_error,
p_max_int_len_error => l_max_int_len_error
);
--
ELSIF p_action = g_update_lbl THEN --update
--
l_ins_or_upd := 'UPDATE';
--
l_success := ins_or_upd_int_type(p_inty_id => p_inty_id,
p_int_type_code => p_int_type_code,
p_description => p_description,
p_cate_id => p_cate_id,
p_ins_or_upd => l_ins_or_upd,
p_conp_id => p_conp_id,
p_max_int => p_max_int,
p_max_int_days => p_max_int_days,
p_max_int_len => p_max_int_len,
p_return_error => l_return_error,
p_max_int_error => l_max_int_error,
p_max_int_days_error => l_max_int_days_error,
p_max_int_len_error => l_max_int_len_error
);
--
END IF;
--
standard_html_header;
--
htp.p('');
--
htp.p(''); -- Submit_form
--
htp.p('
');
--
wsgl.closepagebody;
--
END;
--
FUNCTION about RETURN VARCHAR2 IS
BEGIN
RETURN(g_package_name || chr(10) || g_revision || chr(10) || g_header);
END about;
--
END efnow201$;
/