public System.Threading.Tasks.Task SendModalDetailsToUsId(string usid, ModalDetails modaldetails) { return(Clients.Group(usid).SendAsync("ReceiveModalDetails", modaldetails)); }
public ActionResult RequestDetails(int id) { GATE_MaterialRequest order = DB.GATE_MaterialRequest .Include(x => x.ConcernedEmployee) .Include(x => x.OrderedByEmployee) .Include(x => x.Package) .Include(x => x.Package.GenericMaterials) .Include(x => x.ComponentRequests) .Where(x => x.MaterialRequestId == id) .Select(x => x).FirstOrDefault(); string title = "Details of order #" + order.MaterialRequestId; string conceredEmployeeName = order.ConcernedEmployee.Name; string orderedBy = order.IsAutomated == false ? "DNA Request." : "Requested By " + order.OrderedByEmployee.Name + "."; IEnumerable<string> materialLables; if (order.PackageId != null) { materialLables = order.Package.GenericMaterials.ToDictionary(mat => mat.GenericMaterialId, mat => mat.Label).Values; } else { materialLables = order.ComponentRequests.ToDictionary(com => com.MaterialId, com => com.GenericMaterial.Label).Values; } string components = string.Join(" | ", materialLables); ModalDetails model = new ModalDetails(title, "requestModal", orderedBy, conceredEmployeeName, order.IsAutomated, components, order.MaterialAction); return PartialView("_PopupDetails", model); }
public System.Threading.Tasks.Task SendMessageToGroupForDelete(string usid, ModalDetails modaldetails) { return(Clients.Group(usid).SendAsync("ReceiveMessageDelete", modaldetails)); }