예제 #1
0
        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()));
            }
        }