protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string OT       = Request.QueryString["o"].ToString();
         string Pliego   = Request.QueryString["c"].ToString();
         string folio    = Request.QueryString["f"].ToString();
         string Cantidad = Request.QueryString["t"].ToString();
         string NombreOT = Request.QueryString["n"].ToString();
         lblOT.Text       = OT;
         lblPliego.Text   = Pliego;
         lblFolio.Text    = folio;
         lblCantidad.Text = Cantidad;
         lblUsuario.Text  = Session["Usuario"].ToString();
         lblNombreOt.Text = NombreOT;
         try
         {
             string codigo = Request.QueryString["code"].ToString();
             TabContainer1.ActiveTabIndex = 1;
             TabPanel0.Enabled            = false;
             Bobina_Controller controlbo = new Bobina_Controller();
             Bobina            bobina    = controlbo.BuscarBobinaCerrar(Convert.ToInt32(codigo));
             CargarCieBob(bobina);
             TabPanel0.Enabled = false;
         }
         catch
         {
             TabContainer1.ActiveTabIndex = 0;
             TabPanel1.Enabled            = false;
         }
     }
 }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string OT         = Request.QueryString["OT"];
         string Pliego     = Request.QueryString["pl"];
         string Codigo_Bob = Request.QueryString["not"];
         Label2.Text = OT + " :- ";
         txtOT.Text  = OT;
         Label1.Text = Pliego;
         Bobina bob = bobControl.BuscarBobinaCerrar(Convert.ToInt32(Codigo_Bob));
         //CargarTipo(bob.Proveedor);
         CargarDatos(bob);
         TabContainer2.TabIndex        = 0;
         TabContainer2.Tabs[1].Enabled = false;
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    string OT     = Request.QueryString["OT"].ToString();
                    string Pliego = Request.QueryString["Pliego"].ToString();
                    lblUsuario.Text = Session["Usuario"].ToString();

                    try
                    {
                        try
                        {
                            string code = Request.QueryString["cod"].ToString();
                            TabContainer1.ActiveTabIndex = 0;
                            lblOT.Text      = OT;
                            lblPliego.Text  = Pliego;
                            txtCodigoB.Text = code;
                            List <Bobina> lista  = new List <Bobina>();
                            Bobina        bobina = controlbo.BuscarBobinaCerrar(Convert.ToInt32(code));
                            lista.Add(bobina);
                            RadGrid1.DataSource   = lista;
                            RadGrid1.Visible      = true;
                            TabPanel2.Enabled     = false;
                            TabPanel1.Enabled     = false;
                            ddlMaquina.Enabled    = false;
                            txtTapa.Enabled       = false;
                            txtEmboltorio.Enabled = false;
                            ddlEstado.Enabled     = false;
                            txtTapa.Text          = bobina.Peso_Tapa.ToString(); txtTapa.Enabled = false;
                            txtEmboltorio.Text    = bobina.Peso_emboltorio.ToString(); txtEmboltorio.Enabled = false;
                            txtEscarpe.Text       = bobina.PesoEscarpe.ToString();
                            IDBobina.Text         = bobina.ID_Bobina.ToString();
                            btnEditar.Visible     = true;
                            btnGrabar.Visible     = false;
                            txtCodigoB.Enabled    = false;
                            ddlMaquina.Items.FindByText(bobina.Ubicacion).Selected = true;
                        }
                        catch
                        {
                            string CodeBob = Request.QueryString["Code"].ToString();
                            TabContainer1.ActiveTabIndex = 1;
                            lblOT.Text     = OT;
                            lblPliego.Text = Pliego;
                            Bobina bobina = controlbo.BuscarBobinaCerrar(Convert.ToInt32(CodeBob));
                            //ddlMaquina.Items.FindByText(bobina.Ubicacion).Selected = true;
                            CargarCieBob(bobina);
                            TabPanel2.Enabled = false;
                            TabPanel0.Enabled = false;
                        }
                    }
                    catch
                    {
                        if (Pliego == "")
                        {
                            ddlPliego.Visible        = true;
                            ddlPliego.DataSource     = controlOrdPro.listaOrPliegos(OT, "");
                            ddlPliego.DataTextField  = "";
                            ddlPliego.DataValueField = "";
                            ddlPliego.DataBind();
                        }
                        else
                        {
                            lblOT.Text     = OT;
                            lblPliego.Text = Pliego;
                        }
                        TabContainer1.ActiveTabIndex = 0;
                        TabPanel2.Enabled            = false;
                        TabPanel1.Enabled            = false;
                    }
                }
                catch
                {
                    int bdg = Convert.ToInt32(Request.QueryString["Bodega"].ToString());
                    txtOT.Visible      = true;
                    lblUsuario.Text    = Session["Usuario"].ToString();
                    Label15.Visible    = true;
                    ddlMaquina.Visible = true;
                    TabPanel2.Enabled  = false;
                    TabPanel1.Enabled  = false;
                    btnBuscar.Visible  = true;
                }
            }
        }