C# Server

Access the database

CSGenioAtable

If you have a table named PERSO with fields NAME and GENDER, genio will generate a class named CSGenioAperso with the corresponding fields. This can be used to query the database:

    //Search all persons in a list
    List<CSGenioAperso> allPersons = CSGenioAperso.searchList(sp, user);
    foreach(CSGenioAperso person in allPersons)
    {
        if(person.ValGender == "M")
        {
            person.ValName = "Mr " + person.ValName;
        }
        else
        {
            person.ValName = "Ms " + person.ValName;
        }
    }

Common functions for this objects:

  • search(key) : Search for a record with the given key
  • search(CriteriaSet) : Search for a list of records that fulfill the CriteriaSet
  • update() : Store the changes made to an CSGenioA object to the database
  • insert() : Create a new record with the values in the CSGenioA object
  • delete() : Delete the record from the database