Пример #1
0
        public void applicantArchiver(int id, int statusz) // javított
        {
            if (statusz == 0)
            {
                statusz = 1;
            }
            else
            {
                statusz = 0;
            }
            string  command = "UPDATE jeloltek SET statusz=" + statusz + " WHERE jeloltek.id = " + id + ";";
            MySqlDB mySql   = new MySqlDB();

            mySql.Execute(command);
            mySql.Close();
        }
Пример #2
0
        public void SettingsInsert(string content, string table, string other = "")
        {
            string command = "";

            switch (table)
            {
            case "ertesitendok":
                command = "INSERT INTO `ertesitendok` (`id`, `ertesitendok_nev`, `email`, `telefon`) VALUES (NULL, '" + content + "', 'email', '000');";
                break;

            case "vegzettsegek":
                command = "INSERT INTO `vegzettsegek` (`id`, `megnevezes_vegzettseg`) VALUES(NULL, '" + content + "')";
                break;

            case "munkakor":
                command = "INSERT INTO `munkakor` (`id`, `megnevezes_munka`) VALUES (NULL, '" + content + "');";
                break;

            case "pc":
                command = "INSERT INTO `pc` (`id`, `megnevezes_pc`) VALUES (NULL, '" + content + "');";
                break;

            case "ertesulesek":
                command = "INSERT INTO `ertesulesek` (`id`, `ertesules_megnevezes`) VALUES (NULL, '" + content + "');";
                break;

            case "nyelv":
                command = "INSERT INTO `nyelv` (`id`, `megnevezes_nyelv`) VALUES (NULL, '" + content + "');";
                break;

            case "kompetenciak":
                command = "INSERT INTO `kompetenciak` (`id`, `kompetencia_megnevezes`) VALUES (NULL, '" + content + "');";
                break;

            case "cimkek":
                command = "INSERT INTO `jelolt_cimkek` (`id`, `cimke_megnevezes`) VALUES (NULL, '" + content + "');";
                break;

            case "freelancer":
                command = "INSERT INTO `freelancer_list` (`id`, `name`, `email`, `rid`) VALUES (NULL, '" + content + "', '" + other + "', '" + RandomString(10) + "');";
                break;
            }
            MySqlDB mySql = new MySqlDB();

            mySql.Execute(command);
            mySql.Close();
        }
Пример #3
0
        ///<summary>
        ///Felhasználó id alapján megváltoztatja a hozzáférés jogát.
        ///</summary>
        public static void ModifyValidation(int id, bool valid)
        {
            string seged;

            if (valid)
            {
                seged = "1";
            }
            else
            {
                seged = "0";
            }
            MySqlDB mySql = new MySqlDB();

            mySql.Execute("UPDATE users SET validitas = '" + seged + "' WHERE users.id = '" + id + "';");
            mySql.Close();
        }
Пример #4
0
        public List <string> GetAttendees(int interviewId)
        {
            List <string> attendees = new List <string>();
            MySqlDB       mySql     = new MySqlDB();

            if (mySql.Open() == true)
            {
                string command = "SELECT email FROM interju_resztvevo_kapcs LEFT JOIN users ON users.id = interju_resztvevo_kapcs.user_id WHERE interju_resztvevo_kapcs.interju_id = " + interviewId;
                mySql.cmd = new MySqlCommand(command, mySql.conn);
                mySql.sdr = mySql.cmd.ExecuteReader();
                while (mySql.sdr.Read())
                {
                    attendees.Add(mySql.sdr["email"].ToString());
                }
                mySql.sdr.Close();
            }
            return(attendees);
        }
Пример #5
0
        public static List <ModelSzakmaiBevont> GetModelSzakmaiBevont(string command)
        {
            MySqlDB mySql = new MySqlDB();
            List <ModelSzakmaiBevont> list = new List <ModelSzakmaiBevont>();

            if (mySql.Open() == true)
            {
                mySql.cmd = new MySqlCommand(command, mySql.conn);
                mySql.sdr = mySql.cmd.ExecuteReader();
                while (mySql.sdr.Read())
                {
                    list.Add(new ModelSzakmaiBevont
                    {
                        id = Convert.ToInt32(mySql.sdr["id"]),
                        megnevezes_projekt = mySql.sdr["megnevezes_projekt"].ToString(),
                        megnevezes_munka   = mySql.sdr["megnevezes_munka"].ToString(),
                        jeloltek_db        = Convert.ToInt32(mySql.sdr["jeloltek_db"]),
                    });
                }
                mySql.sdr.Close();
            }
            mySql.Close();
            return(list);
        }