/* * cada que se hace click en el textbox manda llamar al forma para elegir modelo, en este caso se pasa como parametro * a la clase FRM_Opciones, la forma principal con this para utilizar las propiedades publicas, y la lista de modelo a * uno de sus metodos */ private void txtMod_Click(object sender, EventArgs e) { //aqui se trae los modelos a elejir lblClick1.Visible = false; lblDescrip.Text = "."; txtEstilo.Text = String.Empty; txtColor.Text = String.Empty; FRM_Opciones op = new FRM_Opciones(this, 1); op.generaM(listModelo); op.ShowDialog(this); }
private void txtEstilo_Click(object sender, EventArgs e) { //listModelo = consumo.Modelo("ESTILO",txtMod.Text); FRM_Opciones op = new FRM_Opciones(this, 2); // formulario donde se crean lo radioButtons de estilos var dValue = from row in Uni.AsEnumerable() where row.Field <string>("Modelo") == txtMod.Text select row.Field <string>("Familia"); List <string> ESTI = dValue.Distinct().ToList(); op.generaBestilos(ESTI); op.ShowDialog(this); lblclick2.Visible = false; txtColor.Text = String.Empty; }
private void txtColor_Click(object sender, EventArgs e) { FRM_Opciones op = new FRM_Opciones(this, 3); string Tipo = ""; try { var dValue2 = from row in Uni.AsEnumerable() where row.Field <string>("Modelo") == txtMod.Text && row.Field <string>("Familia") == txtEstilo.Text && row.Field <string>("Opcion") == "C" select row.Field <string>("ColorTalla"); List <string> COLORES = dValue2.Distinct().ToList(); var dValue3 = from row in Uni.AsEnumerable() where row.Field <string>("Modelo") == txtMod.Text && row.Field <string>("Familia") == txtEstilo.Text && row.Field <string>("Opcion") == "T" select row.Field <string>("ColorTalla"); List <string> tallas = dValue3.Distinct().ToList(); if (txtMod.Text != "" && txtEstilo.Text != "") { var dValue4 = from row in Uni.AsEnumerable() where row.Field <string>("Modelo") == txtMod.Text && row.Field <string>("Familia") == txtEstilo.Text select row.Field <string>("Grupo"); Tipo = dValue4.Distinct().ToList().Single(); } op.generaB(COLORES); lblclick3.Visible = false; op.ShowDialog(this); if (txtColor.Text != "") { FRM_tallas t = new FRM_tallas(txtMod.Text, txtEstilo.Text, txtColor.Text, tallas, this, Tipo); t.ShowDialog(); } } catch (Exception er) { MessageBox.Show("error12" + er.Message); return; } }