protected void applicantArchivateClick(object sender, RoutedEventArgs e)
        {
            MessageBoxResult result = MessageBox.Show("Biztosan megváltoztatod? \n\n", "HR Cloud", MessageBoxButton.YesNoCancel);

            switch (result)
            {
            case MessageBoxResult.Yes:
                ModelApplicantList items = (sender as MenuItem).DataContext as ModelApplicantList;
                selectedApplicant = new Applicant(items.id).data;
                if (selectedApplicant.statusz == 1)
                {
                    Cimke_Grid.Visibility          = Visibility.Visible;
                    cimke_related_list.ItemsSource = new ModelCimkek().GetRelated(selectedApplicant.id);
                    cimke_title.Text = "Cimkék (" + selectedApplicant.nev + ")";
                }
                else
                {
                    Utility.applicantArchiver(selectedApplicant.id, selectedApplicant.statusz);
                    applicantListLoader();
                }
                break;

            case MessageBoxResult.No:
                break;

            case MessageBoxResult.Cancel:
                break;
            }
        }
Beispiel #2
0
        private void Remove_from_favorit_Click(object sender, RoutedEventArgs e)
        {
            ModelApplicantList applicant = (sender as MenuItem).DataContext as ModelApplicantList;

            Applicant.DeleteFromFavorite(applicant.id);
            LoadLists();
        }
Beispiel #3
0
        //protected void jeloltTabClick(object sender, RoutedEventArgs e)
        //{
        //    kapcs_jeloltek_listBox.Visibility = System.Windows.Visibility.Visible;
        //    kapcs_ertesitendo_listBox.Visibility = System.Windows.Visibility.Hidden;

        //    jeloltek_addbtn.Visibility = System.Windows.Visibility.Visible;
        //    ertesitendok_addbtn.Visibility = System.Windows.Visibility.Hidden;
        //}

        //protected void ertesitendokTabClick(object sender, RoutedEventArgs e)
        //{
        //    kapcs_jeloltek_listBox.Visibility = System.Windows.Visibility.Hidden;
        //    kapcs_ertesitendo_listBox.Visibility = System.Windows.Visibility.Visible;

        //    ertesitendok_addbtn.Visibility = System.Windows.Visibility.Visible;
        //    jeloltek_addbtn.Visibility = System.Windows.Visibility.Hidden;
        //}

        protected void jeloltDeleteClick(object sender, MouseButtonEventArgs e)
        {
            Image delete             = sender as Image;
            ModelApplicantList items = delete.DataContext as ModelApplicantList;

            project.jeloltKapcsDelete(items.id);
            kapcs_jeloltek_listBox.ItemsSource = util.Data_JeloltKapcs();
        }
        protected void modositasClick(object sender, RoutedEventArgs e)
        {
            MenuItem           item       = sender as MenuItem;
            ModelApplicantList itemSource = item.DataContext as ModelApplicantList;

            Session.isUpdate             = true;
            Session.ApplicantID          = itemSource.id;
            Session.ApplicantSearchValue = GetSearchValues();
            Utilities.NavigateTo(grid, new NewApplicantPanel(grid, new Applicant(itemSource.id)));
        }
Beispiel #5
0
        public List <ModelApplicantList> Data_JeloltKapcs()
        {
            string command = "SELECT coalesce((SELECT count(projekt_id) FROM interview " +
                             "WHERE jelolt_id = jeloltek.id AND projekt_id = " + Session.ProjektID + " Group by projekt_id),0) as interjuk_db, " +
                             "coalesce((SELECT count(projekt_id) FROM projekt_jelolt_kapcs WHERE projekt_jelolt_kapcs.jelolt_id = jeloltek.id),0) as project_db, " +
                             "jeloltek.id,nev,jeloltek.szuldatum,megnevezes_munka,email,reg_date,kepesseg1,kepesseg2,kepesseg3,kepesseg4,kepesseg5, " +
                             "jeloltek.munkakor, jeloltek.munkakor2, jeloltek.munkakor3, allapota,jeloltek.statusz, jeloltek.friss, jeloltek.kategoria, jeloltek.megjegyzes, (SELECT EXISTS(SELECT * FROM projekt_jelolt_kapcs WHERE projekt_jelolt_kapcs.jelolt_id = jeloltek.id)) as allasban " +
                             "FROM jeloltek INNER JOIN projekt_jelolt_kapcs ON jeloltek.id = projekt_jelolt_kapcs.jelolt_id " +
                             "LEFT JOIN projektek ON projektek.id = projekt_jelolt_kapcs.projekt_id " +
                             "LEFT JOIN munkakor ON jeloltek.munkakor = munkakor.id WHERE projektek.id =" + Session.ProjektID + " GROUP BY jeloltek.id ";

            return(ModelApplicantList.GetModelApplicantList(command));
        }
Beispiel #6
0
        protected void gridMouseDown(object sender, MouseButtonEventArgs e)
        {
            Grid grid = sender as Grid;
            ModelApplicantList item = grid.DataContext as ModelApplicantList;

            if (item.checkbox == false)
            {
                item.checkbox = true;
            }
            else
            {
                item.checkbox = false;
            }
            kapcs_jeloltek_listBox.Items.Refresh();
        }
Beispiel #7
0
        public static List <ModelApplicantList> Data_FavoriteApplicants()
        {
            string command = "SELECT coalesce((SELECT count(projekt_id) FROM interview " +
                             "WHERE jelolt_id = jeloltek.id Group by projekt_id),0) as interjuk_db, " +
                             "coalesce((SELECT count(projekt_id) FROM projekt_jelolt_kapcs WHERE projekt_jelolt_kapcs.jelolt_id = jeloltek.id),0) as project_db, " +
                             "jeloltek.id,nev,jeloltek.szuldatum,megnevezes_munka,email,reg_date,kepesseg1,kepesseg2,kepesseg3,kepesseg4,kepesseg5, " +
                             "jeloltek.munkakor, jeloltek.munkakor2, jeloltek.munkakor3, allapota,kategoria,jeloltek.statusz, jeloltek.friss, jeloltek.profession_type, jeloltek.megjegyzes, (SELECT EXISTS(SELECT * FROM projekt_jelolt_kapcs WHERE projekt_jelolt_kapcs.jelolt_id = jeloltek.id)) as allasban " +
                             "FROM jeloltek LEFT JOIN projekt_jelolt_kapcs ON jeloltek.id = projekt_jelolt_kapcs.jelolt_id " +
                             "LEFT JOIN projektek ON projektek.id = projekt_jelolt_kapcs.projekt_id " +
                             "LEFT JOIN munkakor ON jeloltek.munkakor = munkakor.id " +
                             "LEFT JOIN jelolt_megfigyelt ON jeloltek.id = jelolt_megfigyelt.jelolt_id WHERE jelolt_megfigyelt.user_id = " + Session.UserData.id + " GROUP BY jeloltek.id  ORDER BY jelolt_megfigyelt.date";
            List <ModelApplicantList> list = ModelApplicantList.GetModelApplicantList(command);

            return(list);
        }
Beispiel #8
0
        protected void openApplicantClick(object sender, RoutedEventArgs e)
        {
            Button             button = sender as Button;
            ModelApplicantList items  = button.DataContext as ModelApplicantList;

            Session.ApplicantID = items.id;

            if (items.allapota >= 1)
            {
                Session.TelefonSzurt = 1;
            }
            else
            {
                Session.TelefonSzurt = 0;
            }
            Utilities.NavigateTo(grid, new ProjektJeloltDataSheet(grid, new Project(0), new Applicant(items.id)));
        }
Beispiel #9
0
        protected void jeloltRightClick(object sender, RoutedEventArgs e)
        {
            Email              email = new Email();
            MenuItem           mitem = sender as MenuItem;
            ModelApplicantList items = mitem.DataContext as ModelApplicantList;

            switch (mitem.Tag.ToString())
            {
            case "delete":
            {
                MessageBoxResult result = MessageBox.Show("Elutasító E-Mail kiküldésre kerüljön?", "My App", MessageBoxButton.YesNoCancel);
                switch (result)
                {
                case MessageBoxResult.Yes:
                    project.jeloltKapcsDelete(items.id);
                    new Email().Send(items.email, emailTemplate.Elutasito_Email(items.nev));
                    break;

                case MessageBoxResult.No:
                    project.jeloltKapcsDelete(items.id);
                    break;

                case MessageBoxResult.Cancel:
                    break;
                }
                break;
            }

            case "1":
                project.jeloltKapcsUpdate(items.id, Convert.ToInt32(mitem.Tag));
                break;

            case "2":
                project.jeloltKapcsUpdate(items.id, Convert.ToInt32(mitem.Tag));
                break;

            case "3":
                project.jeloltKapcsUpdate(items.id, Convert.ToInt32(mitem.Tag));
                new Email().Send(items.email, emailTemplate.Elutasito_Email(items.nev));
                break;
            }
            listLoader();
            formLoader();
        }
        protected void applicantDeleteClick(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;
                ModelApplicantList items    = menuItem.DataContext as ModelApplicantList;
                Applicant.DeleteApplicant(items.id);
                Files.DeleteFolder(items.id);
                applicantListLoader();
                break;

            case MessageBoxResult.No:
                break;

            case MessageBoxResult.Cancel:
                break;
            }
        }
Beispiel #11
0
        protected void applicantOpenClick(object sender, RoutedEventArgs e)
        {
            Button             button = sender as Button;
            ModelApplicantList items  = button.DataContext as ModelApplicantList;

            Session.ApplicantID = items.id;
            if (items.frissValue)
            {
                MessageBoxResult result = MessageBox.Show("Üdvözlő üzenet küldése? \n", "HR Cloud", MessageBoxButton.YesNo);
                switch (result)
                {
                case MessageBoxResult.Yes:
                    Applicant.FirstOpen(items.id);
                    break;

                case MessageBoxResult.No:
                    break;
                }
            }
            Utilities.SetReturnPage(Utilities.Views.FavoritePanel);
            Utilities.NavigateTo(grid, new ApplicantDataSheet(grid, new Applicant(items.id)));
        }
Beispiel #12
0
        public static List <ModelApplicantList> GetApplicantList(ModelApplicantSearchBar sw)
        {
            double listNo = (sw.numberLimit != 0 ? sw.numberLimit : 10);

            string command = "SELECT coalesce((SELECT count(projekt_id) FROM interview WHERE jelolt_id = jeloltek.id GROUP BY jelolt_id),0) as interjuk_db, " +
                             "coalesce((SELECT count(projekt_id) FROM projekt_jelolt_kapcs WHERE projekt_jelolt_kapcs.jelolt_id = jeloltek.id),0) as project_db, " +
                             "(SELECT megnevezes_munka FROM munkakor WHERE munkakor.id = jeloltek.munkakor) as munkakor, " +
                             "(SELECT megnevezes_munka FROM munkakor WHERE munkakor.id = jeloltek.munkakor2) as munkakor2, " +
                             "(SELECT megnevezes_munka FROM munkakor WHERE munkakor.id = jeloltek.munkakor3) as munkakor3, " +
                             "jeloltek.id,jeloltek.nev,szuldatum,reg_date,allapota,jeloltek.statusz,jeloltek.megjegyzes,email,friss,kategoria, " +
                             "(SELECT EXISTS(SELECT * FROM projekt_jelolt_kapcs WHERE projekt_jelolt_kapcs.jelolt_id = jeloltek.id)) as allasban " +
                             "FROM jeloltek " +
                             "LEFT JOIN megjegyzesek ON jeloltek.id = megjegyzesek.jelolt_id " +
                             "LEFT JOIN munkakor on jeloltek.munkakor = munkakor.id " +
                             "LEFT JOIN jelolt_cimke_kapcs on jelolt_cimke_kapcs.jelolt_id = jeloltek.id " +
                             "LEFT JOIN jelolt_cimkek on jelolt_cimkek.id = jelolt_cimke_kapcs.cimke_id " +
                             "LEFT JOIN projekt_jelolt_kapcs ON jeloltek.id = projekt_jelolt_kapcs.jelolt_id " +
                             "WHERE jeloltek.id LIKE '%%' AND jeloltek.ervenyes = 1 AND jeloltek.statusz =" + Session.ApplicantStatusz;

            if (sw.nev != "")
            {
                command += " AND jeloltek.nev LIKE '%" + sw.nev + "%' ";
            }
            if (sw.lakhely != "")
            {
                command += " AND jeloltek.lakhely LIKE '%" + sw.lakhely + "%' ";
            }
            if (sw.email != "")
            {
                command += " AND jeloltek.email LIKE '%" + sw.email + "%' ";
            }
            if (sw.eletkor != "")
            {
                command += " AND jeloltek.szuldatum <= " + sw.eletkor + " ";
            }

            //if (searchValue[0].tapasztalat != "" && searchValue[0].tapasztalat != "0")
            //{
            //    command += "AND jeloltek.tapasztalat_ev >= " + searchValue[0].tapasztalat + " ";
            //}

            if (sw.regdate != "")
            {
                command += " AND jeloltek.reg_date LIKE '%" + sw.regdate + "%' ";
            }
            if (sw.interjuk != "" && sw.interjuk != "0")
            {
                command += " AND coalesce((SELECT count(projekt_id) FROM interview WHERE jelolt_id = jeloltek.id Group by projekt_id),0) >= " + sw.interjuk + " ";
            }
            if (sw.nemekStr != "")
            {
                command += " AND jeloltek.neme LIKE '%" + sw.nemekStr + "%' ";
            }
            if (sw.munkakorStr != "")
            {
                command += " AND jeloltek.munkakor LIKE '%" + sw.munkakorStr + "%' ";
            }
            if (sw.vegzettsegStr != "")
            {
                command += " AND jeloltek.vegz_terulet LIKE '%" + sw.vegzettsegStr + "%' ";
            }
            if (sw.cimke != "")
            {
                command += " AND jelolt_cimkek.cimke_megnevezes LIKE '%" + sw.cimke + "%' ";
            }
            if (sw.cimke != "")
            {
                command += " OR megjegyzesek.megjegyzes LIKE '%" + sw.cimke + "%' ";
            }
            if (sw.szabad == "1")
            {
                command += "  AND projekt_jelolt_kapcs.id IS NULL ";
            }
            if (sw.allasbanBool)
            {
                command += "  AND projekt_jelolt_kapcs.id IS NOT NULL ";
            }
            command += " GROUP BY jeloltek.id ";

            switch (sw.HeaderSelected)
            {
            case "1":
                command += " ORDER BY jeloltek.nev" + sw.sorrend;
                break;

            case "2":
                command += " ORDER BY jeloltek.statusz" + sw.sorrend;
                break;

            case "3":
                command += " ORDER BY jeloltek.reg_date" + sw.sorrend;
                break;

            default:
                command += " ORDER BY jeloltek.reg_date DESC, friss DESC";
                break;
            }
            command += " LIMIT " + listNo + " OFFSET " + Session.ApplicantSearchPage * listNo + "";

            return(ModelApplicantList.GetModelApplicantList(command));
        }
        private void MegfigyeltekhezAd(object sender, RoutedEventArgs e)
        {
            ModelApplicantList applicant = (sender as MenuItem).DataContext as ModelApplicantList;

            Applicant.AddToFavorite(applicant.id);
        }
        private void VisszautasitIdeiglenes(object sender, RoutedEventArgs e)
        {
            ModelApplicantList applicant = (sender as MenuItem).DataContext as ModelApplicantList;

            new Email().Send(applicant.email, new EmailTemplate().NincsPozicioElutasito(applicant.nev));
        }