protected override void OnUnload(EventArgs e) { if (DepConn != null) { DepConn.Destroy(); } GetVars.clearSystemDataAccess(this); base.OnUnload(e); }
protected void Page_Load(object sender, EventArgs e) { DataAccess DepConn = null; if (Request != null) { if (Request.Params["dep"] != null && Request.Params["dep"].ToString() != "") { dep = Request.Params["dep"]; } } DepConn = GetDepartmentConn(dep); if (DepConn == null) { GetVars.clearSystemDataAccess(this); return; } if (IsDataRequest()) { GestisciDataRequest(DepConn, dep); DepConn.Close(); DepConn.Destroy(); GetVars.clearSystemDataAccess(this); return; } //Se c'è il parametro idreg si tratta di una richiesta di curriculum--> invia il file if (Request.Params["idreg"] != null && Request.Params["idreg"] != "") { GestisciRichiestaCurriculum(DepConn); DepConn.Close(); DepConn.Destroy(); GetVars.clearSystemDataAccess(this); return; } if (!IsPostBack) { anno.Text = DateTime.Now.Year.ToString(); rdbTipo.SelectedValue = "C"; GetVars.clearSystemDataAccess(this); return; } RenderHtmlPage(DepConn); DepConn.Close(); DepConn.Destroy(); GetVars.clearSystemDataAccess(this); }