Exemplo n.º 1
0
        private void FillList(string field, string table)
        {
            Session["campo"] = field;
            Session["table"] = table;

            ListElement.DataSource = DatabaseConnection.CreateDataset("SELECT " + field + " AS LISTITEM, ID, LANG, K_ID FROM " + table + " WHERE ID=K_ID ORDER BY " + field);
            ListElement.DataBind();
        }
Exemplo n.º 2
0
 private void FillList(string listsfield, string liststable, int type)
 {
     Session["listsfield"] = listsfield;
     Session["liststable"] = liststable;
     ViewState["type"]     = type;
     if (type == -1)
     {
         ListElement.DataSource = DatabaseConnection.CreateDataset("SELECT " + listsfield + " AS LISTITEM, ID, LANG, K_ID FROM " + liststable + " WHERE ID=K_ID ORDER BY " + listsfield);
     }
     else
     {
         ListElement.DataSource = DatabaseConnection.CreateDataset("SELECT " + listsfield + " AS LISTITEM, ID, LANG, K_ID FROM " + liststable + " WHERE ID=K_ID AND TYPE=" + type + " ORDER BY " + listsfield);
     }
     ListElement.DataBind();
 }