private void button3_Click(object sender, EventArgs e) { SFact sFact = new SFact(); SOperate s = sFact.Add(); s._Add("position", textBox9.Text, textBox8.Text); }
private void button1_Click(object sender, EventArgs e) { SFact sFact = new SFact(); SOperate s1 = sFact.Select(); if (s1._Select("*", "staff", "sta_num", textBox1.Text).Tables[0].Rows.Count == 0) { if (textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "" && textBox5.Text != "" && textBox6.Text != "" && textBox7.Text != "") { SOperate s = sFact.Add(); s._Add("staff(sta_name,sta_pwd,sta_num,sta_sex,sta_age,pos_id,sta_startime)", textBox2.Text, textBox7.Text, textBox1.Text, textBox5.Text, textBox3.Text, comboBox1.Text, textBox6.Text); ClearInfo(); MessageBox.Show("添加成功"); } else { MessageBox.Show("存在输入信息为空。!"); } } else { MessageBox.Show("该员工账号已存在!"); } }