protected void rejectButton_Click(object sender, EventArgs e) { DebitCreditVoucherBLL debitCreditVoucher = new DebitCreditVoucherBLL(); CheckBox selectCheckBox; int count = 0; try { for (int i = 0; i < voucherListGridView.Rows.Count; i++) { selectCheckBox = (CheckBox)voucherListGridView.Rows[i].Cells[5].FindControl("selectCheckBox"); if (selectCheckBox.Checked) { debitCreditVoucher.RejectDebitCreditJournalVoucherByJournal(voucherListGridView.Rows[i].Cells[0].Text.Trim()); count++; } } if (count > 0) { GetApprovalList(); string message = count.ToString() + " Debit Voucher Cheque(s) <span class='actionTopic'>Rejected</span> Successfully."; MyAlertBox("SuccessAlert(\"" + "Process Succeed" + "\", \"" + message + "\", \"\");"); } else { msgbox.Visible = true; msgTitleLabel.Text = "Validation!!!"; msgDetailLabel.Text = "No Voucher(s) are selected to Reject."; } } catch (Exception ex) { string message = ex.Message; if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; } MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");"); } finally { debitCreditVoucher = null; MyAlertBox("MyOverlayStop();"); } }
protected void rejectLinkButton_Click(object sender, EventArgs e) { DebitCreditVoucherBLL debitCreditVoucher = new DebitCreditVoucherBLL(); try { debitCreditVoucher.RejectDebitCreditJournalVoucherByJournal(journalNumberForApproveHiddenField.Value.Trim()); GetApprovalList(); string message = "Debit Voucher Cheque <span class='actionTopic'>Rejected</span> Successfully."; MyAlertBox("SuccessAlert(\"" + "Process Succeed" + "\", \"" + message + "\", \"\");"); } catch (Exception ex) { string message = ex.Message; if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; } MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");"); } finally { debitCreditVoucher = null; MyAlertBox("MyOverlayStop();"); } }
protected void rejectButton_Click(object sender, EventArgs e) { DebitCreditVoucherBLL debitCreditVoucher = new DebitCreditVoucherBLL(); try { debitCreditVoucher.RejectDebitCreditJournalVoucherByJournal(numberLabel.Text.Trim()); string message = "Journal Voucher <span class='actionTopic'>Rejected</span> Successfully."; MyAlertBox("var callbackOk = function () { MyOverlayStart(); window.location = \"/UI/AccUI/JournalVoucher/JournalVoucherApprovalList.aspx\"; }; SuccessAlert(\"" + "Process Succeed" + "\", \"" + message + "\", callbackOk);"); } catch (Exception ex) { string message = ex.Message; if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; } MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");"); } finally { debitCreditVoucher = null; } }