protected void Button1_Click(object sender, EventArgs e)
        {
            if (txtOT.Text != "")
            {
                if (xml.ConsultaOTIngresada(txtOT.Text, 12) == true)
                {
                    RadGrid1.DataSource = xml.ListaGruposPaginas(txtOT.Text, 13);
                    RadGrid1.DataBind();

                    DivAlert.Visible = true;
                }
                else
                {
                    DivAlert.Visible = false;
                }
                XMLFormato xf = xml.BuscaOT(txtOT.Text, 0);
                lblNombreOT.Text = xf.NombreOT;
                lblCliente.Text  = xf.Cliente;
                lblCSR.Text      = xf.CSR;
                if (xf.NombreOT == null && xf.Cliente == null)
                {
                    DivError.Visible     = true;
                    btnAgregar.Enabled   = false;
                    btnFinalizar.Enabled = false;
                    RadGrid1.DataSource  = "";
                    RadGrid1.DataBind();
                }
                else
                {
                    DivError.Visible     = false;
                    btnAgregar.Enabled   = true;
                    btnFinalizar.Enabled = true;
                }
            }
        }
        protected void btnBuscarNueva_Click(object sender, EventArgs e)
        {
            if (txtOTNueva.Text != "")
            {
                try
                {
                    Controller_XML xml = new Controller_XML();
                    XMLFormato     mf  = xml.ConsultaOTManual(txtOTNueva.Text);

                    lblTipo.Text = ((mf.NombreOT != null) ? "Existe" : "Nueva");
                    if (mf.NombreOT != null)
                    {
                        txtNombreOT.Visible = false;
                        lblNombreOT.Visible = true;
                        lblNombreOT.Text    = mf.NombreOT;
                        ddlCliente.Visible  = false;
                        lblCliente.Visible  = true;
                        lblCliente.Text     = mf.Cliente;
                        txtOT.Text          = txtOTNueva.Text;

                        RadGrid1.DataSource = xml.ListaGruposPaginas(txtOTNueva.Text, 13);
                        RadGrid1.DataBind();
                        btnAgregar.Visible   = true;
                        btnFinalizar.Visible = true;
                    }
                    else
                    {
                        ddlCliente.Visible  = true;
                        lblNombreOT.Visible = false;
                        txtNombreOT.Visible = true;
                        lblCliente.Visible  = false;
                        RadGrid1.DataSource = "";
                        RadGrid1.DataBind();
                    }
                }
                catch (Exception ex)
                {
                }
            }
        }