Ejemplo n.º 1
0
        public static GenericTable GetFromHistoryOrCurrent(string TableName, TDatabase db, long id)
        {
            GenericTable gt = new GenericTable(TableName, db);
            if (gt.ReadRecord(id) > 0)
                return gt;

            gt = new GenericTable("History" + TableName, db);
            if (gt.ReadRecord(id) > 0)
                return gt;

            return null;
        }
Ejemplo n.º 2
0
        //get any record from a any database and returns ToString on it
        public static string AnyTableToString(string tablename, TDatabase db, long uid)
        {
            string DispString;
            if ((tablename == null)) {
                DispString = "unknown data type";
            } else {
                try {
                    GenericTable gt = new GenericTable(tablename, db);
                    gt.ReadRecord(uid);
                    DispString = gt.ToString();
                } catch (Exception x) {
                    DispString = "Error getting record " + x.Message;
                }
            }

            return DispString;
        }