예제 #1
0
        private void tsbtnDelete_Click(object sender, EventArgs e)
        {
            switch (MessageBox.Show("Are you sure to delete selected record?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
            {
            case DialogResult.Yes:
                string chaseno = dgvInput.CurrentRow.Cells[9].Value.ToString();
                AccountUtil.DeleteRecord(chaseno);

                MessageBox.Show("Record has been deleted.");
                break;

            case DialogResult.No:
                break;
            }
        }
예제 #2
0
        private void tsbtnDelete_Click(object sender, EventArgs e)
        {
            switch (MessageBox.Show("Are you sure to delete selected records?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
            {
            case DialogResult.Yes:
                foreach (DataGridViewRow row in dgvApproval.SelectedRows)
                {
                    string chaseno = row.Cells[6].Value.ToString();
                    AccountUtil.DeleteRecord(chaseno);
                }
                MessageBox.Show("Record has been deleted.");
                break;

            case DialogResult.No:
                break;
            }
        }
        private void tsbtnDelete_Click(object sender, EventArgs e)
        {
            switch (MessageBox.Show("Are you sure to delete selected records?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
            {
            case DialogResult.Yes:
                foreach (DataGridViewRow row in dgvInput.SelectedRows)
                {
                    string chaseno = row.Cells[15].Value.ToString();
                    AccountUtil.DeleteRecord(chaseno);
                }
                MessageBox.Show("Delete Operation successful.");
                LoadData(tstxtSearch.Text, tstxtAssetClass.Text);
                break;

            case DialogResult.No:
                break;
            }
        }
        private void tsbtnDelete_Click(object sender, EventArgs e)
        {
            switch (MessageBox.Show("Are you sure to delete selected records?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
            {
            case DialogResult.Yes:
                foreach (DataGridViewRow row in dgvOverview.SelectedRows)
                {
                    string status  = row.Cells[4].Value.ToString();
                    string chaseno = row.Cells[6].Value.ToString();

                    if (status != "Ringi Approval")
                    {
                        AccountUtil.DeleteRecord(chaseno);
                    }
                }
                MessageBox.Show("Record has been deleted.");
                LoadData(tstxtSearch.Text);
                break;

            case DialogResult.No:
                break;
            }
        }