protected void btnConsumir_Click(object sender, EventArgs e)
        {
            Bobina b = new Bobina();

            b.ID_Bobina = Convert.ToInt32(IDBobina.Text);

            if (Convert.ToInt32(ddlSaldo.SelectedValue) == 1)
            {
                b.Saldo            = Convert.ToInt32(txtSaldo.Text);
                b.Peso_Cono        = 0;
                Validacion.Visible = false;
                if (b.Saldo > 0)
                {
                    if (controlbo.UpdateBobinaClose(b, 1))
                    {
                        string popupScript4 = "<script language='JavaScript'>window.opener.location='Pliego_Bobina_Cons.aspx?id=13&cat=3&OT=" + lblOT.Text + "&Pliego=" + lblPliego.Text + "';window.close();</script>";
                        //string popupScript4 = "<script language='JavaScript'>opener.location.reload();window.close();</script>";
                        Page.RegisterStartupScript("PopupScript", popupScript4);
                    }
                    else
                    {
                        Validacion0.Visible = true;
                        Validacion0.Attributes.Add("style", "background-color:Red");
                        Image0.ImageUrl          = "../../Images/cross.png";
                        lblvalidacion0.ForeColor = Color.White;
                        lblvalidacion0.Text      = "Error de Conexion, Intente Nuevamente.";
                    }
                }
                else
                {
                    Validacion0.Visible = true;
                    Validacion0.Attributes.Add("style", "background-color:Red");
                    Image0.ImageUrl          = "../../Images/cross.png";
                    lblvalidacion0.ForeColor = Color.White;
                    lblvalidacion0.Text      = "Ingrese Monto Valido.";
                }
            }
            if (Convert.ToInt32(ddlSaldo.SelectedValue) == 2)
            {
                b.Saldo            = 0;
                Validacion.Visible = false;
                b.Peso_Cono        = Convert.ToDouble(txtCono.Text);
                if (controlbo.UpdateBobinaClose(b, 2))
                {
                    string popupScript4 = "<script language='JavaScript'>window.opener.location='Pliego_Bobina_Cons.aspx?id=13&cat=3&OT=" + lblOT.Text + "&Pliego=" + lblPliego.Text + "';window.close();</script>";
                    //string popupScript4 = "<script language='JavaScript'>opener.location.reload();window.close();</script>";
                    Page.RegisterStartupScript("PopupScript", popupScript4);
                }
                else
                {
                    Validacion0.Visible = true;
                    Validacion0.Attributes.Add("style", "background-color:Red");
                    Image0.ImageUrl          = "../../Images/cross.png";
                    lblvalidacion0.ForeColor = Color.White;
                    lblvalidacion0.Text      = "Error de Conexion, Intente Nuevamente.";
                }
            }
        }