protected void SetSearchValues() { if (Session.ApplicantSearchValue == null) { return; } ModelApplicantSearchBar srcValue = Session.ApplicantSearchValue; munkakor_srccbx.SelectedIndex = srcValue.munkakorIndex; vegzettseg_srccbx.SelectedIndex = srcValue.vegzettsegIndex; nemek_srccbx.SelectedIndex = srcValue.nemekIndex; szabad_check.IsChecked = srcValue.szabadBool; allasban_check.IsChecked = srcValue.allasbanBool; nev_srcinp.Text = srcValue.nev; lakhely_srcinp.Text = srcValue.lakhely; email_srcinp.Text = srcValue.email; eletkor_srcinp.Text = srcValue.eletkor; //tapsztalat_srcinp.Text = srcValue.tapasztalat; regdate_srcinp.Text = srcValue.regdate; interju_srcinp.Text = srcValue.interjuk; cimke_srcinp.Text = srcValue.cimke; if (srcValue.nev.Length > 0) { nev_label.Visibility = Visibility.Hidden; } if (srcValue.lakhely.Length > 0) { lakhely_label.Visibility = Visibility.Hidden; } if (srcValue.email.Length > 0) { email_label.Visibility = Visibility.Hidden; } if (srcValue.eletkor.Length > 0) { eletkor_label.Visibility = Visibility.Hidden; } if (srcValue.regdate.Length > 0) { regdate_label.Visibility = Visibility.Hidden; } if (srcValue.interjuk.Length > 0) { interju_label.Visibility = Visibility.Hidden; } if (srcValue.cimke.Length > 0) { cimke_label.Visibility = Visibility.Hidden; } }
public static List <ModelFreelancerApplicant> GetRecruitedList(ModelApplicantSearchBar sw) { double listNo = (sw.numberLimit != 0 ? sw.numberLimit : 10); string command = "SELECT coalesce((SELECT count(projekt_id) FROM projekt_jelolt_kapcs_kulsos WHERE projekt_jelolt_kapcs_kulsos.jelolt_id = jeloltek.id),0) as project_db, " + "jeloltek.id,jeloltek.nev,szuldatum,reg_date,jeloltek.email,kategoria,bekuldo,lakhely,freelancer_list.name as freelancername " + "FROM jeloltek " + "LEFT JOIN projekt_jelolt_kapcs_kulsos ON jeloltek.id = projekt_jelolt_kapcs_kulsos.jelolt_id " + "LEFT JOIN freelancer_list ON jeloltek.bekuldo = freelancer_list.id " + "WHERE jeloltek.id LIKE '%%' AND kategoria = 2 AND ervenyes = 0"; if (sw.nev != "") { command += " AND jeloltek.nev LIKE '%" + sw.nev + "%' "; } if (sw.lakhely != "") { command += " AND jeloltek.lakhely LIKE '%" + sw.lakhely + "%' "; } if (sw.bekuldo != 0) { command += " AND jeloltek.bekuldo = " + sw.bekuldo + " "; } if (sw.regdate != "") { command += " AND jeloltek.reg_date LIKE '%" + sw.regdate + "%' "; } command += " GROUP BY jeloltek.id "; switch (sw.HeaderSelected) { case "1": command += " ORDER BY jeloltek.nev" + sw.sorrend; break; case "2": command += " ORDER BY jeloltek.reg_date" + sw.sorrend; break; default: command += " ORDER BY jeloltek.reg_date DESC"; break; } command += " LIMIT " + listNo + " OFFSET " + Session.ApplicantSearchPage * listNo + ""; return(ModelFreelancerApplicant.GetModelFreelancerApplicantList(command)); }
protected ModelApplicantSearchBar GetSearchValues() { ModelApplicantSearchBar data = new ModelApplicantSearchBar(); ModelFreelancerList cimke_item = (toborzo_srccbx as ComboBox).SelectedItem as ModelFreelancerList; double listSize = Math.Round(applicant_listBox.RenderSize.Height / 55); string sorrend = " ASC"; data = new ModelApplicantSearchBar { nev = nev_srcinp.Text, lakhely = lakhely_srcinp.Text, //tapasztalat = tapasztalat, bekuldo = (cimke_item != null ? cimke_item.id : 0), regdate = regdate_srcinp.Text, sorrend = sorrend, numberLimit = listSize }; return(data); }
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)); }
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); }