private void button1_Click(object sender, EventArgs e) { if (textBox1.Text.Length != 0) { SqlClass.NonQuery("insert into groups(gname) values('" + textBox1.Text + "')"); con.FreshContacts(); } }
private void button1_Click(object sender, EventArgs e) { SqlClass.NonQuery("update groups set gname='" + textBox1.Text + "' where gid='" + con.gid + "'"); con.FreshContacts(); }
private void button1_Click(object sender, EventArgs e) { SqlClass.NonQuery("insert into contacts(name,num,gid) values('" + textBox1.Text + "','" + textBox2.Text + "'," + con.gid + ")"); con.FreshContacts(); }
private void button1_Click(object sender, EventArgs e) { // MessageBox.Show(con.id + " " + ls[comboBox1.SelectedIndex].Key); SqlClass.NonQuery("update contacts set name='" + textBox1.Text + "',num='" + textBox2.Text + "' ,gid=" + ls[comboBox1.SelectedIndex].Key + " where id=" + con.id); con.FreshContacts(); }