private void Button_Click_1(object sender, RoutedEventArgs e) { Fichero_Inventario fi = new Fichero_Inventario(); Tabla_Registros_Inventario.ItemsSource = null; Tabla_Registros_Inventario.ItemsSource = fi.MostrarTodo(); }
public Registro_Eliminar() { InitializeComponent(); Fichero_Inventario fi = new Fichero_Inventario(); Tabla_Registros_Inventario.ItemsSource = null; Tabla_Registros_Inventario.ItemsSource = fi.MostrarTodo(); }
private void Button_Click(object sender, RoutedEventArgs e) { String tipo = lblCambio.Content.ToString(); String busC = txbBus.Text; if (busC == null || busC.Equals("")) { MessageBox.Show("Campo Vacio"); } else { Fichero_Inventario fi = new Fichero_Inventario(); TablaB_Inventario.ItemsSource = null; TablaB_Inventario.ItemsSource = fi.Buscar(tipo, busC); txbBus.Text = ""; } }
private void Button_Click(object sender, RoutedEventArgs e) { String pos = null; pos = Tabla_Registros_Inventario.SelectedIndex.ToString(); int aux = Convert.ToInt32(pos); if (pos == null) { MessageBox.Show("Seleccione Un Elemento Porfavor..."); } else { Fichero_Inventario fic = new Fichero_Inventario(); fic.eliminar(aux); } }
private void Button_Click(object sender, RoutedEventArgs e) { String mar = txbMa.Text; String mod = txbMo.Text; String pre = txbP.Text; String cant = txbC.Text; Validar_Numeros val = new Validar_Numeros(); if (mar == null || mar.Equals("")) { MessageBox.Show("Porfavor ingrese la Marca ...."); } else { if (mod == null || mod.Equals("")) { MessageBox.Show("Porfavor ingrese la Modelo ...."); } else { if (pre == null || pre.Equals("")) { MessageBox.Show("Porfavor ingrese la Marca ...."); } else { bool aux = val.valirdar_SoloNumeros(pre); if (aux == false) { MessageBox.Show("Porfavor Ingresar solo Numeros en el campo precio"); } else { if (cant == null || cant.Equals("")) { MessageBox.Show("Porfavor ingrese la Cantidad ...."); } else { bool aux_1 = val.valirdar_SoloNumeros(cant); if (aux_1 == false) { MessageBox.Show("Porfavor Ingresar solo Numeros en el campo Cantidad"); } else { lista.Add(new Agregando_Inventario_ { Marca = mar, Modelo = mod, Precio = Convert.ToInt32(pre), Cantidad = Convert.ToInt32(cant) }); MessageBox.Show("Agregado Correctamente ..."); Fichero_Inventario fi = new Fichero_Inventario(); fi.Agregando(mar, mod, pre, cant); TablaInv.ItemsSource = null; TablaInv.ItemsSource = lista; //Limpiando txbMa.Text = ""; txbMo.Text = ""; txbC.Text = ""; txbP.Text = ""; } } } } } } }