// GET: CatPeriodos public ActionResult Start() { if (sesion == null) { sesion = SessionDB.start(Request, Response, false, db); } CatCalendarioRuaModel model = new CatCalendarioRuaModel(); if ((model.sesion = sesion) == null) { return(Content("")); } model.Clean(); try { Main view = new Main(); ViewBag.MainUser = view.CreateMenuInfoUser(sesion); ViewBag.Main = view.createMenu(22, 45, sesion); //sesion.vdata["TABLE_CALENDARIORUA"] = "CALENDARIORUA_TMP"; sesion.vdata["TABLE_CALENDARIORUA"] = "QCalendarioRuaT01"; sesion.saveSession(); ViewBag.BlockingPanel_1 = Main.createBlockingPanel("blocking-panel-1"); ViewBag.DataTable = CreateDataTable(10, 1, null, "PERIODO", "ASC", sesion); Scripts.SCRIPTS = new string[] { "js/ConsultarBanner/CatCalendarioRua/CatCalendarioRua.js" }; ViewBag.Scripts = Scripts.addScript(); ViewBag.Ciclo = CreaCombo("select * from ciclos", "CVE_CICLO", "CVE_CICLO", ""); //Intercom ViewBag.User = sesion.nickName.ToString(); ViewBag.Email = sesion.nickName.ToString(); ViewBag.FechaReg = DateTime.Today; Log.write(this, "Start", LOG.CONSULTA, "Ingresa a pantalla 'Calendario RUA' ", sesion); return(View(Factory.View.Access + "ConsultarBanner/CatCalendarioRua/Start.cshtml")); } catch (Exception e) { ViewBag.Notification = Notification.Error(e.Message); Log.write(this, "Start", LOG.ERROR, "Ingresa a pantalla 'Calendario RUA' " + e.Message, sesion); return(View(Factory.View.Access + "ConsultarBanner/CatCalendarioRua/Start.cshtml")); } }
public string Importar(string periodos, string cveCiclo) { CatCalendarioRuaModel model = new CatCalendarioRuaModel(); if ((model.sesion = SessionDB.start(Request, Response, false, model.db, SESSION_BEHAVIOR.AJAX)) == null) { return(string.Empty); } if (model.Importar(periodos, cveCiclo)) { Log.write(this, "Importar", LOG.EDICION, "periodos:" + periodos, model.sesion); return(Notification.Succes("Los datos se han actualizado satisfactoriamente.")); } else { return(Notification.Error("No se ha podido hacer la importaciĆ³n")); } }