Exemplo n.º 1
0
 public UserInfo Select(String name)
 {
     UserInfo returns = null;
     var dt = SqlDbAccess.GetInstance().GetTable("SELECT * FROM TRightuser WHERE Name = '" + name + "'");
     foreach (DataRow dr in dt.Rows)
     {
         returns = new UserInfo();
         returns.FromDataRow(dr);
         break;
     }
     return returns;
 }
Exemplo n.º 2
0
 public UserInfo Select(Int32 idx)
 {
     UserInfo returns = null;
     var dt = SqlDbAccess.GetInstance().GetTable("SELECT * FROM TRightuser WHERE Idx = " + idx);
     foreach (DataRow dr in dt.Rows)
     {
         returns = new UserInfo();
         returns.FromDataRow(dr);
         break;
     }
     return returns;
 }
Exemplo n.º 3
0
 public IList<UserInfo> SelectAll()
 {
     var returns = new List<UserInfo>();
     var dt = SqlDbAccess.GetInstance().GetTable("SELECT * FROM TRightuser");
     foreach (DataRow dr in dt.Rows)
     {
         var tUser = new UserInfo();
         tUser.FromDataRow(dr);
         returns.Add(tUser);
     }
     return returns;
 }