private void btnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                if (!GlobalFunctions.checkRights("tsmLoanApplication", "Update"))
                {
                    return;
                }

                DataTable _dt = loLoanApplication.getLoanApplicationStatus(dgvList.CurrentRow.Cells[0].Value.ToString());
                if (_dt.Rows.Count > 0)
                {
                    foreach (DataRow _drStatus in _dt.Rows)
                    {
                        if (_drStatus[0].ToString() != "In Process")
                        {
                            MessageBoxUI _mbStatus = new MessageBoxUI("Only IN PROCESS application can be updated!", GlobalVariables.Icons.Warning, GlobalVariables.Buttons.OK);
                            _mbStatus.ShowDialog();
                            return;
                        }
                    }
                }
                else
                {
                    MessageBoxUI _mbStatus = new MessageBoxUI("Loan Application Id does not exist!", GlobalVariables.Icons.Warning, GlobalVariables.Buttons.OK);
                    _mbStatus.ShowDialog();
                    return;
                }

                if (dgvList.Rows.Count > 0)
                {
                    LoanApplicationDetailsUI loLoanApplicationDetails = new LoanApplicationDetailsUI(dgvList.CurrentRow.Cells[0].Value.ToString());
                    loLoanApplicationDetails.ParentList = this;
                    loLoanApplicationDetails.ShowDialog();
                }
            }
            catch (Exception ex)
            {
                ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "btnUpdate_Click");
                em.ShowDialog();
                return;
            }
        }
Esempio n. 2
0
 public DataTable getLoanApplicationStatus(string pLoanApplicationId)
 {
     return(loLoanApplication.getLoanApplicationStatus(pLoanApplicationId));
 }