Beispiel #1
0
        private void button4_Click(object sender, EventArgs e)//重置结果
        {
            string         deletesql = "truncate table result";
            string         searchsql = "select * from result";
            ad_ServicesBLL bLL       = new ad_ServicesBLL();

            if (bLL.SearchRs(searchsql))
            {
                int i = bLL.Tuncast_TBrs(deletesql);
                if (i == -1)
                {
                    button2_Click(sender, e);
                    MessageBox.Show("重置成功", "提示");
                }
                else
                {
                    MessageBox.Show("重置失败", "提示");
                }
            }
            else
            {
                button2_Click(sender, e);
                MessageBox.Show("请先提交数据", "提示");
            }
        }
Beispiel #2
0
        private void button3_Click(object sender, EventArgs e)//提交结果
        {
            DataTable dataTable = new DataTable();

            dataTable = (DataTable)this.dataGridView1.DataSource;//获取datagridview的数据
            ad_ServicesBLL bLL = new ad_ServicesBLL();

            bLL.InsertToResult(dataTable);
            button2_Click(sender, e);
            bLL.Tuncast_TBrs("truncate table teavolheng2");
        }