Пример #1
0
        private void btnEnviar_Click_1(object sender, EventArgs e)
        {
            FP.txtColor.Text = String.Empty;
            foreach (object obj in pnlTalla.Controls)
            {
                if (obj.GetType() == typeof(obj_SelecCantidad))
                {
                    ListaEstilos      l = new ListaEstilos();
                    obj_SelecCantidad x = obj as obj_SelecCantidad;
                    if (x.txtNo.Text != "")
                    {
                        if (this.Modelo == "ARTIC")
                        {
                            x.pocision += 1;
                        }
                        l.talla    = x.lbltalla.Text;
                        l.cantidad = Convert.ToInt32(x.txtNo.Text);
                        l.posicion = x.pocision;
                        l.tipoS    = tipos();
                        l.tipo     = this.tipo;
                    }
                    lstTC.Add(l);
                }
            }

            FP.lst = lstTC;
            FP.AddGrid(this.Modelo, this.Estilo, this.Color, "", 0);
            this.Close();
        }
Пример #2
0
        public List <ListaEstilos> estilo(string opcion)
        {
            List <ListaEstilos> lista = new List <ListaEstilos>();

            try
            {
                string sp = "SP_ExploradorLicencias";
                con = new SqlConnection(linea.LineaConexion());
                SqlCommand com = new SqlCommand(sp, con);
                con.Open();
                com.CommandType = System.Data.CommandType.StoredProcedure;
                com.Parameters.Add("@OP", SqlDbType.VarChar).Value = opcion;
                SqlDataReader dr;
                dr = com.ExecuteReader();
                while (dr.Read())
                {
                    ListaEstilos l = new ListaEstilos();
                    if (!String.IsNullOrEmpty(dr.GetString(0)))
                    {
                        l.estilo      = dr.GetString(0);
                        l.descripcion = dr.GetString(1);
                        l.tipo        = dr.GetString(2);
                        l.tipoS       = dr.GetString(3);
                        lista.Add(l);
                    }
                }
                con.Close();
                dr.Close();
            }
            catch (Exception e)
            {
                if (e.Source != null)
                {
                    throw new System.Exception(e.Message + ". error en estilo.");
                }
            }

            return(lista);
        }
Пример #3
0
        private void btnEnviar_Click_1(object sender, EventArgs e)
        {
            FP.txtColor.Text = String.Empty;

            foreach (object obj in pnlTalla.Controls)
            {
                if (obj.GetType() == typeof(obj_SelecCantidad))
                {
                    ListaEstilos      l = new ListaEstilos();
                    obj_SelecCantidad x = obj as obj_SelecCantidad;
                    try
                    {
                        if (x.txtNo.Text != "")
                        {
                            if (this.Modelo == "ARTIC")
                            {
                                x.pocision += 2;
                            }
                            else
                            if (this.Modelo != "NARVI" && this.tipo == "TOPS")
                            {
                                x.pocision += 1;
                            }
                            else
                            if (this.Modelo == "BATA")
                            {
                                x.pocision += 1;
                            }
                            l.talla    = x.lbltalla.Text;
                            l.cantidad = Convert.ToInt32(x.txtNo.Text);
                            l.posicion = x.pocision;
                            l.tipoS    = tipos();
                            if (this.tipo == "BOTTOMS")
                            {
                                l.tipo = this.tipo + "_" + l.tipoS;
                            }
                            else
                            {
                                l.tipo = this.tipo;
                            }
                            l.articulo = Art();
                            l.color    = this.Color;
                            l.Ncolor   = this.Color;
                        }
                        lstTC.Add(l);
                    }
                    catch (Exception ew)
                    {
                        MessageBox.Show(ew.Message);
                    }
                    {
                        x.txtNo.Text = String.Empty;
                        //return;
                    }
                }
            }

            FP.lst = lstTC;
            FP.AddGrid(this.Modelo, this.Estilo, this.Color, "", 0);
            this.Close();
        }