Ejemplo n.º 1
0
 protected void WritePrograms_Click(object sender, EventArgs e)
 {
     try
     {
         List <UserPrograms> programs = ProgramsDao.getAllPrograms();
         foreach (UserPrograms p in programs)
         {
             ProgramsXmlWriter writer = new ProgramsXmlWriter(p);
             writer.writeXML();
         }
         lblmsg.Text = "User Programs successfully saved to the App_Data directory.";
     }
     catch (System.IO.IOException ex)
     {
         lblmsg.Text = "Sorry, there was an error, please try again.";
     }
 }
 protected void WritePrograms_Click(object sender, EventArgs e)
 {
     try
     {
         List<UserPrograms> programs = ProgramsDao.getAllPrograms();
         foreach (UserPrograms p in programs)
         {
             ProgramsXmlWriter writer = new ProgramsXmlWriter(p);
             writer.writeXML();
         }
         lblmsg.Text = "User Programs successfully saved to the App_Data directory.";
     }
     catch (System.IO.IOException ex)
     {
         lblmsg.Text = "Sorry, there was an error, please try again.";
     }
 }