Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
        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);
            }
        }