Exemplo n.º 1
0
 public static ObservableCollection<Access> GetAccess()
 {
     ObservableCollection<Access> ocAccess = new ObservableCollection<Access>();
     string sSql = "Select * from Access";
     DbDataReader reader = DbAccess.GetData(sSql);
     while (reader.Read())
     {
         Access a = new Access()
         {
             Id = (int)reader[0],
             Name = (string)reader[1]
         };
         ocAccess.Add(a);
     }
     return ocAccess;
 }
Exemplo n.º 2
0
 private static Contactpersoon MakeContactpersoon(DbDataReader reader, ContactpersoonType conType, Access acc)
 {
     Contactpersoon person = new Contactpersoon()
          {
              ID = (int)reader[0],
              Name = (string)reader[1],
              Company = (string)reader[2],
              JobRole = conType,
              Accesszone = acc,
              City = (string)reader[5],
              Email = (string)reader[6],
              Phone = (string)reader[7],
              Cellphone = (string)reader[8],
              Print = (bool)reader[9]
          };
     return person;
 }
Exemplo n.º 3
0
 private static Access MakeAccess(DbDataReader reader)
 {
     Access acc = new Access()
     {
         Id = (int)reader[12],
         Name = (string)reader[13]
     };
     return acc;
 }