protected new void Page_Load(object sender, EventArgs e) { if (chk_alaplap.Checked) { placeholder1.Controls.Add(new Label { Text = "Alaplapok:" }); foreach (var item in Adatbazis.GetAlaplapok()) { AlaplapControl ac = (AlaplapControl)LoadControl("~/View/AlaplapControl.ascx"); ac.Tartalom = item; placeholder1.Controls.Add(ac); } } if (chk_cpu.Checked) { placeholder1.Controls.Add(new Label { Text = "Processzorok:" }); foreach (var item in Adatbazis.GetProcesszorok()) { } } if (chk_hdd.Checked) { placeholder1.Controls.Add(new Label { Text = "Merevlemezek:" }); foreach (var item in Adatbazis.GetHddk()) { } } if (chk_vga.Checked) { placeholder1.Controls.Add(new Label { Text = "Videókártyák" }); foreach (var item in Adatbazis.GetVideokartyak()) { } } if (chk_memoria.Checked) { placeholder1.Controls.Add(new Label { Text = "Memóriák:" }); foreach (var item in Adatbazis.GetMemoriaTipusok()) { } } }
protected void Page_PreRender(object sender, EventArgs e) { switch (lb_type_del.SelectedValue) { case "CPU": CreateTypeList(Adatbazis.GetProcesszorFoglalatok); break; case "RAM": CreateTypeList(Adatbazis.GetMemoriaTipusok); break; case "HDD": CreateTypeList(Adatbazis.GetHddCsatolok); break; case "GFX": CreateTypeList(Adatbazis.GetVideokartyaFoglalatok); break; default: showMessage("Internal error!"); break; } lb_hdd_csatolo.Items.Clear(); for (IDictionaryEnumerator i = Adatbazis.GetHddCsatolok().GetEnumerator(); i.MoveNext();) { lb_hdd_csatolo.Items.Add(new ListItem(i.Value.ToString(), i.Key.ToString())); } lb_video_foglalat.Items.Clear(); lb_alaplap_video_fog.Items.Clear(); for (IDictionaryEnumerator i = Adatbazis.GetVideokartyaFoglalatok().GetEnumerator(); i.MoveNext();) { lb_video_foglalat.Items.Add(new ListItem(i.Value.ToString(), i.Key.ToString())); lb_alaplap_video_fog.Items.Add(new ListItem(i.Value.ToString(), i.Key.ToString())); } lb_ram_tipus.Items.Clear(); lb_alaplap_mem_fog.Items.Clear(); for (IDictionaryEnumerator i = Adatbazis.GetMemoriaTipusok().GetEnumerator(); i.MoveNext();) { lb_ram_tipus.Items.Add(new ListItem(i.Value.ToString(), i.Key.ToString())); lb_alaplap_mem_fog.Items.Add(new ListItem(i.Value.ToString(), i.Key.ToString())); } lb_proc_foglalat.Items.Clear(); lb_alaplap_cpu_fog.Items.Clear(); for (IDictionaryEnumerator i = Adatbazis.GetProcesszorFoglalatok().GetEnumerator(); i.MoveNext();) { lb_proc_foglalat.Items.Add(new ListItem(i.Value.ToString(), i.Key.ToString())); lb_alaplap_cpu_fog.Items.Add(new ListItem(i.Value.ToString(), i.Key.ToString())); } lb_gyarto.Items.Clear(); for (IDictionaryEnumerator i = Adatbazis.GetGyartok().GetEnumerator(); i.MoveNext();) { lb_gyarto.Items.Add(new ListItem(i.Value.ToString(), i.Key.ToString())); } }