Hi,
instead of using gridview to insert student marks (I have
hundreds of students) thought I used the Excel:
1) allow managers of
each module after authentication to download the excel file (containing
the students enrolled in the given module), the excel file ted is
generated by the following code:
Id_student ____ maks of subject1
-------- ----maks of subject2
cn.Open();
SqlDataAdapter da = new SqlDataAdapter(@"DECLARE @MATIERE nvarchar(max)
SELECT @MATIERE =
STUFF(
(
select distinct ',[' + LIBELLE_MATIERE + ']'
from MATIERE where CODE_MODULE =11
for xml path('')
),
1,1,'')
DECLARE @SQL nvarchar(max)
SELECT @SQL = N'
select
*
from (
SELECT ETUDIANT.NUM_INSCRIPTION, ETUDIANT.NOM_PRENOM_ETUDIANT_ARABE,EXAMEN.CODE,
EXAMEN.NOTE,
MATIERE.LIBELLE_MATIERE
FROM ETUDIANT INNER JOIN
...
Go to the complete details ...