/// <summary> /// Lee universidad en formato xml /// </summary> /// <returns></returns> public Universidad Leer() { Universidad u; string path = Directory.GetCurrentDirectory() + @"\universidad.xml"; Xml <Universidad> xmlu = new Xml <Universidad>(); xmlu.Leer(path, out u); return(u); }
/// <summary> /// Lee el archivo de el comercio /// </summary> /// <returns> Devuelve un string con el contenido del archivo</returns> public static string Leer() { Comercio co = new Comercio(); Xml <Comercio> xml = new Xml <Comercio>(); xml.Leer("comercio.xml", out co); return(co.ToString()); }
/// <summary> /// Mñetodo que toma los datos del archivo XML con los que se cargará la lista de pedidos /// </summary> /// <returns>Devuelve una lista de pedidos</returns> public static List <Pedido> Leer() { List <Pedido> datos = new List <Pedido>(); string path = String.Format("{0}\\listaDePedidos.xml", Environment.GetFolderPath(Environment.SpecialFolder.Desktop)); Xml <List <Pedido> > auxListaPedidos = new Xml <List <Pedido> >(); auxListaPedidos.Leer(path, out datos); return(datos); }
/// <summary> /// Deserializa un listado de pedidos /// </summary> /// <returns>una List<> de tipo Pedido</returns> public static List <Pedido> Leer() { List <Pedido> datos = new List <Pedido>(); string path = String.Concat(AppDomain.CurrentDomain.BaseDirectory, "inventario.xml"); Xml <List <Pedido> > auxPedidos = new Xml <List <Pedido> >(); auxPedidos.Leer(path, out datos); return(datos); }
/// <summary> /// /// </summary> /// <returns></returns> public static Universidad Leer() { Xml <Universidad> xml = new Xml <Universidad>(); Universidad uni = new Universidad(); string archivo = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + ".\\Universidad.xml"; xml.Leer(archivo, out uni); return(uni); }
/// <summary> /// Deserealizo un xml /// </summary> /// <returns></returns> public static List <PedidosVan> Leer() { List <PedidosVan> pedidos = new List <PedidosVan>(); string path = String.Concat(AppDomain.CurrentDomain.BaseDirectory, "Pedidos.xml"); Xml <List <PedidosVan> > auxPedidos = new Xml <List <PedidosVan> >(); auxPedidos.Leer(path, out pedidos); return(pedidos); }
/// <summary> /// Lee el listado de ventas en un archivo en formato XML /// </summary> /// <returns></returns> public static List <Venta> Leer() { List <Venta> datos = new List <Venta>(); string archivo = String.Concat(AppDomain.CurrentDomain.BaseDirectory, "inventario.xml"); Xml <List <Venta> > read = new Xml <List <Venta> >(); read.Leer(archivo, out datos); return(datos); }
/// <summary> /// Carga la lista de empleados desde un archivo Xml, también ejecuta los métodos encargados de obtener las listas de alimentos e Indumentaria de la base de datos. /// </summary> public static void CargarDatos() { List <Empleado> auxList = new List <Empleado>(); string rutaArchivo = String.Concat(AppDomain.CurrentDomain.BaseDirectory, "Empleados.xml"); Xml <List <Empleado> > archivoXml = new Xml <List <Empleado> >(); archivoXml.Leer(rutaArchivo, out auxList); listaEmpleados = auxList; listaAlimentos = ProductosDAO.ObtenerListaAlimentos(); listaIndumentaria = ProductosDAO.ObtenerListaIndumentaria(); }
/// <summary> /// Metodo que permite leer el archivo Xlm de ordenes de compra externas (Temas Archivos y deserializacion) /// </summary> /// <returns>Devuelve un booleano para control de ejecucion</returns> public static bool Leer() { bool retValue = false; string path = String.Format("{0}\\OrdenesDeCompraExternas.xml", Environment.GetFolderPath(Environment.SpecialFolder.Desktop)); Xml <List <OrdenDeCompra> > auxListaOrdenes = new Xml <List <OrdenDeCompra> >(); if (auxListaOrdenes.Leer(path, out Distribuidora.listaDeOrdenesDeCompra)) { retValue = true; } return(retValue); }
public static string Leer() { Xml <Docente> auxArchivo = new Xml <Docente>(); //List<Docente> auxArchivo = new List<Docente>(); //string path = AppDomain.CurrentDomain.BaseDirectory; string path = (Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\SegundoParcial\JardinUtn\Docentes.xml"); if (!auxArchivo.Leer(path + @"Docentes.xml", out Docente rtn)) { rtn = null; } return(rtn.ToString()); }
public static void CargarColaPedidos() { Queue <PedidoConfirmado> auxColaPedidos = new Queue <PedidoConfirmado>(); List <PedidoConfirmado> auxList; string rutaArchivo = String.Concat(AppDomain.CurrentDomain.BaseDirectory, "Pedidos.xml"); Xml <List <PedidoConfirmado> > archivoXml = new Xml <List <PedidoConfirmado> >(); archivoXml.Leer(rutaArchivo, out auxList); foreach (var item in auxList) { auxColaPedidos.Enqueue(item); } colaPedidos = auxColaPedidos; }
/// <summary> /// Metodo utilizado para precargar los pedidos en la pantalla en preparacion /// </summary> public static void PreCargadoPedidos() { try { List <Pedido> recuperarPedidos = new List <Pedido>(); Xml <List <Pedido> > archivoXML = new Xml <List <Pedido> >(); pedidos = archivoXML.Leer(AppDomain.CurrentDomain.BaseDirectory + @"pedidosPreCarga0000.xml", recuperarPedidos); } catch (Exception e) { throw e; } }
/// <summary> /// Deserializa /// </summary> /// <returns></returns> public static Carrito LeerXml() { Xml <Carrito> temp = new Xml <Carrito>(); Carrito cTemp; // try //{ temp.Leer("carrito.xml", out cTemp); //} //catch(Exception ex) //{ // throw new ArchivosException(); // } return(cTemp); }
/// <summary> /// Método estático Leer /// Lee los datos del archivo XML datosUniversidad.xml /// </summary> /// <returns>Retorna un objeto universidad con los datos leidos del archivo</returns> public static Universidad Leer() { Universidad universidad = null; try { Xml <Universidad> datosUniversidad = new Xml <Universidad>(); datosUniversidad.Leer("datosUniversidad.xml", out universidad); } catch (Exception e) { throw new ArchivosException(e); } return(universidad); }
/// <summary> /// Permite leer la informacion del negocio desde un archivo xml. /// </summary> /// <returns></returns> public static Artistica Leer() { try { Artistica artistica = new Artistica(); Xml <Artistica> archivo = new Xml <Artistica>(); archivo.Leer((System.IO.Directory.GetCurrentDirectory() + @"\ArchivosGuardados\Artistica.xml"), out artistica); return(artistica); } catch (Exception e) { throw new ArchivosException(e); } }
/// <summary> /// Lee el listado de ventas guardado en un archivo XML /// </summary> /// <returns>bool true si se pude deserializar, false si no<Venta></returns> public static bool ObtenerVentasXml() { List <Cliente> datos = new List <Cliente>(); string path = AppDomain.CurrentDomain.BaseDirectory + "Ventas.xml"; Xml <List <Cliente> > auxXML = new Xml <List <Cliente> >(); auxXML.Leer(path, out datos); if (datos != null) { filaClientes = datos; return(true); } return(false); }
public List <Persona> Leer() { bool retorno = false; Xml <List <Persona> > leerPersona = new Xml <List <Persona> >(); retorno = leerPersona.Leer(AppDomain.CurrentDomain.BaseDirectory + "\\Personas.xml", out List <Persona> auxPersona); if (retorno) { return(auxPersona); } else { return(new List <Persona>()); } }
/// <summary> /// metodo que lee un objeto casino xml /// </summary> /// <returns></returns> public static Casino Leer() { Casino informacion = new Casino(); Xml <Casino> aux = new Xml <Casino>(); try { aux.Leer("Casino.xml", out informacion); } catch (Excepciones.ArchivosException e) { throw new Excepciones.ArchivosException(e); } return(informacion); }
/// <summary> /// Deserealiza un archivo xml con pedidos, los carga en una lista y luego los pasa a una cola /// </summary> /// <returns></returns> public static Queue <Pedido> Deserealizar() { List <Pedido> auxLista = new List <Pedido>(); Queue <Pedido> auxQueue = new Queue <Pedido>(); Xml <List <Pedido> > Leer = new Xml <List <Pedido> >(); if (Leer.Leer(ubicacionArchivo, out auxLista)) { foreach (Pedido item in auxLista) { auxQueue.Enqueue(item); } } return(auxQueue); }
/// <summary> /// Leer de clase retornará un Universidad con todos los datos previamente serializados. /// </summary> /// <returns>una universidad con los datos ya cargados</returns> public Universidad Leer() { Xml <Universidad> xml = new Xml <Universidad>(); bool retorno = false; Universidad uni = new Universidad(); try { //string fileName = AppDomain.CurrentDomain.BaseDirectory + "PruebaDeGuardarUniversidad.xml"; string[] aux = Regex.Split(Directory.GetCurrentDirectory(), @"\\Palmieri.Matias_Ezequiel.2C.TP3"); aux[0] += "\\Universidad.xml"; retorno = xml.Leer(aux[0], out uni); } catch (Exception e) { throw new Exception("Ocurrio un problema posiblemente en texto.guardar fijate la inner", e); } return(uni); }
/// <summary> /// Carga las comidas que estan guardadas en el xml /// </summary> /// <returns></returns> /// public static bool CargarComidasDelXml() { List <Comida> listaAux = new List <Comida>(); string path = String.Concat(AppDomain.CurrentDomain.BaseDirectory, "ListaPedidos.xml"); Xml <List <Comida> > auxPedidos = new Xml <List <Comida> >(); if (auxPedidos.Leer(path, out listaAux)) { ///Si entro hasta aca es porque se pudo leer bien el xml ,ahi carga en la cola la lista de comidas en la cola. foreach (Comida c in listaAux) { cocinandose.Enqueue(c); } return(true); } else { return(false); } }
public static void LeerXml() { ventas = Xml <List <Pedido> > .Leer("ventas.xml"); }
/// <summary> /// Lee los datos de un archivo xml. /// </summary> /// <param name="path">Ruta del archivo.</param> /// <returns>Fabrica nueva con los datos del archivo.</returns> public static Fabrica Leer(string path) { Xml <Fabrica> lF = new Xml <Fabrica>(); return(lF.Leer(path)); }