Example #1
0
        public ViewAppointmentsForm()
        {
            InitializeComponent();
            Type                    obj2               = Type.GetType(ConfigurationManager.AppSettings["AppointmentRep"]);
            ConstructorInfo         constructor        = obj2.GetConstructor(new Type[] { });
            InterfaceAppointmentDAO defaultRepository2 = (InterfaceAppointmentDAO)constructor.Invoke(null);

            appointment = new AppointmentService(defaultRepository2);
        }
        public CreateAppointmentForm()
        {
            InitializeComponent();

            Type                 obj               = Type.GetType(ConfigurationManager.AppSettings["ServicesRep"]);
            ConstructorInfo      constructor       = obj.GetConstructor(new Type[] { });
            InterfaceServicesDAO defaultRepository = (InterfaceServicesDAO)constructor.Invoke(null);

            service = new ServicesService(defaultRepository);

            Type                    obj2               = Type.GetType(ConfigurationManager.AppSettings["AppointmentRep"]);
            ConstructorInfo         constructor2       = obj2.GetConstructor(new Type[] { });
            InterfaceAppointmentDAO defaultRepository2 = (InterfaceAppointmentDAO)constructor2.Invoke(null);

            appointment = new AppointmentService(defaultRepository2);
            fillListBox();
        }
 public AppointmentService(InterfaceAppointmentDAO interf)
 {
     this.appointmentDAO = interf;
 }