// GET: CatProgramas
        public ActionResult Start()
        {
            if (sesion == null)
            {
                sesion = SessionDB.start(Request, Response, false, db);
            }

            CatProgramasModel model = new CatProgramasModel();

            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_PROGRAMAS"] = "PROGRAMAS_TMP";
                sesion.saveSession();

                ViewBag.BlockingPanel_1 = Main.createBlockingPanel("blocking-panel-1");
                ViewBag.BlockingPanel_2 = Main.createBlockingPanel("blocking-panel-2", false, "");
                ViewBag.DataTable       = CreateDataTable(10, 1, null, "CVE_PROGRAMA", "ASC", sesion);

                ViewBag.Scripts = Scripts.addScript() + Scripts.setPrivileges(Privileges, sesion);

                //Intercom
                ViewBag.User     = sesion.nickName.ToString();
                ViewBag.Email    = sesion.nickName.ToString();
                ViewBag.FechaReg = DateTime.Today;

                if (!sesion.permisos.havePermission(Privileges[0].Permiso))
                {
                    return(View(Factory.View.NotAccess));
                }

                Log.write(this, "Start", LOG.CONSULTA, "Ingresa a pantalla 'Programas' ", sesion);

                return(View(Factory.View.Access + "ConsultarBanner/CatProgramas/Start.cshtml"));
            }
            catch (Exception e)
            {
                ViewBag.Notification = Notification.Error(e.Message);
                Log.write(this, "Start", LOG.ERROR, "Ingresa a pantalla 'Programas' " + e.Message, sesion);

                return(View(Factory.View.Access + "ConsultarBanner/CatProgramas/Start.cshtml"));
            }
        }
        public string Importar(string cveProgramas)
        {
            CatProgramasModel model = new CatProgramasModel();

            if ((model.sesion = SessionDB.start(Request, Response, false, model.db, SESSION_BEHAVIOR.AJAX)) == null)
            {
                return(string.Empty);
            }

            if (model.Importar(cveProgramas))
            {
                Log.write(this, "Importar", LOG.EDICION, "cveProgramas:" + cveProgramas, model.sesion);
                return(Notification.Succes("Los datos se ha actualizado satisfactoriamente."));
            }
            else
            {
                return(Notification.Error("No se ha podido hacer la importaci&ocuate;n"));
            }
        }