Ejemplo n.º 1
0
 protected void RefreshGrid(bool rebind)
 {
     RadGrid1.DataSource = CntLainsaSci.GetInstalaciones(uex, empresa, ctx);
     if (rebind)
     {
         RadGrid1.Rebind();
     }
 }
Ejemplo n.º 2
0
        protected void rdcInstalacion_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
        {
            if (e.Text == "")
            {
                return;
            }
            RadComboBox combo = (RadComboBox)sender;

            combo.Items.Clear();
            foreach (Instalacion ins in CntLainsaSci.GetInstalaciones(e.Text, usuario, ctx))
            {
                combo.Items.Add(new RadComboBoxItem(ins.Nombre, ins.InstalacionId.ToString()));
            }
        }
Ejemplo n.º 3
0
 protected void CargarInstalaciones(Instalacion i)
 {
     rdcInstalacion.Items.Clear();
     foreach (Instalacion i1 in CntLainsaSci.GetInstalaciones(usuario, ctx))
     {
         rdcInstalacion.Items.Add(new RadComboBoxItem(i1.Nombre, i1.InstalacionId.ToString()));
     }
     rdcInstalacion.Items.Add(new RadComboBoxItem(" ", ""));
     rdcInstalacion.SelectedValue = "";
     if (i != null)
     {
         rdcInstalacion.SelectedValue = i.InstalacionId.ToString();
     }
 }
Ejemplo n.º 4
0
    protected void CargarInstalaciones(Empresa e)
    {
        rdcInstalacion.Items.Clear();
        IList <Instalacion> l = CntLainsaSci.GetInstalaciones(usuario, ctx);

        l = (from i in l
             where i.Empresa.EmpresaId == e.EmpresaId
             select i).ToList <Instalacion>();

        foreach (Instalacion i1 in l)
        {
            rdcInstalacion.Items.Add(new RadComboBoxItem(i1.Nombre, i1.InstalacionId.ToString()));
        }
        rdcInstalacion.Items.Add(new RadComboBoxItem(" ", ""));
        rdcInstalacion.SelectedValue = "";
        rdcInstalacion.Text          = "";
    }
Ejemplo n.º 5
0
 protected void CargaInstalacion(Instalacion Instalacion)
 {
     if (Instalacion == null)
     {
         rdcInstalacion.DataSource     = CntLainsaSci.GetInstalaciones(ctx);
         rdcInstalacion.DataTextField  = "Nombre";
         rdcInstalacion.DataValueField = "RevisionId";
     }
     else
     {
         rdcInstalacion.Items.Clear();
         rdcInstalacion.Items.Add(new RadComboBoxItem(Instalacion.Nombre, Instalacion.InstalacionId.ToString()));
         rdcInstalacion.SelectedValue = Instalacion.InstalacionId.ToString();
     }
     if (caller.Equals("InstalacionTab") || caller.Equals("DispositivoTab"))
     {
         rdcInstalacion.Enabled = false;
     }
 }
Ejemplo n.º 6
0
 protected void RefreshGrid(bool rebind)
 {
     if (usuario != null)
     {
         RadGrid1.DataSource = CntLainsaSci.GetInstalaciones(usuario, ctx);
     }
     else
     {
         RadGrid1.DataSource = CntLainsaSci.GetInstalaciones(ctx);
     }
     if (empresa != null)
     {
         RadGrid1.DataSource = empresa.Instalaciones;
     }
     if (rebind)
     {
         RadGrid1.Rebind();
     }
 }