Пример #1
0
        private void memberCodeDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 6)
            {
                this.Hide();
                MemberEntry           aEditMemberEntry = aMemberCodeEntryList[e.RowIndex];
                EditMemberCodeEntryUI main             = new EditMemberCodeEntryUI(aEditMemberEntry);
                main.ShowDialog();
            }

            if (e.ColumnIndex == 7)
            {
                myId = Convert.ToString(memberCodeDataGridView.Rows[e.RowIndex].Cells["memberId"].Value);
                DialogResult result1 = MessageBox.Show(@"Are you sure you want to delete??", @"Question...", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (result1 == DialogResult.Yes)
                {
                    string msg = aMemberCodeEntryBll.deleteAll(myId);
                    MessageBox.Show(msg);
                }

                showDataInDataGridView();
                memberCodeDataGridView.Refresh();
            }
        }
        private void memberCodeDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 6)
            {
                this.Hide();
                MemberEntry aEditMemberEntry = aMemberCodeEntryList[e.RowIndex];
                EditMemberCodeEntryUI main = new EditMemberCodeEntryUI(aEditMemberEntry);
                main.ShowDialog();
            }

            if (e.ColumnIndex ==7 )
            {
                myId = Convert.ToString(memberCodeDataGridView.Rows[e.RowIndex].Cells["memberId"].Value);
                DialogResult result1 = MessageBox.Show(@"Are you sure you want to delete??", @"Question...", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (result1 == DialogResult.Yes)
                {
                    string msg = aMemberCodeEntryBll.deleteAll(myId);
                    MessageBox.Show(msg);
                }

                showDataInDataGridView();
                memberCodeDataGridView.Refresh();
            }
        }