protected void approveLinkButton_Click(object sender, EventArgs e)
        {
            DebitCreditVoucherBLL debitCreditVoucher = new DebitCreditVoucherBLL();

            try
            {
                debitCreditVoucher.ApproveDebitVoucherByJournal(journalNumberForApproveHiddenField.Value.Trim(), "Cheque");

                GetApprovalList();
                string message = "Debit Voucher Cheque <span class='actionTopic'>Approved</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 approveButton_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.ApproveDebitVoucherByJournal(voucherListGridView.Rows[i].Cells[0].Text.Trim(), "Cheque");
                        count++;
                    }
                }

                if (count > 0)
                {
                    GetApprovalList();
                    string message = count.ToString() + " Debit Voucher Cheque(s) <span class='actionTopic'>Approved</span> Successfully.";
                    MyAlertBox("SuccessAlert(\"" + "Process Succeed" + "\", \"" + message + "\", \"\");");
                }
                else
                {
                    msgbox.Visible = true; msgTitleLabel.Text = "Validation!!!"; msgDetailLabel.Text = "No Voucher(s) are selected to Approve.";
                }
            }
            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();");
            }
        }