Exemple #1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("确定删除该单据!", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
            {
                //删除
                rbm.DeleteRemoveBill(txtGuid.Text);

                //清空
                btnAdd_Click(null, null);

                //刷新
                if (SendFlag == 0)
                {
                    frmRemoveBill.frmremovebill.LoadBill();
                }
            }
        }
Exemple #2
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (gridView1.RowCount > 0)
            {
                DataRowView dr = (DataRowView)(gridView1.GetFocusedRow());
                if (dr[8].ToString() == "")
                {
                    if (MessageBox.Show("确定删除该数据!", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
                    {
                        dr = (DataRowView)(gridView1.GetFocusedRow());
                        RemoveBillManage.DeleteRemoveBill(dr[0].ToString());

                        gridView1.DeleteSelectedRows();
                        this.ShowMessage("删除成功!");
                    }
                }
                else
                {
                    this.ShowAlertMessage("此单据已审核,不可以删除!!");
                }
            }
        }