Exemple #1
0
 /// <summary>
 /// Page load event
 /// </summary>
 /// <param name="sender">Object which fires the event</param>
 /// <param name="e">Event arguments</param>
 protected void Page_Load(object sender, EventArgs e) {
     if (log.IsDebugEnabled) {
         log.Debug("Page_Load Starts");
         log.Debug("JSON files compiled");
     }
     string imgPathUrl = Request.Url.Scheme + "://" + Request.Url.Authority + "/" + Settings.ImageFolder + "/";
     ManageMovieCatalog mmc = new ManageMovieCatalog(Settings.JSONFolder + @"\" + Settings.FileMovieCatalog, Settings.JSONFolder + @"\" + Settings.FileMovies, imgPathUrl.Replace(@"\", "/"));
     mmc.CompileAllMoviesSchedule();
     Response.Write("Movie Schedule generated on " + DateTime.Now.ToString());
     Response.AddHeader("Access-Control-Allow-Origin", "*");
     if (log.IsDebugEnabled) {
         log.Debug("Page_Load Ends");                
     }
 }
Exemple #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender">Objet which sends event</param>
 /// <param name="e">event parameteres</param>
 protected void OnButtonActualizarCartelera(object sender, EventArgs e) {
     if (log.IsDebugEnabled) {
         log.Debug("OnButtonActualizarCartelera Starts");
     }
     string imgPathUrl = Request.Url.Scheme + "://" + Request.Url.Authority + "/" + Settings.ImageFolder + "/";
     ManageMovieCatalog mmc = new ManageMovieCatalog(Settings.JSONFolder + @"\" + Settings.FileMovieCatalog, Settings.JSONFolder + @"\" + Settings.FileMovies, imgPathUrl.Replace(@"\", "/"));
     mmc.CompileAllMoviesSchedule();
     registerToastrMsg(MessageType.Success, "Cartelera actualizada con éxito");
     if (log.IsDebugEnabled) {
         log.Debug("OnButtonActualizarCartelera Ends");
     }
 }
Exemple #3
0
 /// <summary>
 /// Saves current state for schedule and updates the billboard.
 /// </summary>
 /// <param name="sender">Objet which sends event</param>
 /// <param name="e">event parameteres</param>
 protected void OnButtonGuardar(object sender, EventArgs e) {
     if (log.IsDebugEnabled) {
         log.Debug("OnButtonGuardar Starts");
     }
     guardarHorario();
     string imgPathUrl = Request.Url.Scheme + "://" + Request.Url.Authority + "/" + Settings.ImageFolder + "/";
     ManageMovieCatalog mmc = new ManageMovieCatalog(Settings.JSONFolder + @"\" + Settings.FileMovieCatalog, Settings.JSONFolder + @"\" + Settings.FileMovies, imgPathUrl.Replace(@"\", "/"));
     mmc.CompileAllMoviesSchedule();
     if (log.IsDebugEnabled) {
         log.Debug("OnButtonGuardar Ends and redirects to CinesHorarios.aspx");
     }
     Response.Redirect("~/CinesHorarios.aspx");
 }