Esempio n. 1
0
        public static List <User> getList()
        {
            UserTableGateway DataGateway = new UserTableGateway();
            DataTable        TableData   = DataGateway.Find();
            List <User>      tmp         = new List <User>();

            foreach (DataRow row in TableData.Rows)
            {
                tmp.Add(map(row));
            }
            return(tmp);
        }
Esempio n. 2
0
 public static User GetByID(int id)
 {
     try
     {
         UserTableGateway DataGateway = new UserTableGateway();
         DataTable        TableData   = DataGateway.FindByID(id);
         DataRow          row         = TableData.Rows[0];
         return(map(row));
     }
     catch
     {
         return(null);
     }
 }
Esempio n. 3
0
 public static User GetByEmail(string email)
 {
     try
     {
         UserTableGateway DataGateway = new UserTableGateway();
         DataTable        TableData   = DataGateway.FindByEmail(email);
         DataRow          row         = TableData.Rows[0];
         return(map(row));
     }
     catch
     {
         return(null);
     }
 }
Esempio n. 4
0
        public void Insert()
        {
            UserTableGateway DataGateway = new UserTableGateway();

            DataGateway.Insert(FirstName, LastName, Email, Password);
        }