public List <Producto> Leer() { string datos = archivoAmigos.Leer(); if (datos != null) { List <Producto> produ = new List <Producto>(); string[] lineas = datos.Split('\n'); for (int i = 0; i < lineas.Length - 1; i++) { string[] campos = lineas[i].Split('|'); Producto a = new Producto(); a.Identidicador = campos[0]; a.Nombre = campos[1]; a.Descripcion = campos[2]; a.PrecioVenta = campos[3]; a.PrecioCompra = campos[4]; a.Presentacion = campos[5]; produ.Add(a); } Productos = produ; return(produ); } else { return(null); } }
public List <Ncategoria> LeerCategoria() { string datos = archivo.Leer(); if (datos != null) { List <Ncategoria> cate = new List <Ncategoria>(); string[] lineas = datos.Split('\n'); for (int i = 0; i < lineas.Length - 1; i++) { string[] campos = lineas[i].Split('|'); Ncategoria a = new Ncategoria() { TipoDecategoria = campos[0] }; cate.Add(a); } cat = cate; return(cate); } else { return(null); } }
public List <Clientes> LeerClientes() { string datos = archivoClientes.Leer(); if (datos != null) { List <Clientes> cliente = 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], Apellido = campos[1], Direccion = campos[2], RFC = campos[3], Telefono = campos[4], Correo = campos[5], }; cliente.Add(a); } Clientes = cliente; return(cliente); } else { return(null); } }
public List <Categorias> LeerCategorias() { string datos = archivoCategorias.Leer(); if (datos != null) { List <Categorias> categorias = new List <Categorias>(); string[] lineas = datos.Split('\n'); for (int i = 0; i < lineas.Length - 1; i++) { string[] campos = lineas[i].Split('|'); Categorias a = new Categorias() { nombreCategoria = campos[0], }; categorias.Add(a); } Categorias = categorias; return(categorias); } else { return(null); } }
public List <Nproductos> LeerProducto() { string datos = archivo.Leer(); if (datos != null) { List <Nproductos> cate = new List <Nproductos>(); string[] lineas = datos.Split('\n'); for (int i = 0; i < lineas.Length - 1; i++) { string[] campos = lineas[i].Split('|'); Nproductos a = new Nproductos() { Nombre = campos[0], Categoria = campos[1], Descripcion = campos[2], PrecioCompra = campos[3], PrecioVenta = campos[4] }; cate.Add(a); } cat = cate; return(cate); } else { return(null); } }
public List <Producto> LeerProducto() { string datos = archivoProducto.Leer(); if (datos != null) { List <Producto> producto = new List <Producto>(); string[] lineas = datos.Split('\n'); for (int i = 0; i < lineas.Length - 1; i++) { string[] campos = lineas[i].Split('|'); Producto pro = new Producto() { NombreProducto = campos[0], PrecioVenta = campos[1], PrecioCompra = campos[2], Descripcion = campos[3], Presentacion = campos[4], Categoria = campos[5], }; producto.Add(pro); } Producto = producto; return(producto); } else { return(null); } }
public List <Nclientes> LeerCliente() { string datos = archivo.Leer(); if (datos != null) { List <Nclientes> cate = new List <Nclientes>(); string[] lineas = datos.Split('\n'); for (int i = 0; i < lineas.Length - 1; i++) { string[] campos = lineas[i].Split('|'); Nclientes a = new Nclientes() { Nombre = campos[0], Direccion = campos[1], RFC = campos[2], Telefono = campos[3], Estacionamiento = campos[4] }; cate.Add(a); } cat = cate; return(cate); } else { return(null); } }
public List <Nempleados> LeerEmpleado() { string datos = archivo.Leer(); if (datos != null) { List <Nempleados> cate = new List <Nempleados>(); string[] lineas = datos.Split('\n'); for (int i = 0; i < lineas.Length - 1; i++) { string[] campos = lineas[i].Split('|'); Nempleados a = new Nempleados() { Nombre = campos[0], Direccion = campos[1], RFC = campos[2], Telefono = campos[3], Email = campos[4], Matricula = campos[4] }; cate.Add(a); } cat = cate; return(cate); } else { return(null); } }
public List <Empleado> LeerEmpleado() { string datos = archivoEmpleado.Leer(); if (datos != null) { List <Empleado> empleado = new List <Empleado>(); string[] lineas = datos.Split('\n'); for (int i = 0; i < lineas.Length - 1; i++) { string[] campos = lineas[i].Split('|'); Empleado a = new Empleado() { Nombre = campos[0], Apellido = campos[1], NoEmpleado = campos[2], }; empleado.Add(a); } Empleado = empleado; return(empleado); } else { return(null); } }