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