internal void setService(AngajatService srvA, ClientService srvC, ZborService srvZ, BiletService srvB) { this.srvA = srvA; this.srvC = srvC; this.srvZ = srvZ; this.srvB = srvB; }
static void Main(string[] args) { //XmlConfigurator.Configure(new System.IO.FileInfo(args[0])); //Console.WriteLine("Configuration Settings for agentie {0}", GetConnectionStringByName("agentie")); IDictionary <String, string> props = new SortedList <String, String>(); props.Add("ConnectionString", GetConnectionStringByName("agentie")); IAngajatRepository <string, string> repoA = new AngajatRepository(props); AngajatService srvA = new AngajatService(repoA); IClientRepository repoC = new ClientRepository(props); ClientService srvC = new ClientService(repoC); IZborRepository repoZ = new ZborRepository(props); ZborService srvZ = new ZborService(repoZ); IBiletRepository repoB = new BiletRepository(props); BiletService srvB = new BiletService(repoB, repoC, repoZ); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Form2 form2 = new Form2(); form2.setService(srvA, srvC, srvZ, srvB); Application.Run(form2); }