Example #1
0
 string caller = ""; // who's calling the grid form
 #endregion
 #region Init, load, unload events
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     uex = CntLainsaSci.GetUsuarioExtranet((int)Session["UsuarioExtranetId"], ctx);
     if (uex == null)
     {
         Response.Redirect("Default.aspx");
     }
     //
     CntWinWeb.TranslateRadGridFilters(RadGrid1);
     if (Request.QueryString["Mode"] != null)
     {
         mode = Request.QueryString["Mode"];
     }
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
     }
     if (Request.QueryString["GrupoMensajesId"] != null)
     {
         grupoMensajes = CntLainsaSci.GetGrupoMensajes(int.Parse(Request.QueryString["GrupoMensajesId"]), ctx);
         if (grupoMensajes != null)
         {
             //RadGrid1.Columns.FindByDataField("GrupoMensajes.Nombre").Visible = false;
         }
     }
 }
Example #2
0
 string caller = ""; // who's calling the grid form
 #endregion
 #region Init, load, unload events
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
     if (usuario == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         Session["UsuarioId"] = usuario.UsuarioId;
     }
     // si llega aquí está autorizado
     permiso = CntLainsaSci.GetPermiso(usuario.GrupoUsuario, "Programagrid", ctx);
     if (permiso == null)
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
         RadNotification1.Show();
         RadAjaxManager1.ResponseScripts.Add("closeWindow();");
     }
     CntWinWeb.TranslateRadGridFilters(RadGrid1);
     if (Request.QueryString["Mode"] != null)
     {
         mode = Request.QueryString["Mode"];
     }
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
     }
 }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         CntWinWeb.TranslateRadGridFilters(RadGrid1);
         if (empresa != null)
         {
             lblTitulo.Text = empresa.Nombre;
         }
         if (instalacion != null)
         {
             lblTitulo.Text = instalacion.Nombre;
         }
         if (categoria != null)
         {
             lblTitulo.Text = categoria.Nombre;
         }
         if (subCategoria != null)
         {
             lblTitulo.Text = subCategoria.Nombre;
         }
         if (revisables)
         {
             lblTitulo.Text = String.Format("Bienvenido {0}, estos son los documentos pendientes de revisión", uex.Nombre);
         }
     }
 }
Example #4
0
 string caller = ""; // who's calling the grid form
 #endregion
 #region Init, load, unload events
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
     if (usuario == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         Session["UsuarioId"] = usuario.UsuarioId;
     }
     // si llega aquí está autorizado
     permiso = CntLainsaSci.GetPermiso(usuario.GrupoUsuario, "dispositivogrid", ctx);
     //usuario.GrupoTrabajo = CntLainsaSci.GetGrupoTrabajo(1, ctx);
     if (permiso == null)
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
         RadNotification1.Show();
         RadAjaxManager1.ResponseScripts.Add("closeWindow();");
     }
     CntWinWeb.TranslateRadGridFilters(RadGrid1);
     if (Request.QueryString["InTab"] != null)
     {
         mode = Request.QueryString["InTab"];
     }
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
     }
     if (Request.QueryString["DispositivoId"] != null)
     {
         dispositivo = CntLainsaSci.GetDispositivo(int.Parse(Request.QueryString["DispositivoId"]), ctx);
         if (dispositivo != null)
         {
             RadGrid1.Columns.FindByDataField("dispositivo.Nombre").Visible = false;
         }
     }
     if (Request.QueryString["ProgramaId"] != null)
     {
         programa = CntLainsaSci.GetPrograma(int.Parse(Request.QueryString["ProgramaId"]), ctx);
         if (programa != null)
         {
             // Modificar la altura del grid para que quepan otros
             RadGrid1.PageSize       = 7;
             RadGrid1.ShowGroupPanel = false;
         }
     }
     if (Request.QueryString["InFrame"] != null)
     {
         if (Request.QueryString["InFrame"] == "S")
         {
             crear = false;
         }
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         CntWinWeb.TranslateRadGridFilters(RadGrid1);
         lblTitulo.Text = empresa.Nombre;
     }
 }
Example #6
0
 string caller           = "";   // who's calling the grid form
 #endregion
 #region Init, load, unload events
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     Usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
     if (Usuario == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         Session["UsuarioId"] = Usuario.UsuarioId;
     }
     // -- no hya tratamiento de permisos
     //permiso = CntLainsaSci.GetPermiso(Usuario.GrupoUsuario, "grupousuariogrid", ctx);
     //if (permiso == null)
     //{
     //    RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
     //                                          (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
     //                                          (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
     //    RadNotification1.Show();
     //    RadAjaxManager1.ResponseScripts.Add("closeWindow();");
     //}
     CntWinWeb.TranslateRadGridFilters(RadGrid1);
     if (Request.QueryString["Mode"] != null)
     {
         mode = Request.QueryString["Mode"];
     }
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
     }
     if (Request.QueryString["EmpresaId"] != null)
     {
         int empresaId = int.Parse(Request.QueryString["EmpresaId"]);
         empresa = CntLainsaSci.GetEmpresa(empresaId, ctx);
     }
     if (Request.QueryString["RevisionId"] != null)
     {
         int instalacionId = int.Parse(Request.QueryString["RevisionId"]);
         instalacion = CntLainsaSci.GetInstalacion(instalacionId, ctx);
     }
     if (empresa == null && instalacion == null)
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "TelephoneWithoutOwner"));
         RadNotification1.Show();
     }
     // control de skin
     if (Session["Skin"] != null)
     {
         RadSkinManager1.Skin = Session["Skin"].ToString();
     }
 }
Example #7
0
 string caller           = ""; // who's calling the grid form
 #endregion
 #region Init, load, unload events
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     Usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
     if (Usuario == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         Session["UsuarioId"] = Usuario.UsuarioId;
     }
     // si llega aquí está autorizado
     permiso = CntLainsaSci.GetPermiso(Usuario.GrupoUsuario, "documentogrid", ctx);
     if (permiso == null)
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
         RadNotification1.Show();
         RadAjaxManager1.ResponseScripts.Add("closeWindow();");
     }
     CntWinWeb.TranslateRadGridFilters(RadGrid1);
     if (Request.QueryString["Mode"] != null)
     {
         mode = Request.QueryString["Mode"];
     }
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
     }
     if (Request.QueryString["EmpresaId"] != null)
     {
         empresa = CntLainsaSci.GetEmpresa(int.Parse(Request.QueryString["EmpresaId"]), ctx);
         if (empresa != null)
         {
             RadGrid1.Columns.FindByDataField("Empresa.Nombre").Visible = false;
         }
     }
     if (Request.QueryString["RevisionId"] != null)
     {
         instalacion = CntLainsaSci.GetInstalacion(int.Parse(Request.QueryString["RevisionId"]), ctx);
         if (instalacion != null)
         {
             RadGrid1.Columns.FindByDataField("Empresa.Nombre").Visible     = false;
             RadGrid1.Columns.FindByDataField("Instalacion.Nombre").Visible = false;
         }
     }
     // control de skin
     if (Session["Skin"] != null)
     {
         RadSkinManager1.Skin = Session["Skin"].ToString();
     }
 }
    protected void Page_Init(object sender, EventArgs e)
    {
        // it gets an appropiate context (LainsaSciCTX -> web.config)
        ctx = new LainsaSci("LainsaSciCTX");

        // verify if a Usuario is logged
        usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
        if (usuario == null)
        {
            Response.Redirect("Default.aspx");
        }
        else
        {
            Session["UsuarioId"] = usuario.UsuarioId;
        }

        CntWinWeb.TranslateRadGridFilters(RadGrid1);
        if (Request.QueryString["InTab"] != null)
        {
            mode = Request.QueryString["InTab"];
        }
        if (Request.QueryString["Caller"] != null)
        {
            caller = Request.QueryString["Caller"];
        }
        if (Request.QueryString["DispositivoId"] != null)
        {
            dispositivo = CntLainsaSci.GetDispositivo(int.Parse(Request.QueryString["DispositivoId"]), ctx);
            if (dispositivo != null)
            {
                RadGrid1.Columns.FindByDataField("dispositivo.Nombre").Visible = false;
            }
        }
        if (Request.QueryString["ProgramaId"] != null)
        {
            programa = CntLainsaSci.GetPrograma(int.Parse(Request.QueryString["ProgramaId"]), ctx);
            if (programa != null)
            {
            }
        }
        RadScriptManager1.RegisterPostBackControl(this.FindControl("pnlBtnExcel"));
        // control de skin
        if (Session["Skin"] != null)
        {
            RadSkinManager1.Skin = Session["Skin"].ToString();
        }
    }
 string caller       = ""; // who's calling the grid form
 #endregion
 #region Init, load, unload events
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     Usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
     if (Usuario == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         Session["UsuarioId"] = Usuario.UsuarioId;
     }
     //
     permiso = CntLainsaSci.GetPermiso(Usuario.GrupoUsuario, "Subcategoriagrid", ctx);
     if (permiso == null)
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
         RadNotification1.Show();
         RadAjaxManager1.ResponseScripts.Add("closeWindow();");
     }
     CntWinWeb.TranslateRadGridFilters(RadGrid1);
     if (Request.QueryString["Mode"] != null)
     {
         mode = Request.QueryString["Mode"];
     }
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
     }
     if (Request.QueryString["CategoriaId"] != null)
     {
         categoria = CntLainsaSci.GetCategoria(int.Parse(Request.QueryString["CategoriaId"]), ctx);
         if (categoria != null)
         {
             RadGrid1.Columns.FindByDataField("Categoria.Nombre").Visible = false;
         }
     }
 }
Example #10
0
 string caller        = ""; // who's calling the grid form
 #endregion
 #region Init, load, unload events
 protected void Page_Init(object sender, EventArgs e)
 {
     // it gets an appropiate context (LainsaSciCTX -> web.config)
     ctx = new LainsaSci("LainsaSciCTX");
     // verify if a Usuario is logged
     usuario = CntWinWeb.IsSomeoneLogged(this, ctx);
     if (usuario == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         Session["UsuarioId"] = usuario.UsuarioId;
     }
     // si llega aquí está autorizado
     permiso = CntLainsaSci.GetPermiso(usuario.GrupoUsuario, "Sustituciongrid", ctx);
     if (permiso == null)
     {
         RadNotification1.Text = String.Format("<b>{0}</b><br/>{1}",
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "Warning"),
                                               (string)GetGlobalResourceObject("ResourceLainsaSci", "NoPermissionsAssigned"));
         RadNotification1.Show();
         RadAjaxManager1.ResponseScripts.Add("closeWindow();");
     }
     CntWinWeb.TranslateRadGridFilters(RadGrid1);
     if (Request.QueryString["Mode"] != null)
     {
         mode = Request.QueryString["Mode"];
     }
     if (Request.QueryString["Caller"] != null)
     {
         caller = Request.QueryString["Caller"];
     }
     if (Request.QueryString["TipoId"] != null)
     {
         tipo = CntLainsaSci.GetTipoDispositivo(int.Parse(Request.QueryString["TipoId"]), ctx);
         if (tipo != null)
         {
             RadGrid1.Columns.FindByDataField("TipoDispositivo.Nombre").Visible = false;
         }
     }
     if (Request.QueryString["ProgramaId"] != null)
     {
         programa = CntLainsaSci.GetPrograma(int.Parse(Request.QueryString["ProgramaId"]), ctx);
         if (programa != null)
         {
             // Modificar la altura del grid para que quepan otros
             RadGrid1.PageSize       = 3;
             RadGrid1.ShowGroupPanel = false;
         }
     }
     if (Request.QueryString["RevisionId"] != null)
     {
         revision = CntLainsaSci.GetRevision(int.Parse(Request.QueryString["RevisionId"]), ctx);
         if (revision != null)
         {
             Title = String.Format("Sustituciones [REV]: {0:dd/MM/yyyy} {1}",
                                   revision.FechaPlanificada,
                                   CntLainsaSci.GetNomLargo(revision.Dispositivo));
         }
     }
 }
Example #11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     CntWinWeb.TranslateRadGridFilters(RadGrid1);
 }