public List <ClientesClasess> Leer() { string elementos = accionesArchivo.Leer(); if (elementos != null) { List <ClientesClasess> inv = new List <ClientesClasess>(); string[] fila = elementos.Split('\n'); for (int i = 0; i < fila.Length - 1; i++) { string[] espacio = fila[i].Split('|'); ClientesClasess a = new ClientesClasess(); a.Nombre = (espacio[0]); a.RFC = (espacio[1]); a.Direccion = espacio[2]; a.Telefono = espacio[3]; a.mail = espacio[4]; inv.Add(a); } clientes = inv; return(inv); } else { return(null); } }
public List <EmpleadoClasess> Leer() { string elementos = accionesArchivo.Leer(); if (elementos != null) { List <EmpleadoClasess> inv = new List <EmpleadoClasess>(); string[] fila = elementos.Split('\n'); for (int i = 0; i < fila.Length - 1; i++) { string[] espacio = fila[i].Split('|'); EmpleadoClasess a = new EmpleadoClasess(); a.sexo = (espacio[0]); a.Edad = espacio[1]; inv.Add(a); } empleado = inv; return(inv); } else { return(null); } }
public List <ClaseProductos> Leer() { string elementos = accionesArchivo.Leer(); if (elementos != null) { List <ClaseProductos> inv = new List <ClaseProductos>(); string[] fila = elementos.Split('\n'); for (int i = 0; i < fila.Length - 1; i++) { string[] espacio = fila[i].Split('|'); ClaseProductos a = new ClaseProductos(); a.Nombre = (espacio[0]); a.Descripcion = (espacio[1]); a.PrecioDeCompra = (espacio[2]); a.PrecioDeVenta = (espacio[3]); a.Presentacion = (espacio[4]); inv.Add(a); } productos = inv; return(inv); } else { return(null); } }
public List <Clases.Categoria> Leer() { string elementos = accionesArchivo.Leer(); if (elementos != null) { List <Clases.Categoria> inv = new List <Clases.Categoria>(); string[] fila = elementos.Split('\n'); for (int i = 0; i < fila.Length - 1; i++) { string[] espacio = fila[i].Split('|'); Clases.Categoria a = new Clases.Categoria(); a.Medicamentos = (espacio[0]); inv.Add(a); } categorias = inv; return(inv); } else { return(null); } }