private void textBox1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { if (textBox1.Text.Length > 10) { textBox1.Text = textBox1.Text.Replace(" ", ""); if (es_numerico(textBox1.Text)) { materia_prima Materia = new materia_prima(textBox1.Text, conexion_q.ConnectionString, terminal); DataTable a = new DataTable(); if (Materia.existe() == false) { MessageBox.Show("La Matricula no existe", "Atencion!!"); } else if (Materia.tiene_stock() == false) { MessageBox.Show("La Matricula no tiene Stock", "Atencion!!"); } else if (Materia.ya_existe()) { MessageBox.Show("La Matricula ya la has añadido", "Atencion!!"); } else if (Materia.es_fifo()) { a = Materia.Get_datos_matricula(); En_pantalla.Insertar(a); } else { Form_Leido popup = new Form_Leido(textBox1.Text, conexion_q.ConnectionString, terminal); popup.getForm = this; this.Hide(); if (popup.ShowDialog() == DialogResult.OK) { a = popup.Get_datos_matricula(); foreach (DataRow row in a.Rows) { if (row[11].ToString() == "False") { label3.Text = "No Fifo"; } else { label3.Text = "Fifo Ok"; } } En_pantalla.Insertar(a); } } materialSkinManager.ColorScheme = new ColorScheme(Primary.Green600, Primary.Green700, Primary.Green200, Accent.Red100, TextShade.WHITE); Actualiza(); //rellenaListview(En_pantalla.Get_Datos()); } } //EjecutarFuncion(); } }
public Form_Leido(string matricula, string conex, string Terminal) { InitializeComponent(); materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.DARK; // materialSkinManager.ColorScheme = new ColorScheme(Primary.Green600, Primary.Green700, Primary.Green200, Accent.Red100, TextShade.WHITE); materialSkinManager.ColorScheme = new ColorScheme(Primary.Red600, Primary.Red700, Primary.Red200, Accent.Green100, TextShade.WHITE); materialSkinManager.AddFormToManage(this); palet = new materia_prima(matricula, conex, Terminal); _terminal = Terminal; sscc = matricula; if (palet.es_fifo()) { label1.Text = @"SSCC Leída: " + matricula + " cumple criterio Fifo"; } else { label1.Text = @"SSCC Leída: " + matricula + " no cumple criterio Fifo"; } datos_ = palet.Get_datos_matricula(); dataGridView1.DataSource = datos_; dataGridView2.DataSource = palet.Get_datos_stock(); }