Advertisement
Guest User

ctrl

a guest
Sep 25th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.54 KB | None | 0 0
  1. package DB2Package;
  2.  
  3. import java.sql.*;
  4. import java.util.*;
  5. import javax.swing.table.DefaultTableModel;
  6.  
  7. public class Controller {
  8.    
  9.     DAL dal = new DAL();
  10.  
  11.     //----------------- Skapa -------------------------//
  12.    
  13.     public Student createStudent(String pnr, String sname, String saddress){
  14.         return dal.createStudent(pnr, sname, saddress);
  15.     }
  16.     public Course createCourse(String ccode, String cname, String caddress){
  17.         return dal.createCourse(ccode, cname, caddress);
  18.     }
  19.    
  20.     //----------------- Söka -------------------------//
  21.    
  22.    
  23.       public Student findStudentByPnr(String pnr){
  24.             return dal.findStudentByPnr(pnr);
  25.         }
  26.       public Course findCourseByccode(String ccode){
  27.             return dal.findCourseByccode(ccode);
  28.         }
  29.       public Studied getCourseResults(String ccode){
  30.             return dal.getCourseResults(ccode);
  31.         }
  32.       public Studied getStudentResult(String pnr, String ccode){
  33.             return dal.getStudentResult(pnr, ccode);
  34.         }
  35.       public Student findAllStudentsByPnr(String pnr){
  36.             return dal.findAllStudentsByPnr(pnr);
  37.         }
  38.       public Course findAllCourseBycCode(String ccode){
  39.             return dal.findAllCourseByccode(ccode);
  40.         }
  41.      
  42.     //----------------- Registrera -------------------------//
  43.      
  44.       public Student addStudentToStudied(String pnr, String ccode, String grade){
  45.             return dal.addStudentToStudied(pnr, ccode, grade);
  46.         }  
  47.       public Student addStudentToStudies(String pnr, String ccode){
  48.             return dal.addStudentToStudies(pnr, ccode);
  49.         }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement