public static decimal selectDecimal(string sql, string database) { List <List <string> > list = RTDB.lowSelect(sql, database); if (list.Count < 2) { return(0); } string s = list[1][0]; try { return(decimal.Parse(s)); } catch (Exception err) { return(0M); } }
public static int selectInt(string sql, string database) { List <List <string> > list = RTDB.lowSelect(sql, database); if (list.Count < 2) { return(0); } string s = list[1][0]; try { decimal d = decimal.Parse(s); return((int)d); } catch (Exception err) { return(0); } }