Exemplo n.º 1
0
 public static void updateMedicine(Medicine m)
 {
     db.open(medicineDBName);
     db.prepare("update [medicine] set [name]=@name,[mild]=@mild,[ht]=@ht,[lr]=@lr,[ki]=@ki,[sp]=@sp,[lu]=@lu,[st]=@st,[gb]=@gb,[bl]=@bl,[li]=@li,[tb]=@tb,[si]=@si,[pc]=@pc where [id]=@id");
     db.setup(DbType.String, "name", m.name);
     db.setup(DbType.Double, "mild", m.mild);
     db.setup(DbType.Double, "ht", m.merdian[0]);
     db.setup(DbType.Double, "lr", m.merdian[1]);
     db.setup(DbType.Double, "ki", m.merdian[2]);
     db.setup(DbType.Double, "sp", m.merdian[3]);
     db.setup(DbType.Double, "lu", m.merdian[4]);
     db.setup(DbType.Double, "st", m.merdian[5]);
     db.setup(DbType.Double, "gb", m.merdian[6]);
     db.setup(DbType.Double, "bl", m.merdian[7]);
     db.setup(DbType.Double, "li", m.merdian[8]);
     db.setup(DbType.Double, "tb", m.merdian[9]);
     db.setup(DbType.Double, "si", m.merdian[10]);
     db.setup(DbType.Double, "pc", m.merdian[11]);
     db.setup(DbType.Int32, "id", m.id);
     db.update();
     db.close();
 }
Exemplo n.º 2
0
        public double state; // reserved

        public PrescriptNode(Medicine m, double w, double s)
        {
            med    = m;
            weight = w;
            state  = s;
        }