예제 #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            SFact    sFact = new SFact();
            SOperate s     = sFact.Delete();

            s._Del("vip", "id", id);
            ClearInfo();
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            DataSet  ds    = new DataSet();
            SFact    sFact = new SFact();
            SOperate s     = sFact.Select();
            SOperate s1    = sFact.Update();
            SOperate s2    = sFact.Delete();
            int      num   = int.Parse(s._Select("good_sum", "good", "good_id", comboBox1.Text).Tables[0].Rows[0][0].ToString().Trim());

            if (num < int.Parse(textBox1.Text))
            {
                MessageBox.Show("数量不足!");
            }
            else if (num == int.Parse(textBox1.Text))
            {
                num = num - int.Parse(textBox1.Text);
                s2._Del("good", "good_id", comboBox1.Text);
            }
            else
            {
                num = num - int.Parse(textBox1.Text);
                s1._Update("good", "good_sum", num.ToString(), "good_id", comboBox1.Text);
            }
        }