Example #1
0
 private void button5_Click(object sender, EventArgs e)   //수입 삭제 버튼
 {
     if (k_i == null)
     {
         MessageBox.Show("지정된 자료가 없습니다.", "오류");
     }
     else
     {
         if (MessageBox.Show("해당 자료를 삭제 하시겠습니까?", "주의", MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             DBHandling currentDB = new DBHandling(filepath);
             currentDB.add_delete(k_i.RowIndex);
             if (incom_rowcount != 0)   //1씩 코드 내리기
             {
                 for (int i = k_i.RowIndex + 1; i <= incom_rowcount; i++)
                 {
                     currentDB.add_iterdel(i);
                 }
             }
             load_data();
             k_i = null;
         }
     }
 }