USP_DATAFORMTEMPLATE_VIEW_EDITSTUDENTSCHEDULE
The load procedure used by the view dataform template "Edit student schedule"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@DATALOADED | bit | INOUT | Output parameter indicating whether or not data was actually loaded. |
@SESSIONID | uniqueidentifier | INOUT | SESSIONID |
@HEADER | nvarchar(200) | INOUT | HEADER |
@STUDENTRECORDTYPEID | uniqueidentifier | INOUT | STUDENTRECORDTYPEID |
@SCHOOLID | uniqueidentifier | INOUT | SCHOOLID |
@STUDENTS | xml | INOUT | STUDENTS |
@SESSIONTERMS | xml | INOUT | SESSIONTERMS |
@SCHEDULETIME_PERIODS | bit | INOUT | SCHEDULETIME_PERIODS |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_EDITSTUDENTSCHEDULE
(
@CURRENTAPPUSERID uniqueidentifier,
@DATALOADED bit = 0 output,
@SESSIONID uniqueidentifier = null output,
@HEADER nvarchar(200) = null output,
@STUDENTRECORDTYPEID uniqueidentifier = null output,
@SCHOOLID uniqueidentifier = null output,
@STUDENTS xml = null output,
@SESSIONTERMS xml = null output,
@SCHEDULETIME_PERIODS bit = null output
)
as
set nocount on;
-- be sure to set this, in case the select returns no rows
set @DATALOADED = 1;
select
@SESSIONID = SESSIONID,
@HEADER = HEADER,
@SCHOOLID = SCHOOLID
from dbo.UFN_APPUSERSESSION_GETHEADERTEXT(@CURRENTAPPUSERID)
select
@SCHEDULETIME_PERIODS = case when TIMETABLE.SCHEDULETIMECODE = 0 then 1 else 0 end
from dbo.SESSION
inner join dbo.TIMETABLE on SESSION.TIMETABLEID = TIMETABLE.ID
where SESSION.ID = @SESSIONID
select @STUDENTRECORDTYPEID = ID from dbo.RECORDTYPE where upper(NAME) = 'STUDENT';
select
@STUDENTS = dbo.UFN_SESSION_GETSTUDENTS_TOITEMLISTXML(@SESSIONID, @SCHOOLID),
@SESSIONTERMS = dbo.UFN_SESSION_GETTERMS_TOITEMLISTXML(@SESSIONID)
return 0;