private void BtnPayFees_Click(object sender, EventArgs e) { if (activeFeesViewRow == null) { MessageBox.Show("please select row correctly using selector column on the left."); } else { //BID == 0 string myStrBorrowId = activeFeesViewRow.Cells[0].Value.ToString(); //initialy it is saved as an object bool parseResult = int.TryParse(myStrBorrowId, out int borrowId); if (parseResult) { //if(borrowLogic.updateMediaPayLateFee(borrowId)) bool result = dtFunc.getBool(ws.updateMediaPayLateFee(borrowId)); if (result) { MessageBox.Show("successfull media late fee payment."); //resfresh DGV setDataForDataGridViews(); activeFeesViewRow = null; //reset active row value } else { MessageBox.Show("error late fee not paid."); } } else { MessageBox.Show("could not convert str of borrowId to int for LateFee Payment."); return; } } }