コード例 #1
0
        public AddServiceForm()
        {
            InitializeComponent();
            Type                 obj               = Type.GetType(ConfigurationManager.AppSettings["ServicesRep"]);
            ConstructorInfo      constructor       = obj.GetConstructor(new Type[] { });
            InterfaceServicesDAO defaultRepository = (InterfaceServicesDAO)constructor.Invoke(null);

            service = new ServicesService(defaultRepository);
        }
コード例 #2
0
        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();
        }
コード例 #3
0
 public ServicesService(InterfaceServicesDAO interf)
 {
     this.serviceDAO = interf;
 }