protected void Si_CheckedChanged(object sender, EventArgs e)
        {
            ddlMaquina.DataSource     = wipControl.ListMaquinas("Rotativa");
            ddlMaquina.DataTextField  = "OT";
            ddlMaquina.DataValueField = "OT";
            ddlMaquina.DataBind();
            ddlMaquina.Items.Insert(0, new ListItem("Seleccione..."));

            pnlDatosPallet.Visible  = false;
            pnlDatosPallet2.Visible = false;
        }
Example #2
0
        public static string CargarMaquina(string Maquina)
        {
            Controller_WipControl    wipControl = new Controller_WipControl();
            List <Model_Wip_Control> lista      = new List <Model_Wip_Control>();

            if (Maquina == "Digital")
            {
                lista.Add(new Model_Wip_Control {
                    OT = "Indigo"
                });
                lista.Add(new Model_Wip_Control {
                    OT = "Scodix"
                });
                lista.Add(new Model_Wip_Control {
                    OT = "Escko"
                });
            }
            else if (Maquina == "Servicio Externo")
            {
                lista.Add(new Model_Wip_Control {
                    OT = "Servicio Externo"
                });
                lista.Add(new Model_Wip_Control {
                    OT = "PLISADO"
                });
                lista.Add(new Model_Wip_Control {
                    OT = "TERMOLAMINADO"
                });
                lista.Add(new Model_Wip_Control {
                    OT = "POLITERMOLAMINADO"
                });
                lista.Add(new Model_Wip_Control {
                    OT = "UV"
                });
            }
            else
            {
                lista = wipControl.ListMaquinas(Maquina);
            }
            List <Model_Wip_Control> lista2 = new List <Model_Wip_Control>();

            int contador = 1;
            Model_Wip_Control insert1 = new Model_Wip_Control();

            insert1.OT = "Seleccionar";
            lista2.Insert(0, insert1);
            foreach (Model_Wip_Control ps in lista)
            {
                Model_Wip_Control objst = new Model_Wip_Control();
                objst.OT = ps.OT;
                lista2.Insert(contador, objst);
                contador++;
            }

            JavaScriptSerializer jscript = new JavaScriptSerializer();

            return(jscript.Serialize(lista2));
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         CodigoBarra               = "";
         ddlMaquina.DataSource     = wipControl.ListMaquinas("Rotativa");
         ddlMaquina.DataTextField  = "OT";
         ddlMaquina.DataValueField = "OT";
         ddlMaquina.DataBind();
         ddlMaquina.Items.Insert(0, new ListItem("Seleccione..."));
     }
 }