public ActionResult Simbolos()
        {
            MicroDB.MicroDB db = new MicroDB.MicroDB();

            object simbolos = db.ExecuteReader("Exec spGetSimbolos 1");

            return(Json(simbolos));
        }
Esempio n. 2
0
        public ActionResult DetalleCitas()
        {
            MicroDB.MicroDB db = new MicroDB.MicroDB();

            string strSQL = string.Format("SELECT * FROM vwCita");
            var    o      = db.ExecuteReader(strSQL);

            return(Json(o));
        }
        public ActionResult Detalle([FromBody] DetalleID id)
        {
            MicroDB.MicroDB db = new MicroDB.MicroDB();

            object detalle = db.ExecuteReader("select nPlacagramaID, nPlacagramaDetalleID, tipo, sNombreDiente, sDescripcion " +
                                              "from vwPlacagramaDetalle where nPlacagramaID=" + id.id);

            return(Json(detalle));
        }
        public ActionResult ValidarCompatibilidadSimbolos([FromBody] SimboloPair simboloPair)
        {
            MicroDB.MicroDB db = new MicroDB.MicroDB();

            string strSQL = string.Format("select * from vwSimbolosIncompatibles where (Simbolo1='{0}' and Simbolo2='{1}') " +
                                          "or (Simbolo1='{1}' and Simbolo2='{0}')", simboloPair.simbolo1, simboloPair.simbolo2);

            object consulta = db.ExecuteReader(strSQL);

            int resultado = 0;

            return(Json(resultado));
        }
        public ActionResult ValidarCompatibilidadDientes([FromBody] DientePair dientePair)
        {
            MicroDB.MicroDB db = new MicroDB.MicroDB();

            string strSQL = string.Format("select * from vwDientesIncompatibles where (Diente1='{0}' and Diente2='{1}') " +
                                          "or (Diente1='{1}' and Diente2='{0}')", dientePair.diente1, dientePair.diente2);

            object consulta = db.ExecuteReader(strSQL);

            var nameOfProperty = "Count";
            var propertyInfo   = consulta.GetType().GetProperty(nameOfProperty);
            var value          = propertyInfo.GetValue(consulta, null);

            int resultado = (int.Parse(value.ToString()) > 0)?1:0;

            return(Json(resultado));
        }