Click here to Skip to main content
15,923,222 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionany suggestions for the webapplication I am developing involving two list with selections Pin
vjvjvjvj30-May-10 13:05
vjvjvjvj30-May-10 13:05 
AnswerRe: any suggestions for the webapplication I am developing involving two list with selections Pin
maltova31-May-10 18:50
maltova31-May-10 18:50 
AnswerRe: any suggestions for the webapplication I am developing involving two list with selections Pin
Amit M patel31-May-10 20:56
Amit M patel31-May-10 20:56 
Questionintegration of applications Pin
NetQuestions29-May-10 21:32
NetQuestions29-May-10 21:32 
Questioninsert with business object Pin
amina8929-May-10 12:54
amina8929-May-10 12:54 
AnswerRe: insert with business object Pin
Sandeep Mewara30-May-10 4:59
mveSandeep Mewara30-May-10 4:59 
QuestionRe: insert with business object Pin
amina8930-May-10 22:29
amina8930-May-10 22:29 
QuestionExcel to import and export data is it the right way? Pin
amina8929-May-10 12:49
amina8929-May-10 12:49 
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:
Num_inscription note_matière1 -------- ---- note_matière2

  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
                      EXAMEN ON ETUDIANT.NUM_INSCRIPTION = EXAMEN.NUM_INSCRIPTION INNER JOIN
                      CAPITALISE_MODULE ON 
                      ETUDIANT.NUM_INSCRIPTION = CAPITALISE_MODULE.NUM_INSCRIPTION INNER JOIN
                      MATIERE ON EXAMEN.CODE_MATIERE = MATIERE.CODE_MATIERE INNER JOIN
                      MODULE ON CAPITALISE_MODULE.CODE_MODULE = MODULE.CODE_MODULE 
                      AND MATIERE.CODE_MODULE = MODULE.CODE_MODULE
WHERE      (CAPITALISE_MODULE.CODE_MODULE = 11) AND 
                      (CAPITALISE_MODULE.CODE_TYPE_RELATION_MODULE = 1)
) Data
PIVOT (
 SUM(NOTE)
 FOR LIBELLE_MATIERE
 IN (
  ' + @MATIERE + '
 )
) PivotTable
'
 
exec sp_executesql @SQL
 
", cn);
       DataTable dt = new DataTable();
       da.Fill(dt);
       cn.Close();
 
       Response.Clear();
       Response.ContentType = "application/vnd.ms-excel";
       string sep = "";
       foreach (DataColumn dc in dt.Columns)
       {
              Response.Write(sep + dc.ColumnName);
              sep = "\t";
       }
       Response.Write("\n");
 
       int i;
       foreach (DataRow dr in dt.Rows)
       {
              sep = "";
              for (i = 0; i < dt.Columns.Count; i++)
              {
                     Response.Write(sep + dr[i].ToString());
                     sep = "\t";
              }
              Response.Write("\n");
       }
 
}
 
 
   
}




But in this code I do not know how to:

* Add the following condition: the student'marks is between 0 and 20.

* Calculate the average of this module : sum (coeff * mark) / sum (coeff)

2) Allowing responsable module send me the file containing the data (but then I do not know how)
3) Using data, by sending them to the database to calculate averages.
if itsnt the better way thank you to guide me I feel disturbed, and I really need help.
QuestionHow to pass username and password between sites? Pin
PunkIsNotDead29-May-10 12:27
PunkIsNotDead29-May-10 12:27 
AnswerRe: How to pass username and password between sites? Pin
Andreas X29-May-10 21:59
professionalAndreas X29-May-10 21:59 
GeneralHow to pass username and password between sites? Pin
PunkIsNotDead30-May-10 17:20
PunkIsNotDead30-May-10 17:20 
GeneralRe: How to pass username and password between sites? Pin
raju melveetilpurayil31-May-10 11:10
professionalraju melveetilpurayil31-May-10 11:10 
AnswerRe: How to pass username and password between sites? Pin
aashish.saalvi1-Jun-10 1:55
aashish.saalvi1-Jun-10 1:55 
Questionsome WebMethods in aspx and some in asmx Pin
Seishin#29-May-10 10:40
Seishin#29-May-10 10:40 
AnswerRe: some WebMethods in aspx and some in asmx Pin
Seishin#31-May-10 7:46
Seishin#31-May-10 7:46 
QuestionAsp .Net Page with different languages Pin
FJJCENTU29-May-10 8:07
FJJCENTU29-May-10 8:07 
AnswerRe: Asp .Net Page with different languages Pin
Abhishek Sur29-May-10 9:27
professionalAbhishek Sur29-May-10 9:27 
QuestionHelp on reports Pin
Prasad Bansi Vagal29-May-10 5:16
Prasad Bansi Vagal29-May-10 5:16 
AnswerRe: Help on reports Pin
Sandeep Mewara29-May-10 10:30
mveSandeep Mewara29-May-10 10:30 
Questionhow to search on homepage of respective item? Pin
hi_everybody29-May-10 2:35
hi_everybody29-May-10 2:35 
AnswerRe: how to search on homepage of respective item? Pin
Andreas X29-May-10 12:22
professionalAndreas X29-May-10 12:22 
Questiongetting value of current page's value after response.redirect Pin
puja29-May-10 0:42
puja29-May-10 0:42 
AnswerRe: getting value of current page's value after response.redirect Pin
Brij29-May-10 0:54
mentorBrij29-May-10 0:54 
GeneralRe: getting value of current page's value after response.redirect Pin
puja29-May-10 0:58
puja29-May-10 0:58 
GeneralRe: getting value of current page's value after response.redirect Pin
Brij29-May-10 1:31
mentorBrij29-May-10 1:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.