示例#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 });
 }
示例#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());
 }
示例#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 });
 }
示例#4
0
 public static void CreatePaperXML(string filePath, string paperId)
 {
     if (File.Exists(filePath))
     {
         File.Delete(filePath);
     }
     paperXML = new XMLAssistant(filePath, XMLType.Paper, paperId);
 }
示例#5
0
 public static List<IdAnswerType> ReadStudentAns(string filePath)
 {
     studentAnsXML = new XMLAssistant(filePath, XMLType.StudentAnswer, null);
     return studentAnsXML.GetAnswer();
 }
示例#6
0
 public static List<IdAnswerType> ReadPaperAns(string filePath)
 {
     paperAnsXML = new XMLAssistant(filePath, XMLType.PaperAnswer, null);
     return paperAnsXML.GetAnswer();
 }
示例#7
0
 public static List<IdScoreType> ReadScoreSheet(string filePath)
 {
     scoreXML = new XMLAssistant(filePath, XMLType.StudentScore, null);
     return scoreXML.GetPaper();
 }
示例#8
0
 public static List<IdScoreType> ReadPaper(string filePath)
 {
     paperXML = new XMLAssistant(filePath, XMLType.Paper, null);
     return paperXML.GetPaper();
 }
示例#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;
     }
 }
示例#10
0
 public static int GetStudentAnsPaper(string filePath)
 {
     studentAnsXML  = new XMLAssistant(filePath, XMLType.StudentAnswer, null);
     return Convert.ToInt32(studentAnsXML.getStuAnsPaperId());
 }
示例#11
0
 public static string getPaperId(string filePath)
 {
     paperXML = new XMLAssistant(filePath, XMLType.Paper, null);
     return paperXML.getPaperId();
 }
示例#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 });
 }