Example #1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (this.dataGridView1.CurrentRow.Index < 0)
                return;

            string KeyValue = this.dataGridView1.Rows[this.dataGridView1.CurrentRow.Index].Cells[2].Value.ToString();
            if (MessageBox.Show("您確定要刪除企業用戶[" + KeyValue + "]之資料嗎?", Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
            {
                Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
                dal.Delete(KeyValue);
                Js.BLL.Sys.SysComDal dalnew = new Js.BLL.Sys.SysComDal();
                dalnew.DeleteDataBase(this.dataGridView1.Rows[this.dataGridView1.CurrentRow.Index].Cells[4].Value.ToString(), this.dataGridView1.Rows[this.dataGridView1.CurrentRow.Index].Cells[7].Value.ToString());
                SetBtnEnabled("");
            }
        }