Esempio n. 1
0
        public async Task <string> AddDetalleOrden(int orden, LABORATORIO lab)
        {
            try
            {
                OrdenDTO model = await GetOrden(orden);

                ORDEN_ATE_DETALLE detalle = new ORDEN_ATE_DETALLE()
                {
                    nroOrden       = model.numeroorden,
                    tarifa         = lab.descripcion,
                    PrecioUnitario = lab.precio,
                    cantidad       = 1,
                    descuento      = "0.00",
                    importe        = lab.precio,
                    seguro         = lab.precio,
                    paciente       = "0.00",
                    interviniente  = ""
                };
                await _context.ORDEN_ATE_DETALLE.AddAsync(detalle);
                await Save();

                return("");
            }
            catch (Exception ex)
            {
                return("error" + ex.Message);
            }
        }
Esempio n. 2
0
        public async Task <string> DeleteDetalleOrden(int id)
        {
            try
            {
                ORDEN_ATE_DETALLE detalle = await _context.ORDEN_ATE_DETALLE.FindAsync(id);

                _context.ORDEN_ATE_DETALLE.Remove(detalle);
                await Save();

                return("Registro eliminado correctamente");
            }
            catch (Exception ex)
            {
                return("error" + ex.Message);
            }
        }