Esempio n. 1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult dr = MessageBox.Show(dataGridView2.CurrentRow.Cells[4].Value.ToString() + " 를(을) 삭제하시겠습니까?", "알림", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                if (dr == DialogResult.OK)
                {
                    bool bResult = R_service.DeleteMachin(Convert.ToInt32(lblID2.Text));

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