protected void MenuItem_Click_3(object sender, RoutedEventArgs e) { MessageBoxResult result = MessageBox.Show("Biztosan törölni szeretnéd? \n", "HR Cloud", MessageBoxButton.YesNoCancel); switch (result) { case MessageBoxResult.Yes: MenuItem menuItem = sender as MenuItem; pc_struct items = menuItem.DataContext as pc_struct; if (items.megnevezes_pc != "Összes") { sControl.settingDelete(items.id, "pc"); } listLoader(); break; case MessageBoxResult.No: break; case MessageBoxResult.Cancel: break; } }
protected List <ProjectInsertListItems> getData() { vegzettseg_struct vegzettsegComboBox = (vegzettseg_cbx as ComboBox).SelectedItem as vegzettseg_struct; munkakor_struct munkakorComboBox = (munkakor_cbx as ComboBox).SelectedItem as munkakor_struct; nyelv_struct nyelvComboBox = (nyelv_cbx as ComboBox).SelectedItem as nyelv_struct; kompetenciak kepzettseg1ComboBox = (k1_cbx as ComboBox).SelectedItem as kompetenciak; kompetenciak kepzettseg2ComboBox = (k2_cbx as ComboBox).SelectedItem as kompetenciak; kompetenciak kepzettseg3ComboBox = (k3_cbx as ComboBox).SelectedItem as kompetenciak; kompetenciak kepzettseg4ComboBox = (k4_cbx as ComboBox).SelectedItem as kompetenciak; kompetenciak kepzettseg5ComboBox = (k5_cbx as ComboBox).SelectedItem as kompetenciak; pc_struct pcComboBox = (pc_cbx as ComboBox).SelectedItem as pc_struct; DateTime localDate = DateTime.Now; List <ProjectInsertListItems> items = new List <ProjectInsertListItems>(); items.Add(new ProjectInsertListItems { id = 0, hr_id = session.UserData[0].id, megnevezes_projekt = nev_tbx.Text, pc = pcComboBox.id, vegzettseg = vegzettsegComboBox.id, tapasztalat_ev = Convert.ToInt32(tapasztalat_tbx.Text), statusz = 1, fel_datum = localDate.ToString("yyyy.MM.dd."), le_datum = "-", nyelvtudas = nyelvComboBox.id, munkakor = munkakorComboBox.id, szuldatum = 0, ber = Convert.ToInt32(ber_tbx.Text), kepesseg1 = Convert.ToInt32(kepzettseg1ComboBox.id), kepesseg2 = Convert.ToInt32(kepzettseg2ComboBox.id), kepesseg3 = Convert.ToInt32(kepzettseg3ComboBox.id), kepesseg4 = Convert.ToInt32(kepzettseg4ComboBox.id), kepesseg5 = Convert.ToInt32(kepzettseg5ComboBox.id) }); return(items); }