Пример #1
0
        private void btnDel_Click(object sender, EventArgs e)
        {
            ResourceService R_service = new ResourceService();

            try
            {
                DialogResult dr = MessageBox.Show(dataGridView1.CurrentRow.Cells[2].Value.ToString() + " 를(을) 삭제하시겠습니까?", "알림", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                if (dr == DialogResult.OK)
                {
                    R_service = new ResourceService();
                    bool bResult = R_service.DeleteBOR(Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value));

                    if (bResult)
                    {
                        LoadData();
                        SetBottomStatusLabel("삭제완료");
                        MessageBox.Show("삭제완료");
                    }
                    else if (!bResult)
                    {
                        SetBottomStatusLabel("삭제실패");
                        MessageBox.Show("삭제 실패");
                        return;
                    }
                }
            }
            catch (Exception err)
            {
                string str = err.Message;
                LoggingUtility.GetLoggingUtility(err.Message, Level.Error);
            }
        }