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); }
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 ServicesService(InterfaceServicesDAO interf) { this.serviceDAO = interf; }