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

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