public List <Empleados> LeerEmpleado() { string datos = archivosEmpleado.Leer(); if (datos != null) { List <Empleados> Emple = new List <Empleados>(); string[] lineas = datos.Split('\n'); for (int i = 0; i < lineas.Length - 1; i++) { string[] campos = lineas[i].Split('|'); Empleados a = new Empleados() { Nombre = campos[0], Telefono = campos[1], Puesto = campos[2], Direccion = campos[3], }; Emple.Add(a); } LixEmpleado = Emple; return(Emple); } else { return(null); } }
public List <Clientes> LeerCliente() { string datos = archivosCliente.Leer(); if (datos != null) { List <Clientes> Client = new List <Clientes>(); string[] lineas = datos.Split('\n'); for (int i = 0; i < lineas.Length - 1; i++) { string[] campos = lineas[i].Split('|'); Clientes a = new Clientes() { Nombre = campos[0], Direccion = campos[1], RFC = campos[2], Telefono = campos[3], Correo = campos[4], }; Client.Add(a); } Clientes = Client; return(Client); } else { return(null); } }
public List <Cliente> LeerClientes() { string datos = archivoClientes.Leer(); if (datos != null) { List <Cliente> clientes = new List <Cliente>(); string[] lineas = datos.Split('\n'); for (int i = 0; i < lineas.Length - 1; i++) { string[] campos = lineas[i].Split('|'); Cliente c = new Cliente() { Nombre = campos[0], Direccion = campos[1], RFC = campos[2], Telefono = campos[3], Correo = campos[4] }; clientes.Add(c); } Clientes = clientes; return(clientes); } else { return(null); } }
public List <Producto> LeerProductos() { string datos = archivoProductos.Leer(); if (datos != null) { List <Producto> productos = new List <Producto>(); string[] lineas = datos.Split('\n'); for (int i = 0; i < lineas.Length - 1; i++) { string[] campos = lineas[i].Split('|'); Producto p = new Producto() { Nombre = campos[0], Descripcion = campos[1], PrecioCompra = campos[2], PrecioVenta = campos[3], Presentacion = campos[4] }; productos.Add(p); } Productos = productos; return(productos); } else { return(null); } }
public List <Empleado> LeerEmpleados() { string datos = archivoEmpleados.Leer(); if (datos != null) { List <Empleado> empleados = new List <Empleado>(); string[] lineas = datos.Split('\n'); for (int i = 0; i < lineas.Length - 1; i++) { string[] campos = lineas[i].Split('\n'); Empleado e = new Empleado() { Nombre = campos[0], }; empleados.Add(e); } Empleados = empleados; return(empleados); } else { return(null); } }
public List <Productos> LeerProducto() { string datos = archivosProductos.Leer(); if (datos != null) { List <Productos> Produ = new List <Productos>(); string[] lineas = datos.Split('\n'); for (int i = 0; i < lineas.Length - 1; i++) { string[] campos = lineas[i].Split('|'); Productos a = new Productos() { Nombre = campos[0], Categoria = campos[1], Descripcion = campos[2], PrecioDeCompra = campos[3], PrecioDeVenta = campos[4], Presentacion = campos[5], }; Produ.Add(a); } Producto = Produ; return(Produ); } else { return(null); } }