private void synchronizeResources()
        {
            List <ModelProjektek> projektList = ModelProjektek.getProjektek("SELECT id, megnevezes_projekt, statusz, fel_datum FROM projektek WHERE statusz=1");

            Utility.deleteWebTable("projektek");
            foreach (var item in projektList)
            {
                item.insertWeb(mySqlWeb);
            }

            List <ModelErtesulesek> ertesulesekList = ModelErtesulesek.getErtesulesek("SELECT id, ertesules_megnevezes FROM ertesulesek");

            Utility.deleteWebTable("ertesulesek");
            foreach (var item in ertesulesekList)
            {
                item.insertWeb(mySqlWeb);
            }

            List <ModelNyelv> nyelvList = ModelNyelv.getNyelv("SELECT id, megnevezes_nyelv FROM nyelv");

            Utility.deleteWebTable("nyelv");
            foreach (var item in nyelvList)
            {
                item.insertWeb(mySqlWeb);
            }

            List <ModelVegzettseg> vegzettsegList = ModelVegzettseg.getVegzettsegek("SELECT id, megnevezes_vegzettseg FROM vegzettsegek");

            Utility.deleteWebTable("vegzettsegek");
            foreach (var item in vegzettsegList)
            {
                item.insertWeb(mySqlWeb);
            }

            List <ModelFreelancerList> freelancerList = ModelFreelancerList.getFreelancerList("SELECT * FROM freelancer_list");

            Utility.deleteWebTable("freelancer_list");
            foreach (var item in freelancerList)
            {
                item.insertWeb(mySqlWeb);
            }

            List <ModelJelentkezesek> jelentkezesekList = ModelJelentkezesek.getJelentkezesekWeb("SELECT * FROM jelentkezesek");

            Utility.deleteTable("jelentkezesek");
            foreach (var item in jelentkezesekList)
            {
                item.Insert(mySql);
            }

            if (mySql != null)
            {
                mySql.dbClose();
            }
            if (mySqlWeb != null)
            {
                mySqlWeb.dbClose();
            }
        }
Beispiel #2
0
        protected ModelInsertProject getData()
        {
            ModelVegzettseg    vegzettsegComboBox  = (vegzettseg_cbx as ComboBox).SelectedItem as ModelVegzettseg;
            ModelMunkakor      munkakorComboBox    = (munkakor_cbx as ComboBox).SelectedItem as ModelMunkakor;
            ModelNyelv         nyelvComboBox       = (nyelv_cbx as ComboBox).SelectedItem as ModelNyelv;
            ModelKompetenciak  kepzettseg1ComboBox = (k1_cbx as ComboBox).SelectedItem as ModelKompetenciak;
            ModelKompetenciak  kepzettseg2ComboBox = (k2_cbx as ComboBox).SelectedItem as ModelKompetenciak;
            ModelKompetenciak  kepzettseg3ComboBox = (k3_cbx as ComboBox).SelectedItem as ModelKompetenciak;
            ModelKompetenciak  kepzettseg4ComboBox = (k4_cbx as ComboBox).SelectedItem as ModelKompetenciak;
            ModelKompetenciak  kepzettseg5ComboBox = (k5_cbx as ComboBox).SelectedItem as ModelKompetenciak;
            ModelPc            pcComboBox          = (pc_cbx as ComboBox).SelectedItem as ModelPc;
            DateTime           localDate           = DateTime.Now;
            ModelInsertProject data;

            data = new ModelInsertProject
            {
                id        = 0,
                fel_datum = localDate.ToString("yyyy.MM.dd"),
                le_datum  = "-",
                statusz   = 1,
                szuldatum = 0,

                megnevezes_projekt = nev_tbx.Text,
                hr_id          = Session.UserData.id,
                tapasztalat_ev = Convert.ToInt32((tapasztalat_tbx.Text.Length > 0 ? tapasztalat_tbx.Text : "0")),
                ber            = Convert.ToInt32((ber_tbx.Text.Length > 0 ? ber_tbx.Text : "0")),

                pc = pcComboBox.id,

                nyelvtudas = Convert.ToInt32(nyelv_cbx.SelectedIndex.Equals(-1) ? "0" : nyelvComboBox.id.ToString()),
                munkakor   = Convert.ToInt32(munkakor_cbx.SelectedIndex.Equals(-1) ? "0" : munkakorComboBox.id.ToString()),
                vegzettseg = Convert.ToInt32(vegzettseg_cbx.SelectedIndex.Equals(-1) ? "0" : vegzettsegComboBox.id.ToString()),
                kepesseg1  = Convert.ToInt32(k1_cbx.SelectedIndex.Equals(-1) ? "0" : kepzettseg1ComboBox.id.ToString()),
                kepesseg2  = Convert.ToInt32(k2_cbx.SelectedIndex.Equals(-1) ? "0" : kepzettseg2ComboBox.id.ToString()),
                kepesseg3  = Convert.ToInt32(k3_cbx.SelectedIndex.Equals(-1) ? "0" : kepzettseg3ComboBox.id.ToString()),
                kepesseg4  = Convert.ToInt32(k4_cbx.SelectedIndex.Equals(-1) ? "0" : kepzettseg4ComboBox.id.ToString()),
                kepesseg5  = Convert.ToInt32(k5_cbx.SelectedIndex.Equals(-1) ? "0" : kepzettseg5ComboBox.id.ToString()),
            };
            return(data);
        }
        protected ModelFullApplicant getFormData()
        {
            DateTime           localDate = DateTime.Now;
            ModelFullApplicant items;

            ModelNem         nemeComboBoxItem       = (neme_cbx as ComboBox).SelectedItem as ModelNem;
            ModelNyelv       nyelvComboBoxItem      = (nyelv_cbx as ComboBox).SelectedItem as ModelNyelv;
            ModelNyelv       nyelv2ComboBoxItem     = (nyelv2_cbx as ComboBox).SelectedItem as ModelNyelv;
            ModelErtesulesek ertesulesComboBoxItem  = (ertesules_cbx as ComboBox).SelectedItem as ModelErtesulesek;
            ModelMunkakor    munkakorComboBoxItem   = (munkakor_cbx as ComboBox).SelectedItem as ModelMunkakor;
            ModelMunkakor    munkakor2ComboBoxItem  = (munkakor2_cbx as ComboBox).SelectedItem as ModelMunkakor;
            ModelMunkakor    munkakor3ComboBoxItem  = (munkakor3_cbx as ComboBox).SelectedItem as ModelMunkakor;
            ModelVegzettseg  vegzettsegComboBoxItem = (vegzettseg_cbx as ComboBox).SelectedItem as ModelVegzettseg;

            items = new ModelFullApplicant
            {
                id             = 0,
                nev            = nev_tbx.Text,
                email          = email_tbx.Text,
                telefon        = telefon_tbx.Text,
                lakhely        = lakhely_tbx.Text,
                tapasztalat_ev = Convert.ToInt32((tapasztalat_tbx.Text.Length > 0? tapasztalat_tbx.Text : "0")),
                szuldatum      = Convert.ToInt32(eletkor_tbx.Text.Length > 0 ? eletkor_tbx.Text : "0"),
                reg_date       = localDate.ToString("yyyy.MM.dd."),

                neme         = (neme_cbx.SelectedIndex.Equals(-1) ? "0" : nemeComboBoxItem.id.ToString()),
                munkakor     = (munkakor_cbx.SelectedIndex.Equals(-1) ? "1" : munkakorComboBoxItem.id.ToString()),
                munkakor2    = (munkakor2_cbx.SelectedIndex.Equals(-1) ? "1" : munkakor2ComboBoxItem.id.ToString()),
                munkakor3    = (munkakor3_cbx.SelectedIndex.Equals(-1) ? "1" : munkakor3ComboBoxItem.id.ToString()),
                vegz_terulet = (vegzettseg_cbx.SelectedIndex.Equals(-1) ? "1" : vegzettsegComboBoxItem.id.ToString()),
                nyelvtudas   = (nyelv_cbx.SelectedIndex.Equals(-1) ? "0" : nyelvComboBoxItem.id.ToString()),
                nyelvtudas2  = (nyelv2_cbx.SelectedIndex.Equals(-1) ? "0" : nyelv2ComboBoxItem.id.ToString()),
                ertesult     = (ertesules_cbx.SelectedIndex.Equals(-1) ? "0" : ertesulesComboBoxItem.id.ToString())
            };
            return(items);
        }
Beispiel #4
0
        protected void DeleteListItem(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;
                ModelVegzettseg items    = menuItem.DataContext as ModelVegzettseg;
                int             id       = 9999;
                switch (menuItem.Tag.ToString())
                {
                case "munkakor":
                    id = (menuItem.DataContext as ModelMunkakor).id;
                    break;

                case "pc":
                    id = (menuItem.DataContext as ModelPc).id;
                    break;

                case "ertesulesek":
                    id = (menuItem.DataContext as ModelErtesulesek).id;
                    break;

                case "vegzettsegek":
                    id = (menuItem.DataContext as ModelVegzettseg).id;
                    break;

                case "nyelv":
                    id = (menuItem.DataContext as ModelNyelv).id;
                    break;

                case "kompetenciak":
                    id = (menuItem.DataContext as ModelKompetenciak).id;
                    break;

                case "jelolt_cimkek":
                    id = (menuItem.DataContext as ModelCimkek).id;
                    break;

                case "freelancer_list":
                    id = (menuItem.DataContext as ModelFreelancerList).id;
                    break;

                default:
                    break;
                }
                if (id != 9999)
                {
                    util.Delete(id, menuItem.Tag.ToString());
                }
                listLoader();
                break;

            case MessageBoxResult.No:
                break;

            case MessageBoxResult.Cancel:
                break;
            }
        }
Beispiel #5
0
 public List <ModelVegzettseg> Data_Vegzettseg() //javított
 {
     return(ModelVegzettseg.GetModelVegzettseg("SELECT * FROM vegzettsegek"));
 }
        protected ModelProjectSearchBar GetSearchValues()
        {
            ModelProjectSearchBar value          = new ModelProjectSearchBar();
            ModelNyelv            nyelvItem      = null;
            ModelVegzettseg       vegzettsegItem = null;
            string nyelvkStr     = "";
            string vegzettsegStr = "";

            try
            {
                nyelvItem      = (nyelv_srccbx as ComboBox).SelectedItem as ModelNyelv;
                vegzettsegItem = (vegzettseg_srccbx as ComboBox).SelectedItem as ModelVegzettseg;
            }
            catch (Exception) {
            }

            try  { if (vegzettsegItem.id != -1)
                   {
                       vegzettsegStr = vegzettsegItem.id.ToString();
                   }
            } catch (Exception) { }

            try  { if (nyelvItem.id != -1)
                   {
                       nyelvkStr = nyelvItem.id.ToString();
                   }
            } catch (Exception)  {}

            string jeloltszam = jeloltszam_srcinp.Text;

            if (jeloltszam_srcinp.Text == "")
            {
                jeloltszam = "0";
            }

            string interjuk = interju_srcinp.Text;

            if (interju_srcinp.Text == "")
            {
                interjuk = "0";
            }

            string publikalt = "";

            if (publikalt_check.IsChecked == true)
            {
                publikalt = "1";
            }

            string sorrend = " ASC";

            if (sorrend_check.IsChecked == true)
            {
                sorrend = " DESC";
            }

            value = new ModelProjectSearchBar
            {
                projektnev      = projektnev_srcinp.Text,
                jeloltszam      = jeloltszam,
                publikalva      = publikalva_srcinp.Text,
                interjuk        = interjuk,
                pc              = pc_srcinp.Text,
                nyelvkStr       = nyelvkStr,
                nyelvIndex      = nyelv_srccbx.SelectedIndex,
                vegzettsegStr   = vegzettsegStr,
                vegzettsegIndex = vegzettseg_srccbx.SelectedIndex,
                cimke           = cimke_srcinp.Text,
                jeloltnev       = jeloltnev_srcinp.Text,
                publikalt       = publikalt,
                publikaltBool   = publikalt_check.IsChecked.Value,
                HeaderSelected  = HeaderSelected,
                sorrend         = sorrend
            };
            return(value);
        }
        protected ModelApplicantSearchBar GetSearchValues()
        {
            ModelApplicantSearchBar list = new ModelApplicantSearchBar();

            ModelNem        nemek_item      = (nemek_srccbx as ComboBox).SelectedItem as ModelNem;
            ModelMunkakor   munkakor_item   = (munkakor_srccbx as ComboBox).SelectedItem as ModelMunkakor;
            ModelVegzettseg vegzettseg_item = (vegzettseg_srccbx as ComboBox).SelectedItem as ModelVegzettseg;
            ModelCimkek     cimke_item      = (cimke_srccbx as ComboBox).SelectedItem as ModelCimkek;

            double listSize      = Math.Round(applicant_listBox.RenderSize.Height / 55);
            string munkakorStr   = "";
            string vegzettsegStr = "";
            string nemekStr      = "";
            string cimkeStr      = "";

            if (munkakor_srccbx.SelectedIndex != -1)
            {
                munkakorStr = munkakor_item.id.ToString();
            }
            if (vegzettseg_srccbx.SelectedIndex != -1)
            {
                vegzettsegStr = vegzettseg_item.id.ToString();
            }
            if (nemek_srccbx.SelectedIndex != -1)
            {
                nemekStr = nemek_item.id.ToString();
            }
            if (cimke_srccbx.SelectedIndex != -1)
            {
                cimkeStr = cimke_item.cimke_megnevezes;
            }
            else
            {
                cimkeStr = cimke_srcinp.Text;
            }

            //string tapasztalat = tapsztalat_srcinp.Text;
            //if (tapsztalat_srcinp.Text == "")
            //    tapasztalat = "";

            string interjuk = interju_srcinp.Text;

            if (interju_srcinp.Text == "")
            {
                interjuk = "";
            }

            string szabad = "";

            if (szabad_check.IsChecked == true)
            {
                szabad = "1";
            }

            string sorrend = " ASC";


            list = new ModelApplicantSearchBar
            {
                nev     = nev_srcinp.Text,
                lakhely = lakhely_srcinp.Text,
                email   = email_srcinp.Text,
                eletkor = eletkor_srcinp.Text,
                //tapasztalat = tapasztalat,
                regdate         = regdate_srcinp.Text,
                interjuk        = interjuk,
                nemekStr        = nemekStr,
                nemekIndex      = nemek_srccbx.SelectedIndex,
                munkakorStr     = munkakorStr,
                munkakorIndex   = munkakor_srccbx.SelectedIndex,
                vegzettsegStr   = vegzettsegStr,
                vegzettsegIndex = nemek_srccbx.SelectedIndex,
                cimke           = cimkeStr,
                szabad          = szabad,
                allasbanBool    = allasban_check.IsChecked.Value,
                szabadBool      = szabad_check.IsChecked.Value,
                HeaderSelected  = HeaderSelected,
                sorrend         = sorrend,
                numberLimit     = listSize
            };
            return(list);
        }