Beispiel #1
0
 public static void CreatePaperAnsXML(string path, string paperId)
 {
     if (File.Exists(path))
     {
         File.Delete(path);
     }
     paperAnsXML = new XMLAssistant(path, XMLType.PaperAnswer, new String[] { paperId });
 }
Beispiel #2
0
 public static void CreateLogXML(string rootPath)
 {
     if (File.Exists(rootPath + "log.xml"))
     {
         int i = 1;
         while (File.Exists(rootPath + "log" + i.ToString() + ".xml"))
         {
             i++;
         }
         File.Move(rootPath + "log.xml", rootPath + "log" + i.ToString() + ".xml");
     }
     logXML = new XMLAssistant(rootPath + "log.xml", XMLType.Log,new object());
 }
Beispiel #3
0
 public static void CreateScoreXML(string path, string paperId, string stuId)
 {
     if (File.Exists(path))
     {
         File.Delete(path);
     }
     scoreXML = new XMLAssistant(path, XMLType.StudentScore, new String[] { paperId, stuId });
 }
Beispiel #4
0
 public static void CreatePaperXML(string filePath, string paperId)
 {
     if (File.Exists(filePath))
     {
         File.Delete(filePath);
     }
     paperXML = new XMLAssistant(filePath, XMLType.Paper, paperId);
 }
Beispiel #5
0
 public static List<IdAnswerType> ReadStudentAns(string filePath)
 {
     studentAnsXML = new XMLAssistant(filePath, XMLType.StudentAnswer, null);
     return studentAnsXML.GetAnswer();
 }
Beispiel #6
0
 public static List<IdAnswerType> ReadPaperAns(string filePath)
 {
     paperAnsXML = new XMLAssistant(filePath, XMLType.PaperAnswer, null);
     return paperAnsXML.GetAnswer();
 }
Beispiel #7
0
 public static List<IdScoreType> ReadScoreSheet(string filePath)
 {
     scoreXML = new XMLAssistant(filePath, XMLType.StudentScore, null);
     return scoreXML.GetPaper();
 }
Beispiel #8
0
 public static List<IdScoreType> ReadPaper(string filePath)
 {
     paperXML = new XMLAssistant(filePath, XMLType.Paper, null);
     return paperXML.GetPaper();
 }
Beispiel #9
0
 public static bool LoadLogXML(string rootPath)
 {
     if (File.Exists(rootPath + "log.xml"))
     {
         logXML = new XMLAssistant(rootPath + "log.xml", XMLType.Log, null);
         return true;
     }
     else
     {
         return false;
     }
 }
Beispiel #10
0
 public static int GetStudentAnsPaper(string filePath)
 {
     studentAnsXML  = new XMLAssistant(filePath, XMLType.StudentAnswer, null);
     return Convert.ToInt32(studentAnsXML.getStuAnsPaperId());
 }
Beispiel #11
0
 public static string getPaperId(string filePath)
 {
     paperXML = new XMLAssistant(filePath, XMLType.Paper, null);
     return paperXML.getPaperId();
 }
Beispiel #12
0
 public static void CreateStudentAnsXML(string rootPath, string stuId, string paperId)
 {
     if (File.Exists(rootPath + "studentAns.xml"))
     {
         File.Delete(rootPath + "studentAns.xml");
     }
     studentAnsXML = new XMLAssistant(rootPath + "studentAns.xml", XMLType.StudentAnswer, new String[] { stuId, paperId });
 }