/*
- * Copyright (C) 2013-2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2013-2017 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
return priv->w;
}
+GHashTable
+*organigramma_ruolo_get_by_id (OrganigrammaCommons *commons, gint id)
+{
+ GHashTable *ret;
+
+ gchar *sql;
+
+ g_return_val_if_fail (commons != NULL, NULL);
+ g_return_val_if_fail (id > 0, NULL);
+
+ sql = g_strdup_printf ("SELECT * FROM ruoli WHERE id = %d",
+ id);
+
+ ret = gdaex_data_model_row_to_hashtable_from_sql (commons->gdaex, sql, 0);
+
+ g_free (sql);
+
+ return ret;
+}
+
/* PRIVATE */
static void
organigramma_ruolo_carica (OrganigrammaRuolo *ruolo)
-/*
- * Copyright (C) 2013 Andrea Zagli <azagli@libero.it>
+/*
+ * Copyright (C) 2013-2017 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
GtkWidget *organigramma_ruolo_get_widget (OrganigrammaRuolo *ruolo);
+GHashTable *organigramma_ruolo_get_by_id (OrganigrammaCommons *commons, gint id);
+
G_END_DECLS