Ejemplo 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);
        }
Ejemplo 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);
     }
 }
Ejemplo 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);
     }
 }
Ejemplo n.º 4
0
        public void Insert()
        {
            UserTableGateway DataGateway = new UserTableGateway();

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