Beispiel #1
0
        public static Dictionary<string, string> getTemplates(WebDaD.Toolkit.Database.Database db)
        {
            WebDaD.Toolkit.Database.Result d = db.getRow(Template.table, new string[] { "id", "name" }, "", "");

            Dictionary<string, string> r = new Dictionary<string, string>();

            r.Add("0", "Keines");

            foreach (WebDaD.Toolkit.Database.Row item in d.Rows)
            {
                r.Add(item.Cells["id"], item.Cells["name"]);
            }

            if (d.RowCount > 0) return r;
            else return null;
        }