private void Save_Click(object sender, EventArgs e)
        {
            DBconnectioncs s = new DBconnectioncs();

            if (star.Checked)
            {
                string q = "update talent_acquisition_specialist set TAS_Status  = 'STAR' where [Name] = '" + Performance.nm + "' ";
                s.Inserts(q);
            }
            if (medium.Checked)
            {
                string q = "update talent_acquisition_specialist set TAS_Status  = 'MEDIUM' where [Name] = '" + Performance.nm + "' ";
                s.Inserts(q);
            }
            if (low.Checked)
            {
                string q = "update talent_acquisition_specialist set TAS_Status  = 'LOW' where [Name] = '" + Performance.nm + "' ";
                s.Inserts(q);
            }
            this.Close();
        }
        private void Button1_Click(object sender, EventArgs e)
        {
            DBconnectioncs c   = new DBconnectioncs();
            int            urm = 0;
            int            sup = 0;

            if (checkBox1.Checked)
            {
                urm = 1;
            }
            if (checkBox2.Checked)
            {
                sup = 1;
            }
            if (sup == 1)
            {
            }
            //c.Inserts("insert Location (Name, City,country) values('" + comboBox2.SelectedItem + "','" + comboBox2.SelectedItem + "','" + comboBox1.SelectedItem + "')");
            //int x= '" +c.Select("select Location_id from Location where Name='" + comboBox2.SelectedItem + "'")+ "';
            c.Inserts("insert Student (Name, Major, email,university,Under_Represented_Minority,Graduationyear,signedup,reply_date) values ('" + textBox4.Text + "','" + textBox5.Text + "','" + textBox6.Text + "','" + comboBox3.Text + "','" + urm + "','" + textBox7.Text + "','" + sup + "',getdate())");
            this.Close();
        }
Exemplo n.º 3
0
        private void Button1_Click(object sender, EventArgs e)
        {
            groupBox1.Enabled = true;
            int            id = Form5.id;
            DBconnectioncs s  = new DBconnectioncs();

            s.Inserts("update Talent_acquisition_specialist set no_of_connections=no_of_connections+'" + int.Parse(textBox1.Text) + "' where id_TA='" + id + "'");
            string dt_to = dateTimePicker1.Value.ToString("yyyy/MM/dd");



            string    query_signups = "select count(idStudent) from Student where signedup = 1 and ID_TAS = '" + id + "' and signup_date <= Cast('" + dt_to + "' as date)";
            DataTable name          = s.Select(query_signups);

            listBox1.Items.Clear();
            listBox1.Items.Add(name.Rows[0][0].ToString());

            string    dt     = "select count(idStudent) from Student where ID_TAS ='" + id + "'and reply_date <= Cast('" + dt_to + "'as date)";
            DataTable date_q = s.Select(dt);

            listBox2.Items.Clear();
            listBox2.Items.Add((date_q.Rows[0][0].ToString()));
        }