• Non ci sono risultati.

Appendice B: Web Service ReportGenerator

N/A
N/A
Protected

Academic year: 2021

Condividi "Appendice B: Web Service ReportGenerator"

Copied!
3
0
0

Testo completo

(1)

96

Appendice B: Web Service

ReportGenerator

using System; using System.Collections; using System.ComponentModel; using System.Configuration; using System.Data; using System.Diagnostics; using System.Web; using System.Web.Services; namespace Statini.Admin { /// <summary>

/// Generate reports for registered exams. /// </summary>

[WebService(Namespace="http://di.unipi.it/webservices/")]

public class ReportsGenerator : System.Web.Services.WebService { public ReportsGenerator() {

InitializeComponent(); }

#region Component Designer generated code //Required by the Web Services Designer private IContainer components = null;

(2)

97 /// <summary>

/// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary>

private void InitializeComponent() { }

/// <summary>

/// Clean up any resources being used. /// </summary>

protected override void Dispose( bool disposing ) { if(disposing && components != null) {

components.Dispose(); }

base.Dispose(disposing); }

#endregion

/// <returns>the number of generated reports</returns>

[WebMethod(Description="Generate and email to teacher report of recent grades")]

public int GenerateForProfessors() {

Report rep = new Report(this.Server.MapPath("")); try {

return rep.GenerateForProfessors(Global.esami); } catch (Exception ex) {

string email =

(3)

98 if (email != "")

rep.Send(email, "Error on generation", ex.ToString()); } return 0; } /// <summary> /// /// </summary>

/// <returns>the number of generated reports</returns> [WebMethod(Description="Generate and upload to admin server file with recent grades")]

public int GenerateForSecretary() {

Report rep = new Report(this.Server.MapPath("")); try {

return rep.GenerateForSecretary(Global.esami); } catch (Exception ex) {

string email =

(string)ConfigurationSettings.AppSettings["helpMail"]; if (email != "")

rep.Send(email, "Error on generation", ex.ToString());

}

return 0; }

Riferimenti

Documenti correlati

Stereotactic treatment are delivered in single fraction because of uncomfortable bloody immobilization sys- tem such as Leksell helmet. It allows high accurancy in patient

The material flow and information flow on the VMI supply chain is shown in Figure 2, the dotted line indicates how the VMI system controls the transactions in the store /

Si può però anche notare come nella prova in uscita gli allievi che hanno scritto unicamente lo svolgimento sono uguali a zero, ciò significa che tutti hanno elaborato

On June 17, 1998, the first remote telerobotic percutaneous renal access procedure was performed between the Johns Hopkins Hospital, Baltimore, Maryland, USA, and Tor Vergata

In the seminal paper [1], Giorgio Talenti established sharp estimates of the solution to a boundary value prob- lem of a second order elliptic partial differential equation in terms

Mean daily temperatures and weekly Drosophila suzukii trap counts in Pergine, Trentino, Italy during 2013... suzukii trap counts were observed on 30 May at an average of three flies

Sembra comunque opportuno iniziare dall’Ospedale per acuti ad alta tecnologia e assistenza, che è il nodo più difficile e complesso (pensiamo ad es. alla comples- sità dei flussi e

Fra gli attori coinvolti nella realizzazione e pianificazione dell’attività formativa, va in primo luogo ricordato l’Istituto Federale della Formazione, i cui compiti principali sono