void m_cmd_delete_Click(object sender, EventArgs e) { string v_str_confirm = "Bạn có chắc chắn muốn xóa khoản thu nhập này"; if (CHRM_BaseMessages.MsgBox_Confirm (v_str_confirm)) { var v_dr = m_grv.GetDataRow(m_grv.FocusedRowHandle); US_GD_THU_NHAP_KHAC v_us = new US_GD_THU_NHAP_KHAC(CIPConvert.ToDecimal(v_dr[2].ToString())); v_us.Delete(); XtraMessageBox.Show("Xóa thành công!"); load_data_to_grid(); } }
void m_cmd_delete_Click(object sender, EventArgs e) { try { if (m_grv_quan_ly_thu_nhap_khac.RowCount != 0) { decimal v_id_gd_thu_nhap_khac = CIPConvert.ToDecimal(m_grv_quan_ly_thu_nhap_khac.GetRowCellValue(m_grv_quan_ly_thu_nhap_khac.FocusedRowHandle, "ID").ToString()); US_GD_THU_NHAP_KHAC v_us_gd_thu_nhap_khac = new US_GD_THU_NHAP_KHAC(v_id_gd_thu_nhap_khac); v_us_gd_thu_nhap_khac.Delete(); } } catch (Exception v_e) { CSystemLog_301.ExceptionHandle(v_e); } }