Ejemplo n.º 1
0
 public Controller getControl(ControlType pType)
 {
     if (pType == ControlType.ControlCalendar)
     {
         Controller controlCalendar = ControllerCalendar.getInstance();
         return(controlCalendar);
     }
     else if (pType == ControlType.ControlMedicine)
     {
         Controller controlMedicine = ControllerMedicine.getInstance();
         return(controlMedicine);
     }
     else if (pType == ControlType.ControlPayment)
     {
         Controller controlPayment = ControllerPayment.getInstance();
         return(controlPayment);
     }
     else if (pType == ControlType.ControlUser)
     {
         Controller controlUser = ControllerUser.getInstance();
         return(controlUser);
     }
     else
     {
         return(null);
     }
 }
Ejemplo n.º 2
0
 private void loadData(User pUser)
 {
     user = pUser;
     ControllerPayment.getInstance().user  = this.user;
     ControllerCalendar.getInstance().user = this.user;
     ControllerMedicine.getInstance().user = this.user;
 }
 public static ControllerCalendar getInstance()
 {
     if (instance == null)
     {
         instance = new ControllerCalendar();
     }
     return(instance);
 }