コード例 #1
0
        public IActionResult PesquisaServico(string ProtocoloIdServico)
        {
            ServicoServices servico  = new ServicoServices();
            Protocol        protocol = servico.Protocolo(ProtocoloIdServico);

            _ = protocol == null ? ViewData["MessageError"] = $"Protocolo {ProtocoloIdServico} não encontrado" : ViewData["MessageError"] = null;
            return(protocol == null?View("Servico") : View(protocol));
        }
コード例 #2
0
        public IActionResult ListaProtocolos(string ProtocoloIdServico)
        {
            Protocol protocol = new Protocol();

            protocol = servico.Protocolo(ProtocoloIdServico);

            _ = protocol == null ? ViewData["MessageError"] = $"Protocolo {ProtocoloIdServico} não encontrado" : ViewData["MessageError"] = null;

            ViewBag.Status = GetStatusViewBag();

            Dictionary <string, string> DeParaRole = GetDeParaRoleSolicitacao();

            ViewBag.Role = "";
            foreach (KeyValuePair <string, string> item in DeParaRole)
            {
                if (protocol.Name == item.Key)
                {
                    ViewBag.Role = item.Value;
                    break;
                }
            }

            return(protocol == null?View("PesquisaProtocolo") : View(protocol));
        }