private Singleton() { Index = new E_Arboles.AVL <string, int>(); ReStock = new ELineales.Lista <int>(); Medicine = new ELineales.Lista <Medicine>(); Order = new ELineales.Lista <Medicine>(); }
public IActionResult queueList() { Singleton.Instance.SearchList.Clear(); var queue = Singleton.Instance.simQueue[Singleton.Instance.simIndex.IndexOf(simDep + ", " + simMun)].ReturnQueue(); ELineales.Lista <int> list = new ELineales.Lista <int>(); foreach (var nodes in queue) { if (nodes != null) { if (list.IndexOf(nodes.Data) == -1) { foreach (var item in Singleton.Instance.hashTable[nodes.Data]) { if (item.Departamento == simDep && item.Municipio == simMun && item.Priority == nodes.Key && !item.Vaccinated) { Singleton.Instance.SearchList.Add(item); } } list.Add(nodes.Data); } } } return(View(Singleton.Instance.SearchList)); }
private Singleton() { Nombre = new E_Arboles.AVL <string, int>(); Apellido = new E_Arboles.AVL <string, int>(); CUI = new E_Arboles.AVL <long, int>(); hashTable = new ELineales.Lista <Pacient> [20]; simIndex = new ELineales.Lista <string>(); simQueue = new ELineales.Lista <E_Arboles.PriorityQueue <int, int> >(); simVaccinated = new ELineales.Lista <ELineales.Lista <int> >(); SearchList = new ELineales.Lista <Pacient>(); }
public IActionResult AllPacients() { ELineales.Lista <Pacient> list = new ELineales.Lista <Pacient>(); for (int i = 0; i < Singleton.Instance.hashTable.Length; i++) { if (Singleton.Instance.hashTable[i] != null) { foreach (var item in Singleton.Instance.hashTable[i]) { list.Add(item); } } } return(View(list)); }
public IActionResult SearchLN(IFormCollection collection) { try { Singleton.Instance.SearchList.Clear(); ELineales.Lista <int> hashpos = Singleton.Instance.Apellido.FindAll(Convert.ToString(collection["LName"]).ToUpper()); if (hashpos == null) { ViewData["Error"] = "El paciente que busca todavía no se ha registrado en la lista de espera." + "Por favor, regrese a la pestaña de Inscripción e intente de nuevo"; return(View()); } else { for (int i = 0; i < hashpos.Count(); i++) { bool repeated = false; for (int j = 0; j < i; j++) { if (hashpos[i] == hashpos[j]) { repeated = true; } } if (!repeated) { foreach (Pacient p in Singleton.Instance.hashTable[hashpos[i]]) { if (p.LName == collection["LName"].ToString().ToUpper()) { Singleton.Instance.SearchList.Add(p); } } } } } return(RedirectToAction(nameof(Search))); } catch { ViewData["Error"] = "Por favor, llene todos los campos solicitados."; return(View()); } }
private Singleton() { hashTable = new ELineales.Lista <Assignment> [20]; devTable = new E_Arboles.PriorityQueue <int, string> [20]; proyectManager = new ELineales.Lista <Assignment>(); }