public IActionResult masterdetail()
        {
            //We need to access the Agencies table here and return in to the masterdetail View
            var        agencis = dbContext.Agencies.ToList();
            List <ORI> lstORI  = new List <ORI>();

            foreach (var agency in agencis)
            {
                ORI oRI = new ORI();
                oRI.county  = agency.county;
                oRI.nameORI = agency.nameORI;
                lstORI.Add(oRI);
            }
            return(View(lstORI));
        }
        public static Instruccion DescodificarInstruccion(byte codigo, ushort pos)
        {
            Instruccion instruccion       = null;
            ArgMemoria  argumentoMemoria  = Argumento.ConvertirEnArgumento((Main.ObtenerMemoria.ObtenerDireccion((ushort)(pos + 1)).Contenido * 256 + Main.ObtenerMemoria.ObtenerDireccion((ushort)(pos + 2)).Contenido).ToString("X4"), true) as ArgMemoria;
            ArgRegistro argumentoRegistro = Argumento.ConvertirEnArgumento(Main.ObtenerNombreRegistro(codigo % 4), false) as ArgRegistro;
            ArgLiteral  argumentoLiteral  = Argumento.ConvertirEnArgumento(Main.ObtenerMemoria.ObtenerDireccion((ushort)(pos + 1)).Contenido.ToString(), false) as ArgLiteral;

            switch (codigo / 8)
            {
            case 0:
                instruccion = new LD(argumentoRegistro);
                break;

            case 1:
                instruccion = new ST(argumentoRegistro);
                break;

            case 4:
            case 5:
                instruccion = new LDM(argumentoMemoria, argumentoRegistro);
                break;

            case 6:
            case 7:
                instruccion = new STM(argumentoRegistro, argumentoMemoria);
                break;

            case 2:
            case 3:
                instruccion = new LDI(argumentoLiteral, argumentoRegistro);
                break;

            case 8:
                instruccion = new ADD(argumentoRegistro);
                break;

            case 9:
                instruccion = new SUB(argumentoRegistro);
                break;

            case 10:
                instruccion = new CMP(argumentoRegistro);
                break;


            case 11:
                instruccion = new INC();
                break;

            case 12:
                instruccion = new ADI(argumentoLiteral);
                break;

            case 13:
                instruccion = new SUI(argumentoLiteral);
                break;

            case 14:
            case 15:
                instruccion = new CMI(argumentoLiteral);
                break;


            case 16:
                instruccion = new ANA(argumentoRegistro);
                break;

            case 17:
                instruccion = new ORA(argumentoRegistro);
                break;

            case 18:
                instruccion = new XRA(argumentoRegistro);
                break;


            case 19:
                instruccion = new CMA();
                break;

            case 20:
                instruccion = new ANI(argumentoLiteral);
                break;

            case 21:
                instruccion = new ORI(argumentoLiteral);
                break;

            case 22:
            case 23:
                instruccion = new XRI(argumentoLiteral);
                break;

            case 24:
            case 25:
                instruccion = new JMP(argumentoMemoria);
                break;

            case 26:
                instruccion = new BEQ(argumentoMemoria);
                break;

            case 27:
                instruccion = new BC(argumentoMemoria);
                break;

            case 28:
            case 29:
                instruccion = new LF();
                break;

            case 30:
                instruccion = new IN(argumentoMemoria, argumentoRegistro);
                break;

            case 31:
                instruccion = new OUT(argumentoRegistro, argumentoMemoria);
                break;
            }
            return(instruccion);
        }