示例#1
0
        private void btnDel_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult dr = MessageBox.Show(dataGridView1.CurrentRow.Cells[1].Value.ToString() + " 를(을) 삭제하시겠습니까?", "알림", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                if (dr == DialogResult.OK)
                {
                    bool bResult = R_service.DeleteMachineGr(Convert.ToInt32(lblID1.Text));
                    if (bResult)
                    {
                        MessageBox.Show("삭제완료");
                        SetBottomStatusLabel("설비군 삭제 성공");
                        LoadData();
                    }
                    else if (!bResult)
                    {
                        MessageBox.Show("설비군 삭제 실패");

                        return;
                    }
                }
            }
            catch (Exception err)
            {
                LoggingUtility.GetLoggingUtility(err.Message, Level.Error);
            }
        }